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: 28219 35629 79.2 %
Date: 2025-10-01 17:07:58 Functions: 1010 1099 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       68317 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     449       68317 :   if (ty) {
     450       68317 :     swig_cast_info *iter = ty->cast;
     451       72262 :     while (iter) {
     452       72261 :       if (strcmp(iter->type->name, c) == 0) {
     453       68316 :         if (iter == ty->cast)
     454             :           return iter;
     455             :         /* Move iter to the top of the linked list */
     456        2823 :         iter->prev->next = iter->next;
     457        2823 :         if (iter->next)
     458        2710 :           iter->next->prev = iter->prev;
     459        2823 :         iter->next = ty->cast;
     460        2823 :         iter->prev = 0;
     461        2823 :         if (ty->cast) ty->cast->prev = iter;
     462        2823 :         ty->cast = iter;
     463        2823 :         return iter;
     464             :       }
     465        3945 :       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       68316 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
     503       68316 :   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      376818 : 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      376818 :   if (!type) return NULL;
     539      376818 :   if (type->str != NULL) {
     540             :     const char *last_name = type->str;
     541             :     const char *s;
     542     8668160 :     for (s = type->str; *s; s++)
     543     8291340 :       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        2493 : SWIG_Python_ErrorType(int code) {
     868        2493 :   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        2299 :   case SWIG_RuntimeError:
     877        2299 :     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        2299 :   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      843488 :          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
     987       31471 :          ~SWIG_Python_Thread_Block() { end(); }
     988             :        };
     989             :        class SWIG_Python_Thread_Allow {
     990             :          bool status;
     991             :          PyThreadState *save;
     992             :        public:
     993     7997270 :          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
     994     7997270 :          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        2496 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
    1143        2496 :   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    1144        2496 :   PyErr_SetString(errtype, msg);
    1145        2496 :   SWIG_PYTHON_THREAD_END_BLOCK;
    1146        2496 : }
    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      430582 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1183      430582 :   if (!result) {
    1184             :     result = obj;
    1185      430234 :   } else if (result == Py_None) {
    1186      417534 :     Py_DECREF(result);
    1187             :     result = obj;
    1188             :   } else {
    1189       12700 :     if (!PyList_Check(result)) {
    1190       11876 :       PyObject *o2 = result;
    1191       11876 :       result = PyList_New(1);
    1192       11876 :       PyList_SetItem(result, 0, o2);
    1193             :     }
    1194       12700 :     PyList_Append(result,obj);
    1195       12700 :     Py_DECREF(obj);
    1196             :   }
    1197      430582 :   return result;
    1198             : }
    1199             : 
    1200             : /* Unpack the argument tuple */
    1201             : 
    1202             : SWIGINTERN Py_ssize_t
    1203     1480430 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
    1204             : {
    1205     1480430 :   if (!args) {
    1206      116891 :     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     1363540 :   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     1351350 :     Py_ssize_t l = PyTuple_GET_SIZE(args);
    1227     1351350 :     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     1351350 :     } 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     4799170 :       for (i = 0; i < l; ++i) {
    1238     3447820 :   objs[i] = PyTuple_GET_ITEM(args, i);
    1239             :       }
    1240     1746900 :       for (; l < max; ++l) {
    1241      395551 :   objs[l] = 0;
    1242             :       }
    1243     1351350 :       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      699903 : SWIG_Py_Void(void)
    1282             : {
    1283      699903 :   PyObject *none = Py_None;
    1284           0 :   Py_INCREF(none);
    1285      100017 :   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      376818 : SwigPyObject_repr(SwigPyObject *v)
    1443             : {
    1444      376818 :   const char *name = SWIG_TypePrettyName(v->ty);
    1445      376818 :   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
    1446      376818 :   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      376818 :   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     8580520 : SwigPyObject_type(void) {
    1506     8580520 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
    1507     8580520 :   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      607163 : SwigPyObject_dealloc(PyObject *v)
    1529             : {
    1530      607163 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1531      607163 :   PyObject *next = sobj->next;
    1532      607163 :   if (sobj->own == SWIG_POINTER_OWN) {
    1533       97865 :     swig_type_info *ty = sobj->ty;
    1534       97865 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1535       97865 :     PyObject *destroy = data ? data->destroy : 0;
    1536       97865 :     if (destroy) {
    1537             :       /* destroy is always a VARARGS method */
    1538       97865 :       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       97865 :       PyObject *type = NULL, *value = NULL, *traceback = NULL;
    1548       97865 :       PyErr_Fetch(&type, &value, &traceback);
    1549             : 
    1550       97865 :       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       97865 :         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
    1557       97865 :         PyObject *mself = PyCFunction_GET_SELF(destroy);
    1558       97865 :         res = ((*meth)(mself, v));
    1559             :       }
    1560       97865 :       if (!res)
    1561           0 :         PyErr_WriteUnraisable(destroy);
    1562             : 
    1563       97865 :       PyErr_Restore(type, value, traceback);
    1564             : 
    1565      195730 :       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      607163 :   Py_XDECREF(next);
    1575      607163 :   PyObject_DEL(v);
    1576      607163 : }
    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        6190 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1605             : {
    1606        6190 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1607        6190 :   sobj->own = 0;
    1608        6190 :   return SWIG_Py_Void();
    1609             : }
    1610             : 
    1611             : SWIGINTERN PyObject*
    1612         566 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1613             : {
    1614         566 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1615         566 :   sobj->own = SWIG_POINTER_OWN;
    1616         566 :   return SWIG_Py_Void();
    1617             : }
    1618             : 
    1619             : SWIGINTERN PyObject*
    1620       10181 : SwigPyObject_own(PyObject *v, PyObject *args)
    1621             : {
    1622       10181 :   PyObject *val = 0;
    1623       10181 :   if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    1624             :     return NULL;
    1625             :   } else {
    1626       10181 :     SwigPyObject *sobj = (SwigPyObject *)v;
    1627       10181 :     PyObject *obj = PyBool_FromLong(sobj->own);
    1628       10181 :     if (val) {
    1629        6756 :       if (PyObject_IsTrue(val)) {
    1630         566 :         SwigPyObject_acquire(v,args);
    1631             :       } else {
    1632        6190 :         SwigPyObject_disown(v,args);
    1633             :       }
    1634             :     } 
    1635       10181 :     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      607236 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1779             : {
    1780      607236 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1781      607236 :   if (sobj) {
    1782      607236 :     sobj->ptr  = ptr;
    1783      607236 :     sobj->ty   = ty;
    1784      607236 :     sobj->own  = own;
    1785      607236 :     sobj->next = 0;
    1786             :   }
    1787      607236 :   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     3640250 : SWIG_This(void)
    1978             : {
    1979     3640250 :   if (Swig_This_global == NULL)
    1980         277 :     Swig_This_global = SWIG_Python_str_FromChar("this");
    1981     3640250 :   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     3736880 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    1993             : {
    1994     3736900 :   PyObject *obj;
    1995             : 
    1996     3736900 :   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     3635330 :   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     3635330 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2039     3635330 :   if (obj) {
    2040     3628870 :     Py_DECREF(obj);
    2041             :   } else {
    2042        6458 :     if (PyErr_Occurred()) PyErr_Clear();
    2043        6458 :     return 0;
    2044             :   }
    2045             : #endif
    2046     3628870 :   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     3752550 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2074     3752550 :   int res;
    2075     3752550 :   SwigPyObject *sobj;
    2076     3752550 :   int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
    2077             : 
    2078     3752550 :   if (!obj)
    2079             :     return SWIG_ERROR;
    2080     3752550 :   if (obj == Py_None && !implicit_conv) {
    2081       20040 :     if (ptr)
    2082       20040 :       *ptr = 0;
    2083       40080 :     return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
    2084             :   }
    2085             : 
    2086     3732510 :   res = SWIG_ERROR;
    2087             : 
    2088     3732510 :   sobj = SWIG_Python_GetSwigThis(obj);
    2089     3732510 :   if (own)
    2090           0 :     *own = 0;
    2091     3732510 :   while (sobj) {
    2092     3730420 :     void *vptr = sobj->ptr;
    2093     3730420 :     if (ty) {
    2094     3730420 :       swig_type_info *to = sobj->ty;
    2095     3730420 :       if (to == ty) {
    2096             :         /* no type cast needed */
    2097     3662100 :         if (ptr) *ptr = vptr;
    2098             :         break;
    2099             :       } else {
    2100       68317 :         swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2101       68317 :         if (!tc) {
    2102           1 :           sobj = (SwigPyObject *)sobj->next;
    2103             :         } else {
    2104       68316 :           if (ptr) {
    2105       68316 :             int newmemory = 0;
    2106       68316 :             *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2107       68316 :             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     3732510 :   if (sobj) {
    2122     3730420 :     if (own)
    2123           0 :       *own = *own | sobj->own;
    2124     3730420 :     if (flags & SWIG_POINTER_DISOWN) {
    2125      104193 :       sobj->own = 0;
    2126             :     }
    2127             :     res = SWIG_OK;
    2128             :   } else {
    2129        2090 :     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        4369 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
    2281             : {
    2282        4369 :  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        4369 :  dict = PyObject_GetAttrString(inst, "__dict__");
    2296        4369 :  PyDict_SetItem(dict, SWIG_This(), swig_this);
    2297        4369 :  Py_DECREF(dict);
    2298        4369 : } 
    2299             : 
    2300             : 
    2301             : SWIGINTERN PyObject *
    2302        4369 : SWIG_Python_InitShadowInstance(PyObject *args) {
    2303        4369 :   PyObject *obj[2];
    2304        4369 :   if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    2305             :     return NULL;
    2306             :   } else {
    2307        4369 :     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    2308        4369 :     if (sthis) {
    2309           0 :       SwigPyObject_append((PyObject*) sthis, obj[1]);
    2310             :     } else {
    2311        4369 :       SWIG_Python_SetSwigThis(obj[0], obj[1]);
    2312             :     }
    2313        4369 :     return SWIG_Py_Void();
    2314             :   }
    2315             : }
    2316             : 
    2317             : /* Create a new pointer object */
    2318             : 
    2319             : SWIGRUNTIME PyObject *
    2320      625337 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
    2321      625337 :   SwigPyClientData *clientdata;
    2322      625337 :   PyObject * robj;
    2323      625337 :   int own;
    2324             : 
    2325      625337 :   if (!ptr)
    2326       18101 :     return SWIG_Py_Void();
    2327             : 
    2328      607236 :   clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2329      607236 :   own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2330      607236 :   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      607236 :   assert(!(flags & SWIG_BUILTIN_TP_INIT));
    2361             : 
    2362      607236 :   robj = SwigPyObject_New(ptr, type, own);
    2363      607236 :   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2364      602557 :     PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2365      602557 :     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     2552200 :   SWIG_From_int  (int value)
    2932             : {
    2933     2552200 :   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      186975 : 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      373950 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2983             : 
    2984      186975 :     if( inputOutputBuf == Py_None )
    2985      186835 :         inputOutputBuf = NULL;
    2986             : 
    2987      186975 :     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      186900 :         *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3025      186900 :         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      186900 :         data = PyByteArray_AsString( (PyObject *)*buf );
    3037             :     }
    3038      186936 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3039             :     return true;
    3040             : }
    3041             : 
    3042      186936 : static void readraster_releasebuffer(CPLErr eErr,
    3043             :                                      void** buf,
    3044             :                                      void* inputOutputBuf,
    3045             :                                      Py_buffer& view)
    3046             : {
    3047      186936 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3048             : 
    3049      186936 :     if( inputOutputBuf )
    3050          36 :         PyBuffer_Release(&view);
    3051             : 
    3052      186936 :     if (eErr == CE_Failure)
    3053             :     {
    3054        1333 :         if( inputOutputBuf == NULL )
    3055        1333 :             Py_DECREF((PyObject*)*buf);
    3056        1333 :         *buf = NULL;
    3057             :     }
    3058      185603 :     else if( inputOutputBuf )
    3059             :     {
    3060          36 :         *buf = inputOutputBuf;
    3061          36 :         Py_INCREF((PyObject*)*buf);
    3062             :     }
    3063             : 
    3064      186936 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3065      186936 : }
    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     3015400 : 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       22461 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
    3089             : {
    3090       22461 :   PythonBindingErrorHandlerContext* ctxt = static_cast<
    3091       22461 :       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       22461 :   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       22461 :   else if (eclass != CE_Failure ) {
    3111       19786 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3112             :   }
    3113             :   else {
    3114        2675 :     ctxt->nLastCode = err_no;
    3115        2675 :     try
    3116             :     {
    3117        2675 :         if( ctxt->osFailureMsg.empty() ) {
    3118        2349 :           ctxt->osFailureMsg = msg;
    3119        2349 :           ctxt->osInitialMsg = ctxt->osFailureMsg;
    3120             :         } else {
    3121         326 :           if( ctxt->osFailureMsg.size() < 10000 ) {
    3122         652 :             std::string osTmp(msg);
    3123         326 :             osTmp += "\nMay be caused by: ";
    3124         326 :             osTmp += ctxt->osFailureMsg;
    3125         326 :             ctxt->osFailureMsg = std::move(osTmp);
    3126         326 :             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       22461 : }
    3143             : 
    3144             : 
    3145             : 
    3146             : 
    3147             : static
    3148     8250950 : int GetUseExceptions() {
    3149     5936250 :   return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
    3150             : }
    3151             : 
    3152       11394 : static int _GetExceptionsLocal()
    3153             : {
    3154       11394 :   return bUseExceptionsLocal;
    3155             : }
    3156             : 
    3157       22788 : static void _SetExceptionsLocal(int bVal)
    3158             : {
    3159       22788 :   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       58267 : 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     1058020 : SWIG_AsVal_double (PyObject *obj, double *val)
    3201             : {
    3202     1058020 :   int res = SWIG_TypeError;
    3203     1058020 :   if (PyFloat_Check(obj)) {
    3204       40421 :     if (val) *val = PyFloat_AsDouble(obj);
    3205       40421 :     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     1017600 :   } else if (PyLong_Check(obj)) {
    3212     1017600 :     double v = PyLong_AsDouble(obj);
    3213     1017600 :     if (!PyErr_Occurred()) {
    3214     1017600 :       if (val) *val = v;
    3215     1017600 :       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     2631040 : 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     2631040 :   if (PyLong_Check(obj)) {
    3291     2631040 :     long v = PyLong_AsLong(obj);
    3292     2631040 :     if (!PyErr_Occurred()) {
    3293     2631040 :       if (val) *val = v;
    3294     2631040 :       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     2622360 : SWIG_AsVal_int (PyObject * obj, int *val)
    3326             : {
    3327     2622360 :   long v;
    3328     5244730 :   int res = SWIG_AsVal_long (obj, &v);
    3329     2622360 :   if (SWIG_IsOK(res)) {
    3330     2622360 :     if ((v < INT_MIN || v > INT_MAX)) {
    3331             :       return SWIG_OverflowError;
    3332             :     } else {
    3333     2613670 :       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     4526910 : template<class T> static T ReturnSame(T x)
    3350             : {
    3351     4526910 :     if( bReturnSame )
    3352             :         return x;
    3353             :     return 0;
    3354             : }
    3355             : 
    3356     3015400 : static void pushErrorHandler()
    3357             : {
    3358     3015400 :     CPLErrorReset();
    3359     3015400 :     PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
    3360     3015400 :     CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
    3361     3015400 : }
    3362             : 
    3363     3015400 : static void popErrorHandler()
    3364             : {
    3365     3015400 :     PythonBindingErrorHandlerContext* ctxt = static_cast<
    3366     3015400 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3367     3015400 :     CPLPopErrorHandler();
    3368     3015400 :     if( ctxt->bMemoryError )
    3369             :     {
    3370           0 :         CPLErrorSetState(
    3371             :           CE_Failure, CPLE_OutOfMemory, "Out of memory");
    3372             :     }
    3373     3015400 :     else if( !ctxt->osFailureMsg.empty() )
    3374             :     {
    3375        2363 :       CPLErrorSetState(
    3376        2349 :           CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
    3377             :           ctxt->nLastCode, ctxt->osFailureMsg.c_str());
    3378             :     }
    3379     3015400 :     delete ctxt;
    3380     3015400 : }
    3381             : 
    3382             : 
    3383             : 
    3384             : 
    3385             : /* Return a PyObject* from a NULL terminated C String */
    3386             : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
    3387      116479 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    3388             : {
    3389      116479 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    3390    16809800 :   while(*pszIter != 0)
    3391             :   {
    3392    16693400 :     if (*pszIter > 127)
    3393             :     {
    3394         112 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
    3395         112 :         if (pyObj != NULL && !PyErr_Occurred())
    3396             :             return pyObj;
    3397           1 :         PyErr_Clear();
    3398           1 :         return PyBytes_FromString(pszStr);
    3399             :     }
    3400    16693300 :     pszIter ++;
    3401             :   }
    3402      116367 :   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      104128 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    3409             : {
    3410      104128 :   *pbToFree = 0;
    3411      104128 :   if (PyUnicode_Check(pyObject))
    3412             :   {
    3413      104126 :       char *pszStr;
    3414      104126 :       char *pszNewStr;
    3415      104126 :       Py_ssize_t nLen;
    3416      104126 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    3417      104126 :       if( pyUTF8Str == NULL )
    3418             :         return NULL;
    3419      104126 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3420      104126 :       pszNewStr = (char *) malloc(nLen+1);
    3421      104126 :       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      104126 :       memcpy(pszNewStr, pszStr, nLen+1);
    3429      104126 :       Py_XDECREF(pyUTF8Str);
    3430      104126 :       *pbToFree = 1;
    3431      104126 :       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       11391 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
    3461             : {
    3462       11391 :     PyObject* os = PyImport_ImportModule("os");
    3463       11391 :     if (os == NULL)
    3464             :     {
    3465             :         return NULL;
    3466             :     }
    3467             : 
    3468       11391 :     PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
    3469       11391 :     if (pathLike == NULL)
    3470             :     {
    3471           0 :         Py_DECREF(os);
    3472           0 :         return NULL;
    3473             :     }
    3474             : 
    3475       11391 :     if (!PyObject_IsInstance(pyObject, pathLike))
    3476             :     {
    3477           4 :         Py_DECREF(pathLike);
    3478           4 :         Py_DECREF(os);
    3479           4 :         return NULL;
    3480             :     }
    3481             : 
    3482       11387 :     PyObject* str = PyObject_Str(pyObject);
    3483       11387 :     char* ret = NULL;
    3484       11387 :     if (str != NULL)
    3485             :     {
    3486       11387 :         ret = GDALPythonObjectToCStr(str, pbToFree);
    3487       11387 :         Py_DECREF(str);
    3488             :     }
    3489             : 
    3490       11387 :     Py_DECREF(pathLike);
    3491       11387 :     Py_DECREF(os);
    3492             : 
    3493             :     return ret;
    3494             : }
    3495             : 
    3496             : 
    3497             : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
    3498      104132 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    3499             : {
    3500      104132 :    if (bToFree)
    3501      104126 :        free(ptr);
    3502             : }
    3503             : 
    3504             : 
    3505             : 
    3506       27538 : unsigned int wrapper_VSIFReadL( void **buf, unsigned int nMembSize, unsigned int nMembCount, VSILFILE *fp)
    3507             : {
    3508       27538 :     size_t buf_size = static_cast<size_t>(nMembSize) * nMembCount;
    3509       27538 :     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       27538 :     if (buf_size == 0)
    3517             :     {
    3518          12 :         *buf = NULL;
    3519          12 :         return 0;
    3520             :     }
    3521             : 
    3522       55064 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3523       27526 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3524       27526 :     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       27526 :     PyObject* o = (PyObject*) *buf;
    3536       27526 :     char *data = PyByteArray_AsString(o);
    3537       27526 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3538       27526 :     size_t nRet = (size_t)VSIFReadL( data, nMembSize, nMembCount, fp );
    3539       27526 :     if (nRet * (size_t)nMembSize < buf_size)
    3540             :     {
    3541       11149 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3542       11149 :         PyByteArray_Resize(o, nRet * nMembSize);
    3543       11149 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3544       11149 :         *buf = o;
    3545             :     }
    3546       27526 :     return static_cast<unsigned int>(nRet);
    3547             : }
    3548             : 
    3549             : 
    3550             : SWIGINTERN int
    3551       59259 : 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       59259 :   if (PyLong_Check(obj)) {
    3565       59259 :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3566       59259 :     if (!PyErr_Occurred()) {
    3567       59259 :       if (val) *val = v;
    3568       59259 :       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       58991 : SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
    3600             : {
    3601       58991 :   unsigned long v;
    3602      117982 :   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
    3603       58991 :   if (SWIG_IsOK(res)) {
    3604       58991 :     if ((v > UINT_MAX)) {
    3605             :       return SWIG_OverflowError;
    3606             :     } else {
    3607       58991 :       if (val) *val = static_cast< unsigned int >(v);
    3608             :     }
    3609             :   }  
    3610             :   return res;
    3611             : }
    3612             : 
    3613             : 
    3614             : SWIGINTERNINLINE PyObject*
    3615       27538 :   SWIG_From_unsigned_SS_int  (unsigned int value)
    3616             : {
    3617       27538 :   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       10060 : SWIG_pchar_descriptor(void)
    3629             : {
    3630       10060 :   static int init = 0;
    3631       10060 :   static swig_type_info* info = 0;
    3632       10060 :   if (!init) {
    3633          53 :     info = SWIG_TypeQuery("_p_char");
    3634          53 :     init = 1;
    3635             :   }
    3636       10060 :   return info;
    3637             : }
    3638             : 
    3639             : 
    3640             : SWIGINTERN int
    3641      584200 : 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      584200 :   if (PyUnicode_Check(obj))
    3648             : #endif
    3649             : #else  
    3650             :   if (PyString_Check(obj))
    3651             : #endif
    3652             :   {
    3653      574140 :     char *cstr; Py_ssize_t len;
    3654      574140 :     int ret = SWIG_OK;
    3655             : #if PY_VERSION_HEX>=0x03000000
    3656             : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3657      574140 :     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      574140 :     obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3665      574140 :     if (!obj)
    3666             :       return SWIG_TypeError;
    3667      574140 :     if (alloc)
    3668      574004 :       *alloc = SWIG_NEWOBJ;
    3669             : #endif
    3670      574140 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3671             : #else
    3672             :     PyString_AsStringAndSize(obj, &cstr, &len);
    3673             : #endif
    3674      574140 :     if (cptr) {
    3675      574004 :       if (alloc) {
    3676      574004 :   if (*alloc == SWIG_NEWOBJ) {
    3677      574004 :     *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3678      574004 :     *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      574140 :     if (psize) *psize = len + 1;
    3698             : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3699      574140 :     Py_XDECREF(obj);
    3700             : #endif
    3701      574140 :     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       10060 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3733       10060 :     if (pchar_descriptor) {
    3734       10060 :       void* vptr = 0;
    3735       10060 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3736        8248 :   if (cptr) *cptr = (char *) vptr;
    3737        8248 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3738        8248 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3739        8248 :   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        7929 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3767             : 
    3768             : {
    3769        7929 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3770        7929 :     PyObject *psArgs, *psResult;
    3771        7929 :     int      bContinue = TRUE;
    3772             : 
    3773        7929 :     if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3774             :         return TRUE;
    3775             : 
    3776        3903 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3777             :         return TRUE;
    3778             : 
    3779        3903 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3780             : 
    3781        3903 :     if( pszMessage == NULL )
    3782         805 :         pszMessage = "";
    3783             : 
    3784       11832 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3785             : 
    3786        3903 :     if( psInfo->psPyCallbackData == NULL )
    3787        2728 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3788             :     else
    3789        1175 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
    3790             :                          psInfo->psPyCallbackData );
    3791             : 
    3792        3903 :     psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
    3793        3903 :     Py_XDECREF(psArgs);
    3794             : 
    3795        3903 :     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        3902 :     if( psResult == NULL )
    3804             :     {
    3805           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3806             :         return TRUE;
    3807             :     }
    3808             : 
    3809        3902 :     if( psResult == Py_None )
    3810             :     {
    3811          14 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3812             :         return TRUE;
    3813             :     }
    3814             : 
    3815        3888 :     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        3887 :     Py_XDECREF(psResult);
    3825        3887 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3826             : 
    3827        3887 :     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         797 : void CPL_STDCALL PyCPLErrorHandler(CPLErr eErrClass, CPLErrorNum err_no, const char* pszErrorMsg)
    3855             : {
    3856         797 :     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         797 :     void* user_data = CPLGetErrorHandlerUserData();
    3864         797 :     PyObject *psArgs;
    3865             : 
    3866        1594 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3867             : 
    3868         797 :     psArgs = Py_BuildValue("(iis)", eErrClass, err_no, pszErrorMsg );
    3869         797 :     PyObject_CallObject( (PyObject*)user_data, psArgs);
    3870         797 :     Py_XDECREF(psArgs);
    3871             : 
    3872         797 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3873             : }
    3874             : 
    3875             : 
    3876       30130 :   CPLErr PushErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3877             :   {
    3878       30130 :     if( pfnErrorHandler == NULL )
    3879          76 :         CPLPushErrorHandler(CPLQuietErrorHandler);
    3880             :     else
    3881       30054 :         CPLPushErrorHandlerEx(pfnErrorHandler, user_data);
    3882       30130 :     return CE_None;
    3883             :   }
    3884             : 
    3885             : 
    3886       30125 :   void PopErrorHandler()
    3887             :   {
    3888       30125 :      void* user_data = CPLGetErrorHandlerUserData();
    3889       30125 :      if( user_data != NULL )
    3890             :      {
    3891        1547 :          Py_XDECREF((PyObject*)user_data);
    3892             :      }
    3893       30125 :      CPLPopErrorHandler();
    3894       30125 :   }
    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      347086 : GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    3909      347086 :   {
    3910      347086 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    3911             :     {
    3912        6634 :       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        6634 :       *viewIsValid = true;
    3918        6634 :       *nLen = (int) view->len;
    3919        6634 :       *pBuf = (char*) view->buf;
    3920        6634 :       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      200374 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    3968             : {
    3969      200374 :   if (carray) {
    3970      141771 :     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      141771 :       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       58603 :     return SWIG_Py_Void();
    3987             :   }
    3988             : }
    3989             : 
    3990             : 
    3991             : SWIGINTERNINLINE PyObject * 
    3992      200374 : SWIG_FromCharPtr(const char *cptr)
    3993             : { 
    3994      200374 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3995             : }
    3996             : 
    3997             : 
    3998        3287 : char **wrapper_VSIReadDirEx( const char * utf8_path, int nMaxFiles = 0 )
    3999             : {
    4000        3287 :     return VSIReadDirEx(utf8_path, nMaxFiles);
    4001             : }
    4002             : 
    4003             : 
    4004        7393 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
    4005             : {
    4006        7393 :   PyObject* res;
    4007        7393 :   if ( stringarray == NULL ) {
    4008        3667 :     res = Py_None;
    4009        3667 :     Py_INCREF( res );
    4010             :   }
    4011             :   else {
    4012        3726 :     int len = CSLCount( stringarray );
    4013        3726 :     res = PyList_New( len );
    4014        3726 :     if( !res ) {
    4015           0 :       *pbErr = true;
    4016           0 :       return res;
    4017             :     }
    4018       28769 :     for ( int i = 0; i < len; ++i ) {
    4019       25043 :       PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    4020       25043 :       PyList_SetItem(res, i, o );
    4021             :     }
    4022             :   }
    4023        7393 :   *pbErr = false;
    4024        7393 :   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       18654 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
    4040             : 
    4041             : {
    4042       18654 :   *pbErr = FALSE;
    4043             :   /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    4044       18654 :   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       18654 :   Py_ssize_t size = PySequence_Size(pySeq);
    4051       18654 :   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       18654 :   if( size == 0 ) {
    4057             :     return NULL;
    4058             :   }
    4059       13041 :   char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
    4060       13041 :   if( !papszRet ) {
    4061           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4062           0 :     *pbErr = TRUE;
    4063           0 :     return NULL;
    4064             :   }
    4065      111352 :   for (int i = 0; i < (int)size; i++) {
    4066       98312 :     PyObject* pyObj = PySequence_GetItem(pySeq,i);
    4067       98312 :     if (PyUnicode_Check(pyObj))
    4068             :     {
    4069       98308 :       char *pszStr;
    4070       98308 :       Py_ssize_t nLen;
    4071       98308 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4072       98308 :       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       98308 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4081       98308 :       papszRet[i] = VSIStrdup(pszStr);
    4082      193662 :       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       98311 :     Py_DECREF(pyObj);
    4095       98311 :     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         694 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
    4108             : 
    4109             : {
    4110         694 :     char** retCSL = NULL;
    4111         694 :     Py_ssize_t size = PyMapping_Length( pyObj );
    4112         694 :     if ( size > 0 && size == (int)size) {
    4113         285 :       PyObject *item_list = PyMapping_Items( pyObj );
    4114        1253 :       for( int i=0; i<(int)size; i++ ) {
    4115         971 :         PyObject *it = PySequence_GetItem( item_list, i );
    4116             : 
    4117         971 :         PyObject *k, *v;
    4118         971 :         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         971 :         PyObject* kStr = PyObject_Str(k);
    4128         971 :         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         970 :         PyObject* vStr;
    4138         970 :         if( PyBytes_Check(v) )
    4139             :         {
    4140           2 :             vStr = v;
    4141           2 :             Py_INCREF(vStr);
    4142             :         }
    4143             :         else
    4144             :         {
    4145         968 :             vStr = PyObject_Str(v);
    4146         968 :             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         969 :         int bFreeK, bFreeV;
    4158         969 :         char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
    4159         969 :         char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
    4160         969 :         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         968 :         retCSL = CSLAddNameValue( retCSL, pszK, pszV );
    4174             : 
    4175         968 :         GDALPythonFreeCStr(pszK, bFreeK);
    4176         968 :         GDALPythonFreeCStr(pszV, bFreeV);
    4177         968 :         Py_DECREF(kStr);
    4178         968 :         Py_DECREF(vStr);
    4179         968 :         Py_DECREF(it);
    4180             :       }
    4181         282 :       Py_DECREF(item_list);
    4182             :     }
    4183         691 :     *pbErr = FALSE;
    4184         691 :     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       13866 :   SWIG_From_bool  (bool value)
    4203             : {
    4204       13866 :   return PyBool_FromLong(value ? 1 : 0);
    4205             : }
    4206             : 
    4207             : 
    4208             : /* Return a PyObject* from a C String */
    4209       90834 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
    4210             : {
    4211       90834 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    4212     1619600 :   for( size_t i = 0; i < nLen; ++i)
    4213             :   {
    4214     1528770 :     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       90831 :   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       97640 :     for (char** iter = stringarray; *iter; ++iter ) {
    4232       91113 :       const char* pszSep = strchr( *iter, '=' );
    4233       91113 :       if ( pszSep != NULL) {
    4234       90834 :         const char* keyptr = *iter;
    4235       90834 :         const char* valptr = pszSep + 1;
    4236       90834 :         PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
    4237       90834 :         PyObject *val = GDALPythonObjectFromCStr( valptr );
    4238       90834 :         PyDict_SetItem(dict, nm, val );
    4239       90834 :         Py_DECREF(nm);
    4240       91113 :         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       22447 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4291             : {
    4292       22447 :     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        3067 : const char *wrapper_CPLGetThreadLocalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4299             : {
    4300        3067 :     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        3596 : VSI_RETVAL wrapper_VSIFileFromMemBuffer( const char* utf8_path, GIntBig nBytes, const char *pabyData)
    4343             : {
    4344        3596 :     const size_t nSize = static_cast<size_t>(nBytes);
    4345        3596 :     void* pabyDataDup = VSIMalloc(nSize);
    4346        3596 :     if (pabyDataDup == NULL)
    4347             :             return -1;
    4348        3596 :     memcpy(pabyDataDup, pabyData, nSize);
    4349        3596 :     VSILFILE *fp = VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nSize, TRUE);
    4350             : 
    4351        3596 :     if (fp == NULL) {
    4352           1 :         VSIFree(pabyDataDup);
    4353           1 :         return -1;
    4354             :     } else {
    4355        3595 :         VSIFCloseL(fp);
    4356        3595 :         return 0;
    4357             :     }
    4358             : }
    4359             : 
    4360             : 
    4361             : static bool
    4362      189784 : GetBufferAsCharPtrGIntBigSize( PyObject* input, GIntBig *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    4363      189784 :   {
    4364      189784 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    4365             :     {
    4366      180364 :       *viewIsValid = true;
    4367      180364 :       *nLen = view->len;
    4368      180364 :       *pBuf = (char*) view->buf;
    4369      180364 :       return true;
    4370             :     }
    4371             :     else
    4372             :     {
    4373        9420 :       PyErr_Clear();
    4374             :     }
    4375             :   }
    4376        9420 :   if (PyUnicode_Check(input))
    4377             :   {
    4378        9418 :     size_t safeLen = 0;
    4379        9418 :     int ret;
    4380        9418 :     try {
    4381        9418 :       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        9418 :     if (!SWIG_IsOK(ret)) {
    4389           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    4390           0 :       return false;
    4391             :     }
    4392             : 
    4393        9418 :     if (safeLen) safeLen--;
    4394        9418 :     *nLen = (GIntBig)safeLen;
    4395        9418 :     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        4846 : SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    4499        9692 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    4500        4846 :     self->mode = psStatBuf->mode;
    4501        4846 :     self->size = psStatBuf->size;
    4502        4846 :     self->mtime = psStatBuf->mtime;
    4503        4846 :     return self;
    4504             :   }
    4505        4846 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    4506        4846 :     CPLFree(self);
    4507        4846 :   }
    4508        2529 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    4509        2529 :      return (self->mode & S_IFDIR) != 0;
    4510             :   }
    4511             : 
    4512        6370 : int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
    4513             : {
    4514        6370 :     VSIStatBufL sStat;
    4515        6370 :     memset(&sStat, 0, sizeof(sStat));
    4516        6370 :     memset(psStatBufOut, 0, sizeof(StatBuf));
    4517        6370 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    4518        6370 :     psStatBufOut->mode = sStat.st_mode;
    4519        6370 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    4520        6370 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    4521        6370 :     return nRet;
    4522             : }
    4523             : 
    4524             : 
    4525        4593 : VSILFILE   *wrapper_VSIFOpenL( const char *utf8_path, const char *pszMode )
    4526             : {
    4527        4593 :     if (!pszMode) /* would lead to segfault */
    4528           0 :         pszMode = "r";
    4529        4593 :     return VSIFOpenL( utf8_path, pszMode );
    4530             : }
    4531             : 
    4532             : 
    4533         427 : VSILFILE   *wrapper_VSIFOpenExL( const char *utf8_path, const char *pszMode, int bSetError = FALSE, char** options = NULL )
    4534             : {
    4535         427 :     if (!pszMode) /* would lead to segfault */
    4536           0 :         pszMode = "r";
    4537         427 :     return VSIFOpenEx2L( utf8_path, pszMode, bSetError, options );
    4538             : }
    4539             : 
    4540             : 
    4541             : 
    4542       65964 : int wrapper_VSIFSeekL( VSILFILE* fp, GIntBig offset, int whence) {
    4543             : 
    4544             : 
    4545             : 
    4546       65964 : 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       65963 : return VSIFSeekL(fp, offset, whence);
    4560             : }
    4561             : 
    4562             : 
    4563      346835 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE* fp)
    4564             : {
    4565      346835 :     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      346835 :     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         268 : SWIG_AsVal_size_t (PyObject * obj, size_t *val)
    4701             : {
    4702         268 :   int res = SWIG_TypeError;
    4703             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4704         268 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    4705             : #endif
    4706         268 :     unsigned long v;
    4707         536 :     res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    4708         268 :     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         268 :   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        2490 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    4742        2490 :     return GDALGetDescription( self );
    4743             :   }
    4744          51 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    4745          51 :     GDALSetDescription( self, pszNewDesc );
    4746          51 :   }
    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       57022 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    4766       57022 :     return GDALGetMetadataItem( self, pszName, pszDomain);
    4767             :   }
    4768         494 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    4769         494 :     return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
    4770             :   }
    4771       17404 : 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       34808 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self,
    4774             :                                                                 utf8_path,
    4775             :                                                                 xsize,
    4776             :                                                                 ysize,
    4777             :                                                                 bands,
    4778             :                                                                 eType,
    4779             :                                                                 options );
    4780       17404 :     return ds;
    4781             :   }
    4782         182 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateVector(GDALDriverShadow *self,char const *utf8_path,char **options=0){
    4783         364 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(self, utf8_path, 0, 0, 0, GDT_Unknown, options);
    4784         182 :     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        3890 : 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        7780 :     GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self,
    4797             :                                                                     utf8_path,
    4798             :                                                                     src,
    4799             :                                                                     strict,
    4800             :                                                                     options,
    4801             :                                                                     callback,
    4802             :                                                                     callback_data );
    4803        3890 :     return ds;
    4804             :   }
    4805        2361 : SWIGINTERN CPLErr GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    4806        2361 :     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       14132 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
    4938       14132 :   PyObject *out = PyTuple_New( size );
    4939       66751 :   for( unsigned int i=0; i<size; i++ ) {
    4940       52619 :     PyObject *val = PyFloat_FromDouble( *first );
    4941       52619 :     ++first;
    4942       52619 :     PyTuple_SetItem( out, i, val );
    4943             :   }
    4944       14132 :   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      353164 : 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      353164 :     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      353162 :     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      353162 :     if (nPixelSize == 0)
    5005             :     {
    5006           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    5007           1 :         return 0;
    5008             :     }
    5009             : 
    5010      353161 :     if( nPixelSpace == 0 )
    5011      352038 :         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      353161 :     if( nLineSpace == 0 )
    5019             :     {
    5020      353122 :         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      353161 :     if( nBandSpace == 0 )
    5029             :     {
    5030      352060 :         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      353161 :     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      353161 :     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      353161 :     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       56099 : SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    5160       56099 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    5161       49175 :       if( GDALClose(self) != CE_None )
    5162             :       {
    5163           7 :           if( CPLGetLastErrorType() == CE_None )
    5164           1 :               CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALClose()");
    5165             :       }
    5166             :     }
    5167       56099 :   }
    5168           4 : SWIGINTERN void GDALDatasetShadow_MarkSuppressOnClose(GDALDatasetShadow *self){
    5169           4 :     GDALDatasetMarkSuppressOnClose(self);
    5170           4 :   }
    5171        3880 : SWIGINTERN CPLErr GDALDatasetShadow_Close(GDALDatasetShadow *self){
    5172        3880 :      return GDALClose(self);
    5173             :   }
    5174          12 : SWIGINTERN CPLErr GDALDatasetShadow__RunCloseWithoutDestroying(GDALDatasetShadow *self){
    5175          12 :      CPLErr eErr = GDALDatasetRunCloseWithoutDestroying(self);
    5176          12 :      if (eErr != CE_None && CPLGetLastErrorType() == CE_None ) {
    5177           0 :        CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALDatasetRunCloseWithoutDestroying()");
    5178             :      }
    5179          12 :      return eErr;
    5180             :   }
    5181        1328 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    5182        1328 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    5183             :   }
    5184      360299 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    5185      360299 :     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        1185 : SWIGINTERN GDALGroupHS *GDALDatasetShadow_GetRootGroup(GDALDatasetShadow *self){
    5194        1185 :     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        3887 : SWIGINTERN int GDALDatasetShadow_GetRefCount(GDALDatasetShadow *self){
    5203        3887 :     return OGR_DS_GetRefCount(self);
    5204             :   }
    5205           0 : SWIGINTERN int GDALDatasetShadow_GetSummaryRefCount(GDALDatasetShadow *self){
    5206           0 :     return OGR_DS_GetSummaryRefCount(self);
    5207             :   }
    5208        1233 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow *self){
    5209        1233 :     OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
    5210        1233 :     if( ref )
    5211         813 :        ref = OSRClone( ref );
    5212        1233 :     return (OSRSpatialReferenceShadow*) ref;
    5213             :   }
    5214        1630 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    5215        1630 :     return GDALSetProjection( self, prj );
    5216             :   }
    5217         302 : SWIGINTERN CPLErr GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow *self,OSRSpatialReferenceShadow *srs){
    5218         302 :      return GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
    5219             :   }
    5220        3978 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    5221        3978 :     if (can_return_null && *can_return_null)
    5222             :     {
    5223         403 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    5224             :     }
    5225             :     else
    5226             :     {
    5227        3575 :         *isvalid = TRUE;
    5228        3575 :         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        3978 :   }
    5238        2910 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    5239        2910 :     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      354016 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
    5254             :   /* check if is List */
    5255      354016 :   if ( !PySequence_Check(pySeq) ) {
    5256           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    5257           1 :     *pnSize = -1;
    5258           1 :     return NULL;
    5259             :   }
    5260      354015 :   Py_ssize_t size = PySequence_Size(pySeq);
    5261      354015 :   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      354015 :   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      354015 :   *pnSize = (int)size;
    5272      354015 :   int* ret = (int*) malloc((*pnSize)*sizeof(int));
    5273      354015 :   if( !ret ) {
    5274           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    5275           0 :     *pnSize = -1;
    5276           0 :     return NULL;
    5277             :   }
    5278      798239 :   for( int i = 0; i<*pnSize; i++ ) {
    5279      444225 :     PyObject *o = PySequence_GetItem(pySeq,i);
    5280      444225 :     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      444224 :     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          32 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    5330          32 :     return GDALAddBand( self, datatype, options );
    5331             :   }
    5332          59 : SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
    5333          59 :       return GDALCreateDatasetMaskBand( self, nFlags );
    5334             :   }
    5335         460 : SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    5336         460 :     return GDALGetFileList( self );
    5337             :   }
    5338      176515 : 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      176515 :     CPLErr eErr;
    5340      176515 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5341      176515 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5342      176515 :     GDALDataType ntype;
    5343      176515 :     if ( buf_type != 0 ) {
    5344      176515 :       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      176515 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5353      176515 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5354      176515 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5355             : 
    5356      176515 :     GIntBig min_buffer_size =
    5357      176515 :       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      176515 :     if (min_buffer_size == 0)
    5361             :         return CE_Failure;
    5362             : 
    5363      176514 :     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      176513 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    5370             : 
    5371      176513 :     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      176513 :     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        6096 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayer(GDALDatasetShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    5552       12192 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self,
    5553             :                                   name,
    5554             :                                   srs,
    5555             :                                   geom_type,
    5556             :                                   options);
    5557        6096 :     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        5902 : SWIG_AsVal_bool (PyObject *obj, bool *val)
    5613             : {
    5614        5902 :   int r;
    5615        5902 :   if (!PyBool_Check(obj))
    5616             :     return SWIG_ERROR;
    5617        5901 :   r = PyObject_IsTrue(obj);
    5618        5901 :   if (r == -1)
    5619             :     return SWIG_ERROR;
    5620        5901 :   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        9378 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByIndex(GDALDatasetShadow *self,int index=0){
    5652             : 
    5653             : 
    5654             : 
    5655       18756 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayer(self, index);
    5656        9378 :     return layer;
    5657             :   }
    5658        2729 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByName(GDALDatasetShadow *self,char const *layer_name){
    5659        5458 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayerByName(self, layer_name);
    5660        2729 :     return layer;
    5661             :   }
    5662          14 : SWIGINTERN void GDALDatasetShadow_ResetReading(GDALDatasetShadow *self){
    5663          14 :     GDALDatasetResetReading(self);
    5664          14 :   }
    5665        1442 : SWIGINTERN int GDALDatasetShadow_GetLayerCount(GDALDatasetShadow *self){
    5666        1442 :     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          14 : SWIGINTERN GDALMDArrayHS *GDALDatasetShadow_AsMDArray(GDALDatasetShadow *self,char **options=NULL){
    5721          14 :     return GDALDatasetAsMDArray(self, options);
    5722             :   }
    5723      176649 : 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){
    5724      176649 :     *buf = NULL;
    5725             : 
    5726      176649 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    5727      176649 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    5728      176649 :     GDALDataType ntype;
    5729      176649 :     if ( buf_type != 0 ) {
    5730      176649 :       ntype = *buf_type;
    5731             :     } else {
    5732           0 :       int lastband = GDALGetRasterCount( self ) - 1;
    5733           0 :       if (lastband < 0)
    5734             :       {
    5735             :           return CE_Failure;
    5736             :       }
    5737           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5738             :     }
    5739             : 
    5740      176649 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5741      176649 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5742      176649 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5743             : 
    5744      176649 :     int ntypesize = GDALGetDataTypeSizeBytes( ntype );
    5745      176649 :     size_t buf_size = static_cast<size_t>(
    5746      176649 :         ComputeDatasetRasterIOSize (nxsize, nysize, ntypesize,
    5747             :                                     band_list ? band_list :
    5748           0 :                                         GDALGetRasterCount(self),
    5749             :                                     pband_list, band_list,
    5750             :                                     pixel_space, line_space, band_space,
    5751      176649 :                                     FALSE));
    5752      176649 :     if (buf_size == 0)
    5753             :     {
    5754             :         return CE_Failure;
    5755             :     }
    5756             : 
    5757      176647 :     char *data;
    5758      176647 :     Py_buffer view;
    5759             : 
    5760      346134 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    5761             :                                   GetUseExceptions(), data, view) )
    5762             :     {
    5763             :         return CE_Failure;
    5764             :     }
    5765             : 
    5766      176634 :     if( inputOutputBuf == NULL )
    5767             :     {
    5768             :         /* Should we clear the buffer in case there are hole in it ? */
    5769      176622 :         if( line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    5770             :         {
    5771           4 :             memset(data, 0, buf_size);
    5772             :         }
    5773      176618 :         else if( band_list > 1 && band_space != 0 )
    5774             :         {
    5775        1069 :             if( line_space != 0 && band_space > line_space * nysize )
    5776           0 :                 memset(data, 0, buf_size);
    5777        1069 :             else if( pixel_space != 0 && band_space < pixel_space &&
    5778        1063 :                      pixel_space != (GIntBig)GDALGetRasterCount(self) * ntypesize )
    5779         160 :                 memset(data, 0, buf_size);
    5780             :         }
    5781             :     }
    5782             : 
    5783      176634 :     GDALRasterIOExtraArg sExtraArg;
    5784      176634 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    5785      176634 :     sExtraArg.eResampleAlg = resample_alg;
    5786      176634 :     sExtraArg.pfnProgress = callback;
    5787      176634 :     sExtraArg.pProgressData = callback_data;
    5788             : 
    5789      176634 :     int nXOff = (int)(xoff + 0.5);
    5790      176634 :     int nYOff = (int)(yoff + 0.5);
    5791      176634 :     int nXSize = (int)(xsize + 0.5);
    5792      176634 :     int nYSize = (int)(ysize + 0.5);
    5793      176634 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    5794      176625 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    5795             :     {
    5796          11 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    5797          11 :         sExtraArg.dfXOff = xoff;
    5798          11 :         sExtraArg.dfYOff = yoff;
    5799          11 :         sExtraArg.dfXSize = xsize;
    5800          11 :         sExtraArg.dfYSize = ysize;
    5801             :     }
    5802             : 
    5803      176634 :     CPLErr eErr = GDALDatasetRasterIOEx(self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    5804             :                                data, nxsize, nysize, ntype,
    5805             :                                band_list, pband_list, pixel_space, line_space, band_space,
    5806             :                                &sExtraArg );
    5807             : 
    5808      176634 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    5809             : 
    5810             :     return eErr;
    5811             : }
    5812             : 
    5813       19890 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    5814       19890 :   return GDALGetRasterXSize( h );
    5815             : }
    5816       20154 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    5817       20154 :   return GDALGetRasterYSize( h );
    5818             : }
    5819      355383 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    5820      355383 :   return GDALGetRasterCount( h );
    5821             : }
    5822             : 
    5823          12 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    5824          12 :         return (GDALRasterAttributeTableShadow*)
    5825          12 :     GDALCreateRasterAttributeTable();
    5826             :     }
    5827          19 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    5828          19 :         GDALDestroyRasterAttributeTable(self);
    5829          19 :     }
    5830           5 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    5831           5 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    5832             :     }
    5833          48 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){
    5834          48 :         return GDALRATGetColumnCount( self );
    5835             :     }
    5836         118 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5837         118 :         return GDALRATGetNameOfCol( self, iCol );
    5838             :     }
    5839          61 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5840          61 :         return GDALRATGetUsageOfCol( self, iCol );
    5841             :     }
    5842         254 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5843         254 :         return GDALRATGetTypeOfCol( self, iCol );
    5844             :     }
    5845          13 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    5846          13 :         return GDALRATGetColOfUsage( self, eUsage );
    5847             :     }
    5848         235 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){
    5849         235 :         return GDALRATGetRowCount( self );
    5850             :     }
    5851          90 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5852          90 :         return GDALRATGetValueAsString( self, iRow, iCol );
    5853             :     }
    5854         166 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5855         166 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    5856             :     }
    5857          92 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5858          92 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    5859             :     }
    5860           8 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsString(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,char **ppszData){
    5861           8 :         return GDALRATValuesIOAsString(self, GF_Read, iField, iStartRow, iLength, ppszData);
    5862             :     }
    5863          10 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,int *pnData){
    5864          10 :         return GDALRATValuesIOAsInteger(self, GF_Read, iField, iStartRow, iLength, pnData);
    5865             :     }
    5866           8 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,double *pdfData){
    5867           8 :         return GDALRATValuesIOAsDouble(self, GF_Read, iField, iStartRow, iLength, pdfData);
    5868             :     }
    5869          37 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){
    5870          37 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    5871          37 :     }
    5872          49 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){
    5873          49 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    5874          49 :     }
    5875          35 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){
    5876          35 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    5877          35 :     }
    5878           7 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    5879           7 :         GDALRATSetRowCount( self, nCount );
    5880           7 :     }
    5881          31 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    5882          62 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    5883             :     }
    5884           1 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    5885           2 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    5886             :     }
    5887           1 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    5888           2 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    5889             :     }
    5890           3 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    5891           3 :         return GDALRATGetRowOfValue( self, dfValue );
    5892             :     }
    5893           2 : SWIGINTERN int GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(GDALRasterAttributeTableShadow *self){
    5894           2 :         return GDALRATChangesAreWrittenToFile( self );
    5895             :     }
    5896           0 : SWIGINTERN void GDALRasterAttributeTableShadow_DumpReadable(GDALRasterAttributeTableShadow *self){
    5897           0 :         GDALRATDumpReadable( self, NULL );
    5898           0 :     }
    5899           3 : SWIGINTERN void GDALRasterAttributeTableShadow_SetTableType(GDALRasterAttributeTableShadow *self,GDALRATTableType eTableType){
    5900           3 :         GDALRATSetTableType( self, eTableType );
    5901           3 :     }
    5902          10 : SWIGINTERN GDALRATTableType GDALRasterAttributeTableShadow_GetTableType(GDALRasterAttributeTableShadow *self){
    5903          10 :         return GDALRATGetTableType( self );
    5904             :     }
    5905           1 : SWIGINTERN void GDALRasterAttributeTableShadow_RemoveStatistics(GDALRasterAttributeTableShadow *self){
    5906           1 :         GDALRATRemoveStatistics(self);
    5907           1 :     }
    5908        1455 : SWIGINTERN void delete_GDALGroupHS(GDALGroupHS *self){
    5909        1455 :     GDALGroupRelease(self);
    5910        1455 :   }
    5911          95 : SWIGINTERN char const *GDALGroupHS_GetName(GDALGroupHS *self){
    5912          95 :     return GDALGroupGetName(self);
    5913             :   }
    5914          47 : SWIGINTERN char const *GDALGroupHS_GetFullName(GDALGroupHS *self){
    5915          47 :     return GDALGroupGetFullName(self);
    5916             :   }
    5917         329 : SWIGINTERN char **GDALGroupHS_GetMDArrayNames(GDALGroupHS *self,char **options=0){
    5918         329 :     return GDALGroupGetMDArrayNames( self, options );
    5919             :   }
    5920           1 : SWIGINTERN char **GDALGroupHS_GetMDArrayFullNamesRecursive(GDALGroupHS *self,char **groupOptions=0,char **arrayOptions=0){
    5921           1 :     return GDALGroupGetMDArrayFullNamesRecursive( self, groupOptions, arrayOptions );
    5922             :   }
    5923         811 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArray(GDALGroupHS *self,char const *name,char **options=0){
    5924             : 
    5925         811 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5926             : 
    5927         811 :     GDALMDArrayH hRet = GDALGroupOpenMDArray(self, name, options);
    5928             : 
    5929         935 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5930          17 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5931             : 
    5932         811 :     return hRet;
    5933             :   }
    5934          17 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArrayFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5935             : 
    5936          17 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5937             : 
    5938          17 :     GDALMDArrayH hRet = GDALGroupOpenMDArrayFromFullname(self, name, options);
    5939             : 
    5940          25 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5941           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5942             : 
    5943          17 :     return hRet;
    5944             :   }
    5945          19 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_ResolveMDArray(GDALGroupHS *self,char const *name,char const *starting_point,char **options=0){
    5946             : 
    5947          19 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5948             : 
    5949          19 :     GDALMDArrayH hRet = GDALGroupResolveMDArray(self, name, starting_point, options);
    5950             : 
    5951          19 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5952           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5953             : 
    5954          19 :     return hRet;
    5955             :   }
    5956          98 : SWIGINTERN char **GDALGroupHS_GetGroupNames(GDALGroupHS *self,char **options=0){
    5957          98 :     return GDALGroupGetGroupNames( self, options );
    5958             :   }
    5959         163 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroup(GDALGroupHS *self,char const *name,char **options=0){
    5960             : 
    5961         163 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5962             : 
    5963         163 :     GDALGroupH hRet = GDALGroupOpenGroup(self, name, options);
    5964             : 
    5965         171 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5966          12 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5967             : 
    5968         163 :     return hRet;
    5969             :   }
    5970           3 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroupFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5971             : 
    5972           3 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5973             : 
    5974           3 :     GDALGroupH hRet = GDALGroupOpenGroupFromFullname(self, name, options);
    5975             : 
    5976           3 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5977           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5978             : 
    5979           3 :     return hRet;
    5980             :   }
    5981           8 : SWIGINTERN char **GDALGroupHS_GetVectorLayerNames(GDALGroupHS *self,char **options=0){
    5982           8 :     return GDALGroupGetVectorLayerNames( self, options );
    5983             :   }
    5984          12 : SWIGINTERN OGRLayerShadow *GDALGroupHS_OpenVectorLayer(GDALGroupHS *self,char const *name,char **options=0){
    5985             : 
    5986          12 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5987             : 
    5988          12 :     OGRLayerH hRet = GDALGroupOpenVectorLayer(self, name, options);
    5989             : 
    5990          12 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5991           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Vector layer %s does not exist", name);
    5992             : 
    5993          12 :     return (OGRLayerShadow*) hRet;
    5994             :   }
    5995          73 : SWIGINTERN void GDALGroupHS_GetDimensions(GDALGroupHS *self,GDALDimensionHS ***pdims,size_t *pnCount,char **options=0){
    5996         146 :     *pdims = GDALGroupGetDimensions(self, pnCount, options);
    5997             :   }
    5998          80 : SWIGINTERN GDALAttributeHS *GDALGroupHS_GetAttribute(GDALGroupHS *self,char const *name){
    5999             : 
    6000          80 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    6001             : 
    6002          80 :     GDALAttributeH hRet = GDALGroupGetAttribute(self, name);
    6003             : 
    6004          85 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    6005           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    6006             : 
    6007          80 :     return hRet;
    6008             :   }
    6009          71 : SWIGINTERN void GDALGroupHS_GetAttributes(GDALGroupHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6010         142 :     *pattrs = GDALGroupGetAttributes(self, pnCount, options);
    6011             :   }
    6012           4 : SWIGINTERN char **GDALGroupHS_GetStructuralInfo(GDALGroupHS *self){
    6013           4 :     return GDALGroupGetStructuralInfo( self );
    6014             :   }
    6015         179 : SWIGINTERN GDALGroupHS *GDALGroupHS_CreateGroup(GDALGroupHS *self,char const *name,char **options=0){
    6016         179 :     return GDALGroupCreateGroup(self, name, options);
    6017             :   }
    6018          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteGroup(GDALGroupHS *self,char const *name,char **options=0){
    6019          20 :     return GDALGroupDeleteGroup(self, name, options) ? CE_None : CE_Failure;
    6020             :   }
    6021         659 : SWIGINTERN GDALDimensionHS *GDALGroupHS_CreateDimension(GDALGroupHS *self,char const *name,char const *dim_type,char const *direction,GUIntBig size,char **options=0){
    6022         659 :     return GDALGroupCreateDimension(self, name, dim_type, direction, size, options);
    6023             :   }
    6024         608 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_CreateMDArray(GDALGroupHS *self,char const *name,int dimensions,GDALDimensionHS **dimensionsValues,GDALExtendedDataTypeHS *data_type,char **options=0){
    6025         608 :     return GDALGroupCreateMDArray(self, name, dimensions, dimensionsValues,
    6026             :                                   data_type, options);
    6027             :   }
    6028          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteMDArray(GDALGroupHS *self,char const *name,char **options=0){
    6029          20 :     return GDALGroupDeleteMDArray(self, name, options) ? CE_None : CE_Failure;
    6030             :   }
    6031             : 
    6032             : static GUIntBig*
    6033        5260 : CreateCGUIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6034             :   /* check if is List */
    6035        5260 :   if ( !PySequence_Check(pySeq) ) {
    6036           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6037           0 :     *pnSize = -1;
    6038           0 :     return NULL;
    6039             :   }
    6040        5260 :   Py_ssize_t size = PySequence_Size(pySeq);
    6041        5260 :   if( size > (Py_ssize_t)INT_MAX ) {
    6042           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6043           0 :     *pnSize = -1;
    6044           0 :     return NULL;
    6045             :   }
    6046        5260 :   if( (size_t)size > SIZE_MAX / sizeof(GUIntBig) ) {
    6047           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6048           0 :     *pnSize = -1;
    6049           0 :     return NULL;
    6050             :   }
    6051        5260 :   *pnSize = (int)size;
    6052        5260 :   GUIntBig* ret = (GUIntBig*) malloc((*pnSize)*sizeof(GUIntBig));
    6053        5260 :   if( !ret ) {
    6054           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6055           0 :     *pnSize = -1;
    6056           0 :     return NULL;
    6057             :   }
    6058       14755 :   for( int i = 0; i<*pnSize; i++ ) {
    6059        9495 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6060        9495 :     if ( !PyArg_Parse(o,"K",&ret[i]) ) {
    6061           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6062           0 :         Py_DECREF(o);
    6063           0 :         free(ret);
    6064           0 :         *pnSize = -1;
    6065           0 :         return NULL;
    6066             :     }
    6067        9495 :     Py_DECREF(o);
    6068             :   }
    6069             :   return ret;
    6070             : }
    6071             : 
    6072         125 : SWIGINTERN GDALAttributeHS *GDALGroupHS_CreateAttribute(GDALGroupHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6073         125 :     return GDALGroupCreateAttribute(self, name, dimensions,
    6074             :                                     (const GUInt64*) sizes,
    6075             :                                     data_type, options);
    6076             :   }
    6077          25 : SWIGINTERN CPLErr GDALGroupHS_DeleteAttribute(GDALGroupHS *self,char const *name,char **options=0){
    6078          25 :     return GDALGroupDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6079             :   }
    6080          45 : SWIGINTERN CPLErr GDALGroupHS_Rename(GDALGroupHS *self,char const *newName){
    6081          45 :     return GDALGroupRename( self, newName ) ? CE_None : CE_Failure;
    6082             :   }
    6083          14 : SWIGINTERN GDALGroupHS *GDALGroupHS_SubsetDimensionFromSelection(GDALGroupHS *self,char const *selection,char **options=0){
    6084          14 :     return GDALGroupSubsetDimensionFromSelection(self, selection, options);
    6085             :   }
    6086           2 : SWIGINTERN size_t GDALGroupHS_GetDataTypeCount(GDALGroupHS *self){
    6087           2 :     return GDALGroupGetDataTypeCount(self);
    6088             :   }
    6089             : 
    6090             : SWIGINTERNINLINE PyObject* 
    6091        3646 : SWIG_From_unsigned_SS_long  (unsigned long value)
    6092             : {
    6093        3646 :   return (value > LONG_MAX) ?
    6094        3646 :     PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
    6095             : }
    6096             : 
    6097             : 
    6098             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6099             : SWIGINTERNINLINE PyObject* 
    6100             : SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
    6101             : {
    6102             :   return (value > LONG_MAX) ?
    6103             :     PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6104             : }
    6105             : #endif
    6106             : 
    6107             : 
    6108             : SWIGINTERNINLINE PyObject *
    6109        3646 : SWIG_From_size_t  (size_t value)
    6110             : {    
    6111             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6112        3646 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    6113             : #endif
    6114        3646 :     return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
    6115             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6116             :   } else {
    6117             :     /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    6118             :     return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
    6119             :   }
    6120             : #endif
    6121             : }
    6122             : 
    6123           2 : SWIGINTERN GDALExtendedDataTypeHS *GDALGroupHS_GetDataType(GDALGroupHS *self,size_t idx){
    6124           2 :     if (idx >= GDALGroupGetDataTypeCount(self))
    6125             :     {
    6126           1 :         CPLError(CE_Failure, CPLE_AppDefined, "GetDataType(): invalid index");
    6127           1 :         return NULL;
    6128             :     }
    6129           1 :     return GDALGroupGetDataType(self, idx);
    6130             :   }
    6131             : 
    6132             : typedef struct
    6133             : {
    6134             :   double min;
    6135             :   double max;
    6136             :   double mean;
    6137             :   double std_dev;
    6138             :   GIntBig valid_count;
    6139             : } Statistics;
    6140             : 
    6141           0 : SWIGINTERN void delete_Statistics(Statistics *self){
    6142           0 :     CPLFree(self);
    6143           0 :   }
    6144             : 
    6145             : #include <limits>
    6146             : 
    6147        2445 : static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
    6148             : {
    6149        2445 :     GDALExtendedDataTypeClass klass = GDALExtendedDataTypeGetClass(dt);
    6150        2445 :     if( klass == GEDTC_NUMERIC )
    6151             :         return true;
    6152          32 :     if( klass == GEDTC_STRING )
    6153             :         return false;
    6154          20 :     CPLAssert( klass == GEDTC_COMPOUND );
    6155          20 :     size_t nCount = 0;
    6156          20 :     GDALEDTComponentH* comps = GDALExtendedDataTypeGetComponents(dt, &nCount);
    6157             :     bool ret = true;
    6158          56 :     for( size_t i = 0; i < nCount; i++ )
    6159             :     {
    6160          38 :         GDALExtendedDataTypeH tmpType = GDALEDTComponentGetType(comps[i]);
    6161          38 :         ret = CheckNumericDataType(tmpType);
    6162          38 :         GDALExtendedDataTypeRelease(tmpType);
    6163          38 :         if( !ret )
    6164             :             break;
    6165             :     }
    6166          20 :     GDALExtendedDataTypeFreeComponents(comps, nCount);
    6167             :     return ret;
    6168             : }
    6169             : 
    6170        4301 : static CPLErr MDArrayReadWriteCheckArguments(GDALMDArrayHS* array,
    6171             :                                              bool bCheckOnlyDims,
    6172             :                                              int nDims1, GUIntBig* array_start_idx,
    6173             :                                              int nDims2, GUIntBig* count,
    6174             :                                              int nDims3, GIntBig* array_step,
    6175             :                                              int nDims4, GIntBig* buffer_stride,
    6176             :                                              GDALExtendedDataTypeHS* buffer_datatype,
    6177             :                                              size_t* pnBufferSize)
    6178             : {
    6179        4301 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(array);
    6180        4301 :     if( nDims1 != nExpectedDims )
    6181             :     {
    6182           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6183             :             "Wrong number of values in array_start_idx");
    6184           1 :         return CE_Failure;
    6185             :     }
    6186        4300 :     if( nDims2 != nExpectedDims )
    6187             :     {
    6188           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6189             :             "Wrong number of values in count");
    6190           1 :         return CE_Failure;
    6191             :     }
    6192        4299 :     if( nDims3 != nExpectedDims )
    6193             :     {
    6194           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6195             :             "Wrong number of values in array_step");
    6196           1 :         return CE_Failure;
    6197             :     }
    6198        4298 :     if( nDims4!= nExpectedDims )
    6199             :     {
    6200           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6201             :             "Wrong number of values in buffer_stride");
    6202           1 :         return CE_Failure;
    6203             :     }
    6204        4297 :     if( bCheckOnlyDims )
    6205             :         return CE_None;
    6206        2392 :     if( !CheckNumericDataType(buffer_datatype) )
    6207             :     {
    6208           8 :         CPLError(CE_Failure, CPLE_NotSupported,
    6209             :             "non-numeric buffer data type not supported in SWIG bindings");
    6210           8 :         return CE_Failure;
    6211             :     }
    6212             :     GIntBig nBufferSize = 0;
    6213        6793 :     for( int i = 0; i < nExpectedDims; i++ )
    6214             :     {
    6215        4411 :         if( count[i] == 0 )
    6216             :         {
    6217           1 :             CPLError(CE_Failure, CPLE_AppDefined,
    6218             :                      "count[%d] = 0 is invalid", i);
    6219           1 :             return CE_Failure;
    6220             :         }
    6221        4410 :         if( buffer_stride[i] < 0 )
    6222             :         {
    6223           1 :             CPLError(CE_Failure, CPLE_NotSupported,
    6224             :                 "Negative value in buffer_stride not supported in SWIG bindings");
    6225           1 :             return CE_Failure;
    6226             :         }
    6227        4409 :         if( count[i] > 1 && buffer_stride[i] != 0 )
    6228             :         {
    6229        3710 :             if( (GUIntBig)buffer_stride[i] > std::numeric_limits<GIntBig>::max() / (count[i] - 1) )
    6230             :             {
    6231           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6232           0 :                 return CE_Failure;
    6233             :             }
    6234        3710 :             GIntBig nDelta = buffer_stride[i] * (count[i] - 1);
    6235        3710 :             if( nBufferSize > std::numeric_limits<GIntBig>::max() - nDelta )
    6236             :             {
    6237           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6238           0 :                 return CE_Failure;
    6239             :             }
    6240        3710 :             nBufferSize += nDelta;
    6241             :         }
    6242             :     }
    6243        2382 :     const size_t nDTSize = GDALExtendedDataTypeGetSize(buffer_datatype);
    6244        2382 :     if( nDTSize == 0 )
    6245             :     {
    6246           0 :         CPLError(CE_Failure, CPLE_AppDefined, "nDTSize == 0");
    6247           0 :         return CE_Failure;
    6248             :     }
    6249        2382 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() / nDTSize )
    6250             :     {
    6251           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6252           0 :         return CE_Failure;
    6253             :     }
    6254        2382 :     nBufferSize *= nDTSize;
    6255        2382 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() - nDTSize )
    6256             :     {
    6257           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6258           1 :         return CE_Failure;
    6259             :     }
    6260        2381 :     nBufferSize += nDTSize;
    6261             : 
    6262             : #if SIZEOF_VOIDP == 4
    6263             :     if( nBufferSize > INT_MAX )
    6264             :     {
    6265             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    6266             :         return CE_Failure;
    6267             :     }
    6268             : #endif
    6269        2381 :     *pnBufferSize = (size_t)nBufferSize;
    6270        2381 :     return CE_None;
    6271             : }
    6272             : 
    6273        2057 : SWIGINTERN void delete_GDALMDArrayHS(GDALMDArrayHS *self){
    6274        2057 :     GDALMDArrayRelease(self);
    6275        2057 :   }
    6276          83 : SWIGINTERN char const *GDALMDArrayHS_GetName(GDALMDArrayHS *self){
    6277          83 :     return GDALMDArrayGetName(self);
    6278             :   }
    6279          50 : SWIGINTERN char const *GDALMDArrayHS_GetFullName(GDALMDArrayHS *self){
    6280          50 :     return GDALMDArrayGetFullName(self);
    6281             :   }
    6282           6 : SWIGINTERN GUIntBig GDALMDArrayHS_GetTotalElementsCount(GDALMDArrayHS *self){
    6283           6 :     return GDALMDArrayGetTotalElementsCount(self);
    6284             :   }
    6285        3547 : SWIGINTERN size_t GDALMDArrayHS_GetDimensionCount(GDALMDArrayHS *self){
    6286        3547 :     return GDALMDArrayGetDimensionCount(self);
    6287             :   }
    6288        2319 : SWIGINTERN void GDALMDArrayHS_GetDimensions(GDALMDArrayHS *self,GDALDimensionHS ***pdims,size_t *pnCount){
    6289        4638 :     *pdims = GDALMDArrayGetDimensions(self, pnCount);
    6290             :   }
    6291          13 : SWIGINTERN void GDALMDArrayHS_GetCoordinateVariables(GDALMDArrayHS *self,GDALMDArrayHS ***parrays,size_t *pnCount){
    6292          26 :     *parrays = GDALMDArrayGetCoordinateVariables(self, pnCount);
    6293             :   }
    6294          95 : SWIGINTERN void GDALMDArrayHS_GetBlockSize(GDALMDArrayHS *self,GUIntBig **psizes,size_t *pnCount){
    6295         190 :     *psizes = GDALMDArrayGetBlockSize(self, pnCount);
    6296             :   }
    6297           1 : SWIGINTERN void GDALMDArrayHS_GetProcessingChunkSize(GDALMDArrayHS *self,size_t nMaxChunkMemory,GUIntBig **psizes,size_t *pnCount){
    6298           1 :      size_t* panTmp = GDALMDArrayGetProcessingChunkSize(self, pnCount, nMaxChunkMemory);
    6299           1 :      *psizes = NULL;
    6300           1 :      if( panTmp )
    6301             :      {
    6302           1 :         *psizes = (GUIntBig*) CPLMalloc(sizeof(GUIntBig) * (*pnCount));
    6303           3 :         for( size_t i = 0; i < *pnCount; ++i )
    6304             :         {
    6305           2 :             (*psizes)[i] = panTmp[i];
    6306             :         }
    6307           1 :         CPLFree(panTmp);
    6308             :      }
    6309           1 :   }
    6310        1997 : SWIGINTERN GDALExtendedDataTypeHS *GDALMDArrayHS_GetDataType(GDALMDArrayHS *self){
    6311        1997 :     return GDALMDArrayGetDataType(self);
    6312             :   }
    6313          15 : SWIGINTERN char **GDALMDArrayHS_GetStructuralInfo(GDALMDArrayHS *self){
    6314          15 :     return GDALMDArrayGetStructuralInfo( self );
    6315             :   }
    6316          44 : SWIGINTERN CPLErr GDALMDArrayHS_Resize(GDALMDArrayHS *self,int newDimensions,GUIntBig *newSizes,char **options=NULL){
    6317          44 :     if( static_cast<size_t>(newDimensions) != GDALMDArrayGetDimensionCount(self) )
    6318             :     {
    6319           2 :         CPLError(CE_Failure, CPLE_IllegalArg,
    6320             :                  "newSizes array not of expected size");
    6321           2 :         return CE_Failure;
    6322             :     }
    6323          42 :     return GDALMDArrayResize( self, newSizes, options ) ? CE_None : CE_Failure;
    6324             :   }
    6325             : 
    6326             : static GIntBig*
    6327        4865 : CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6328             :   /* check if is List */
    6329        4865 :   if ( !PySequence_Check(pySeq) ) {
    6330           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6331           0 :     *pnSize = -1;
    6332           0 :     return NULL;
    6333             :   }
    6334        4865 :   Py_ssize_t size = PySequence_Size(pySeq);
    6335        4865 :   if( size > (Py_ssize_t)INT_MAX ) {
    6336           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6337           0 :     *pnSize = -1;
    6338           0 :     return NULL;
    6339             :   }
    6340        4865 :   if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
    6341           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6342           0 :     *pnSize = -1;
    6343           0 :     return NULL;
    6344             :   }
    6345        4865 :   *pnSize = (int)size;
    6346        4865 :   GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
    6347        4865 :   if( !ret ) {
    6348           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6349           0 :     *pnSize = -1;
    6350           0 :     return NULL;
    6351             :   }
    6352       13841 :   for( int i = 0; i<*pnSize; i++ ) {
    6353        8976 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6354        8976 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    6355           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6356           0 :         Py_DECREF(o);
    6357           0 :         free(ret);
    6358           0 :         *pnSize = -1;
    6359           0 :         return NULL;
    6360             :     }
    6361        8976 :     Py_DECREF(o);
    6362             :   }
    6363             :   return ret;
    6364             : }
    6365             : 
    6366        1909 : 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){
    6367        1909 :     *buf = NULL;
    6368             : 
    6369        1909 :     size_t buf_size = 0;
    6370        1909 :     if( MDArrayReadWriteCheckArguments(self, true,
    6371             :                                         nDims1, array_start_idx,
    6372             :                                         nDims2, count,
    6373             :                                         nDims3, array_step,
    6374             :                                         nDims4, buffer_stride,
    6375             :                                         buffer_datatype,
    6376             :                                         &buf_size) != CE_None )
    6377             :     {
    6378             :       return CE_Failure;
    6379             :     }
    6380             : 
    6381        1905 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6382        3814 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6383        3810 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims + 1);
    6384        1905 :     size_t nProductCount = 1;
    6385        5469 :     for( int i = 0; i < nExpectedDims; i++ )
    6386             :     {
    6387        3564 :         count_internal[i] = (size_t)count[i];
    6388        3564 :         if( count_internal[i] != count[i] )
    6389             :         {
    6390             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6391             :             return CE_Failure;
    6392             :         }
    6393        3564 :         nProductCount *= count_internal[i];
    6394        3564 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6395        3564 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6396             :         {
    6397           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6398             :             return CE_Failure;
    6399             :         }
    6400             :     }
    6401             : 
    6402        1905 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6403        1905 :     bool isSelfString = GDALExtendedDataTypeGetClass(selfType) == GEDTC_STRING;
    6404        1905 :     GDALExtendedDataTypeRelease(selfType);
    6405             : 
    6406        1905 :     if( GDALExtendedDataTypeGetClass(buffer_datatype) == GEDTC_STRING &&
    6407             :         isSelfString )
    6408             :     {
    6409             :         size_t nExpectedStride = 1;
    6410          70 :         for( int i = nExpectedDims; i > 0; )
    6411             :         {
    6412          40 :             --i;
    6413          40 :             if( (size_t)buffer_stride_internal[i] != nExpectedStride )
    6414             :             {
    6415           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Unhandled stride");
    6416             :                 return CE_Failure;
    6417             :             }
    6418          40 :             nExpectedStride *= count_internal[i];
    6419             :         }
    6420          30 :         char** ppszBuffer = (char**)VSI_CALLOC_VERBOSE(nProductCount, sizeof(char*));
    6421          30 :         if( !ppszBuffer )
    6422             :             return CE_Failure;
    6423          30 :         GByte* pabyBuffer = (GByte*)ppszBuffer;
    6424          30 :         if( !(GDALMDArrayRead( self,
    6425             :                             array_start_idx,
    6426          30 :                             &count_internal[0],
    6427             :                             array_step,
    6428             :                             NULL,
    6429             :                             buffer_datatype,
    6430             :                             pabyBuffer,
    6431             :                             pabyBuffer,
    6432             :                             nProductCount * sizeof(char*) )) )
    6433             :         {
    6434           0 :             for( size_t i = 0; i < nProductCount; i++ )
    6435           0 :                 VSIFree(ppszBuffer[i]);
    6436           0 :             VSIFree(pabyBuffer);
    6437             :             return CE_Failure;
    6438             :         }
    6439             : 
    6440          30 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6441          30 :         PyObject* obj = PyList_New( nProductCount );
    6442         192 :         for( size_t i = 0; i < nProductCount; i++ )
    6443             :         {
    6444         162 :             if( !ppszBuffer[i] )
    6445             :             {
    6446           3 :                 Py_INCREF(Py_None);
    6447           3 :                 PyList_SetItem(obj, i, Py_None);
    6448             :             }
    6449             :             else
    6450             :             {
    6451         159 :                 PyList_SetItem(obj, i, GDALPythonObjectFromCStr( ppszBuffer[i] ) );
    6452             :             }
    6453         162 :             VSIFree(ppszBuffer[i]);
    6454             :         }
    6455          30 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6456          30 :         *buf = obj;
    6457          30 :         VSIFree(pabyBuffer);
    6458          30 :         return CE_None;
    6459             :     }
    6460             : 
    6461        1875 :     if( MDArrayReadWriteCheckArguments(self, false,
    6462             :                                         nDims1, array_start_idx,
    6463             :                                         nDims2, count,
    6464             :                                         nDims3, array_step,
    6465             :                                         nDims4, buffer_stride,
    6466             :                                         buffer_datatype,
    6467             :                                         &buf_size) != CE_None )
    6468             :     {
    6469             :       return CE_Failure;
    6470             :     }
    6471        1864 :     if( buf_size == 0 )
    6472             :     {
    6473             :         return CE_None;
    6474             :     }
    6475             : 
    6476             : 
    6477        3769 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6478        1864 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6479        1864 :     if (*buf == NULL)
    6480             :     {
    6481           0 :         *buf = Py_None;
    6482           0 :         if( !GetUseExceptions() )
    6483             :         {
    6484           0 :             PyErr_Clear();
    6485             :         }
    6486           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6487           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6488             :         return CE_Failure;
    6489             :     }
    6490        1864 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6491        1864 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6492             : 
    6493        1864 :     memset(data, 0, buf_size);
    6494             : 
    6495        1864 :     CPLErr eErr = GDALMDArrayRead( self,
    6496             :                                    array_start_idx,
    6497        1864 :                                    &count_internal[0],
    6498             :                                    array_step,
    6499        1864 :                                    &buffer_stride_internal[0],
    6500             :                                    buffer_datatype,
    6501             :                                    data,
    6502             :                                    data,
    6503        1890 :                                    buf_size ) ? CE_None : CE_Failure;
    6504          26 :     if (eErr == CE_Failure)
    6505             :     {
    6506          26 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6507          26 :         Py_DECREF((PyObject*)*buf);
    6508          26 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6509          26 :         *buf = NULL;
    6510             :     }
    6511             : 
    6512             :     return eErr;
    6513             :   }
    6514          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){
    6515             : 
    6516          13 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6517          26 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6518          13 :     if( nExpectedDims > 1 )
    6519             :     {
    6520           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6521             :             "Unsupported number of dimensions");
    6522             :         return CE_Failure;
    6523             :     }
    6524          25 :     for( int i = 0; i < nExpectedDims; i++ )
    6525             :     {
    6526          12 :         count_internal[i] = (size_t)count[i];
    6527          12 :         if( count_internal[i] != count[i] )
    6528             :         {
    6529             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6530             :             return CE_Failure;
    6531             :         }
    6532             :     }
    6533          13 :     if( nExpectedDims == 1 )
    6534             :     {
    6535          12 :         if( nDims1 != 1 )
    6536             :         {
    6537           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6538             :                 "Wrong number of values in array_start_idx");
    6539             :             return CE_Failure;
    6540             :         }
    6541          12 :         if( nDims2 != 1 )
    6542             :         {
    6543           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6544             :                 "Wrong number of values in count");
    6545             :             return CE_Failure;
    6546             :         }
    6547          12 :         if( nDims3 != 1 )
    6548             :         {
    6549           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6550             :                 "Wrong number of values in array_step");
    6551             :             return CE_Failure;
    6552             :         }
    6553             :     }
    6554             : 
    6555          26 :     CPLErr eErr = GDALMDArrayWrite(self,
    6556             :                                    array_start_idx,
    6557          13 :                                    &count_internal[0],
    6558             :                                    array_step,
    6559             :                                    NULL,
    6560             :                                    buffer_datatype,
    6561             :                                    options,
    6562             :                                    options,
    6563          13 :                                    CSLCount(options) * sizeof(char*) ) ? CE_None : CE_Failure;
    6564             :     return eErr;
    6565             :   }
    6566         517 : 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){
    6567             : 
    6568         517 :     size_t buf_size = 0;
    6569         517 :     if( MDArrayReadWriteCheckArguments(self, false,
    6570             :                                         nDims1, array_start_idx,
    6571             :                                         nDims2, count,
    6572             :                                         nDims3, array_step,
    6573             :                                         nDims4, buffer_stride,
    6574             :                                         buffer_datatype,
    6575             :                                         &buf_size) != CE_None )
    6576             :     {
    6577             :       return CE_Failure;
    6578             :     }
    6579             : 
    6580         517 :     if ( (GUIntBig)buf_len < buf_size )
    6581             :     {
    6582           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    6583           2 :         return CE_Failure;
    6584             :     }
    6585             : 
    6586         515 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6587        1032 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6588        1030 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims+1);
    6589        1416 :     for( int i = 0; i < nExpectedDims; i++ )
    6590             :     {
    6591         901 :         count_internal[i] = (size_t)count[i];
    6592         901 :         if( count_internal[i] != count[i] )
    6593             :         {
    6594             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6595             :             return CE_Failure;
    6596             :         }
    6597         901 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6598         901 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6599             :         {
    6600           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6601             :             return CE_Failure;
    6602             :         }
    6603             :     }
    6604             : 
    6605         515 :     CPLErr eErr = GDALMDArrayWrite( self,
    6606             :                                    array_start_idx,
    6607         515 :                                    &count_internal[0],
    6608             :                                    array_step,
    6609         515 :                                    &buffer_stride_internal[0],
    6610             :                                    buffer_datatype,
    6611             :                                    buf_string,
    6612             :                                    buf_string,
    6613         518 :                                    (size_t)buf_len ) ? CE_None : CE_Failure;
    6614             :     return eErr;
    6615             :   }
    6616          22 : SWIGINTERN CPLErr GDALMDArrayHS_AdviseRead(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,char **options=0){
    6617             : 
    6618          22 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6619          22 :     if( nDims1 != nExpectedDims )
    6620             :     {
    6621           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6622             :             "Wrong number of values in array_start_idx");
    6623           0 :         return CE_Failure;
    6624             :     }
    6625          22 :     if( nDims2 != nExpectedDims )
    6626             :     {
    6627           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6628             :             "Wrong number of values in count");
    6629           0 :         return CE_Failure;
    6630             :     }
    6631             : 
    6632          44 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6633          58 :     for( int i = 0; i < nExpectedDims; i++ )
    6634             :     {
    6635          36 :         count_internal[i] = (size_t)count[i];
    6636          36 :         if( count_internal[i] != count[i] )
    6637             :         {
    6638             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6639             :             return CE_Failure;
    6640             :         }
    6641             :     }
    6642             : 
    6643          22 :     if( !(GDALMDArrayAdviseReadEx( self, array_start_idx, count_internal.data(), options )) )
    6644             :     {
    6645           5 :         return CE_Failure;
    6646             :     }
    6647             :     return CE_None;
    6648             :   }
    6649         120 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_GetAttribute(GDALMDArrayHS *self,char const *name){
    6650             : 
    6651         120 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    6652             : 
    6653         120 :     GDALAttributeH hRet = GDALMDArrayGetAttribute(self, name);
    6654             : 
    6655         138 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    6656           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    6657             : 
    6658         120 :     return hRet;
    6659             :   }
    6660          59 : SWIGINTERN void GDALMDArrayHS_GetAttributes(GDALMDArrayHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6661         118 :     *pattrs = GDALMDArrayGetAttributes(self, pnCount, options);
    6662             :   }
    6663         162 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_CreateAttribute(GDALMDArrayHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6664         162 :     return GDALMDArrayCreateAttribute(self, name, dimensions,
    6665             :                                     (const GUInt64*) sizes,
    6666             :                                     data_type, options);
    6667             :   }
    6668          24 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteAttribute(GDALMDArrayHS *self,char const *name,char **options=0){
    6669          24 :     return GDALMDArrayDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6670             :   }
    6671          73 : SWIGINTERN CPLErr GDALMDArrayHS_GetNoDataValueAsRaw(GDALMDArrayHS *self,void **buf){
    6672          73 :     *buf = NULL;
    6673          73 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6674          73 :     if( pabyBuf == NULL )
    6675             :     {
    6676             :       return CE_Failure;
    6677             :     }
    6678          36 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6679          36 :     const size_t buf_size = GDALExtendedDataTypeGetSize(selfType);
    6680          36 :     GDALExtendedDataTypeRelease(selfType);
    6681             : 
    6682         109 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6683          36 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6684          36 :     if (*buf == NULL)
    6685             :     {
    6686           0 :         *buf = Py_None;
    6687           0 :         if( !GetUseExceptions() )
    6688             :         {
    6689           0 :             PyErr_Clear();
    6690             :         }
    6691           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6692           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6693             :         return CE_Failure;
    6694             :     }
    6695          36 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6696          36 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6697             : 
    6698          36 :     memcpy(data, pabyBuf, buf_size);
    6699             : 
    6700          36 :     return CE_None;
    6701             :   }
    6702         121 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsDouble(GDALMDArrayHS *self,double *val,int *hasval){
    6703         242 :     *val = GDALMDArrayGetNoDataValueAsDouble( self, hasval );
    6704             :   }
    6705          11 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsInt64(GDALMDArrayHS *self,GIntBig *val,int *hasval){
    6706          22 :     *val = GDALMDArrayGetNoDataValueAsInt64( self, hasval );
    6707             :   }
    6708           7 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsUInt64(GDALMDArrayHS *self,GUIntBig *val,int *hasval){
    6709          14 :     *val = GDALMDArrayGetNoDataValueAsUInt64( self, hasval );
    6710             :   }
    6711           5 : SWIGINTERN retStringAndCPLFree *GDALMDArrayHS_GetNoDataValueAsString(GDALMDArrayHS *self){
    6712           5 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6713           5 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6714           5 :     GDALExtendedDataTypeRelease(selfType);
    6715             : 
    6716           5 :     if( typeClass != GEDTC_STRING )
    6717             :     {
    6718           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6719           1 :         return NULL;
    6720             :     }
    6721           4 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6722           4 :     if( pabyBuf == NULL )
    6723             :     {
    6724             :       return NULL;
    6725             :     }
    6726           3 :     const char* ret = *reinterpret_cast<const char* const*>(pabyBuf);
    6727           3 :     if( ret )
    6728           2 :         return CPLStrdup(ret);
    6729             :     return NULL;
    6730             :   }
    6731          51 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueDouble(GDALMDArrayHS *self,double d){
    6732          51 :     return GDALMDArraySetNoDataValueAsDouble( self, d ) ? CE_None : CE_Failure;
    6733             :   }
    6734           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueInt64(GDALMDArrayHS *self,GIntBig v){
    6735           1 :     return GDALMDArraySetNoDataValueAsInt64( self, v ) ? CE_None : CE_Failure;
    6736             :   }
    6737           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueUInt64(GDALMDArrayHS *self,GUIntBig v){
    6738           1 :     return GDALMDArraySetNoDataValueAsUInt64( self, v ) ? CE_None : CE_Failure;
    6739             :   }
    6740           3 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueString(GDALMDArrayHS *self,char const *nodata){
    6741           3 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6742           3 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6743           3 :     GDALExtendedDataTypeRelease(selfType);
    6744             : 
    6745           3 :     if( typeClass != GEDTC_STRING )
    6746             :     {
    6747           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6748           0 :         return CE_Failure;
    6749             :     }
    6750           3 :     return GDALMDArraySetRawNoDataValue(self, &nodata) ? CE_None : CE_Failure;
    6751             :   }
    6752           8 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueRaw(GDALMDArrayHS *self,GIntBig nLen,char *pBuf){
    6753           8 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6754           8 :     const size_t selfTypeSize = GDALExtendedDataTypeGetSize(selfType);
    6755           8 :     GDALExtendedDataTypeRelease(selfType);
    6756             : 
    6757           8 :     if( static_cast<size_t>(nLen) != selfTypeSize )
    6758             :     {
    6759           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Argument of wrong size");
    6760           1 :         return CE_Failure;
    6761             :     }
    6762           7 :     return GDALMDArraySetRawNoDataValue(self, pBuf) ? CE_None : CE_Failure;
    6763             :   }
    6764           4 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteNoDataValue(GDALMDArrayHS *self){
    6765           4 :     return GDALMDArraySetRawNoDataValue( self, NULL ) ? CE_None : CE_Failure;
    6766             :   }
    6767         102 : SWIGINTERN void GDALMDArrayHS_GetOffset(GDALMDArrayHS *self,double *val,int *hasval){
    6768         204 :     *val = GDALMDArrayGetOffset( self, hasval );
    6769             :   }
    6770           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetOffsetStorageType(GDALMDArrayHS *self){
    6771           5 :     GDALDataType eDT = GDT_Unknown;
    6772           5 :     int hasval = FALSE;
    6773           5 :     GDALMDArrayGetOffsetEx( self, &hasval, &eDT );
    6774           5 :     return hasval ? eDT : GDT_Unknown;
    6775             :   }
    6776         105 : SWIGINTERN void GDALMDArrayHS_GetScale(GDALMDArrayHS *self,double *val,int *hasval){
    6777         210 :     *val = GDALMDArrayGetScale( self, hasval );
    6778             :   }
    6779           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetScaleStorageType(GDALMDArrayHS *self){
    6780           5 :     GDALDataType eDT = GDT_Unknown;
    6781           5 :     int hasval = FALSE;
    6782           5 :     GDALMDArrayGetScaleEx( self, &hasval, &eDT );
    6783           5 :     return hasval ? eDT : GDT_Unknown;
    6784             :   }
    6785          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetOffset(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6786          21 :     return GDALMDArraySetOffsetEx( self, val, storageType ) ? CE_None : CE_Failure;
    6787             :   }
    6788          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetScale(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6789          21 :     return GDALMDArraySetScaleEx( self, val, storageType ) ? CE_None : CE_Failure;
    6790             :   }
    6791          15 : SWIGINTERN CPLErr GDALMDArrayHS_SetUnit(GDALMDArrayHS *self,char const *unit){
    6792          15 :     return GDALMDArraySetUnit(self, unit) ? CE_None : CE_Failure;
    6793             :   }
    6794         113 : SWIGINTERN char const *GDALMDArrayHS_GetUnit(GDALMDArrayHS *self){
    6795         113 :     return GDALMDArrayGetUnit(self);
    6796             :   }
    6797          30 : SWIGINTERN OGRErr GDALMDArrayHS_SetSpatialRef(GDALMDArrayHS *self,OSRSpatialReferenceShadow *srs){
    6798          30 :      return GDALMDArraySetSpatialRef( self, (OGRSpatialReferenceH)srs ) ? CE_None : CE_Failure;
    6799             :   }
    6800          81 : SWIGINTERN OSRSpatialReferenceShadow *GDALMDArrayHS_GetSpatialRef(GDALMDArrayHS *self){
    6801          81 :     return (OSRSpatialReferenceShadow*) GDALMDArrayGetSpatialRef(self);
    6802             :   }
    6803         433 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetView(GDALMDArrayHS *self,char const *viewExpr){
    6804         433 :     return GDALMDArrayGetView(self, viewExpr);
    6805             :   }
    6806          44 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_Transpose(GDALMDArrayHS *self,int axisMap,int *mapInts){
    6807          44 :     return GDALMDArrayTranspose(self, axisMap, mapInts);
    6808             :   }
    6809          13 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetUnscaled(GDALMDArrayHS *self){
    6810          13 :     return GDALMDArrayGetUnscaled(self);
    6811             :   }
    6812          35 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetMask(GDALMDArrayHS *self,char **options=0){
    6813          35 :     return GDALMDArrayGetMask(self, options);
    6814             :   }
    6815          22 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetGridded(GDALMDArrayHS *self,char const *pszGridOptions,GDALMDArrayHS *xArray=NULL,GDALMDArrayHS *yArray=NULL,char **options=0){
    6816          22 :     return GDALMDArrayGetGridded(self, pszGridOptions, xArray, yArray, options);
    6817             :   }
    6818         100 : SWIGINTERN GDALDatasetShadow *GDALMDArrayHS_AsClassicDataset(GDALMDArrayHS *self,size_t iXDim,size_t iYDim,GDALGroupHS *hRootGroup=NULL,char **options=0){
    6819         100 :     return (GDALDatasetShadow*)GDALMDArrayAsClassicDatasetEx(self, iXDim, iYDim, hRootGroup, options);
    6820             :   }
    6821          15 : SWIGINTERN Statistics *GDALMDArrayHS_GetStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,bool force=TRUE,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    6822          15 :         GUInt64 nValidCount = 0;
    6823          15 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6824          15 :         CPLErr eErr = GDALMDArrayGetStatistics(self, NULL, approx_ok, force,
    6825             :                                  &(psStatisticsOut->min),
    6826             :                                  &(psStatisticsOut->max),
    6827             :                                  &(psStatisticsOut->mean),
    6828             :                                  &(psStatisticsOut->std_dev),
    6829             :                                  &nValidCount,
    6830             :                                  callback, callback_data);
    6831          15 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6832          15 :         if( eErr == CE_None )
    6833             :             return psStatisticsOut;
    6834           5 :         CPLFree(psStatisticsOut);
    6835             :         return NULL;
    6836             :   }
    6837           4 : SWIGINTERN Statistics *GDALMDArrayHS_ComputeStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=0){
    6838           4 :         GUInt64 nValidCount = 0;
    6839           4 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6840           4 :         int nSuccess = GDALMDArrayComputeStatisticsEx(self, NULL, approx_ok,
    6841             :                                  &(psStatisticsOut->min),
    6842             :                                  &(psStatisticsOut->max),
    6843             :                                  &(psStatisticsOut->mean),
    6844             :                                  &(psStatisticsOut->std_dev),
    6845             :                                  &nValidCount,
    6846             :                                  callback, callback_data, options);
    6847           4 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6848           4 :         if( nSuccess )
    6849             :             return psStatisticsOut;
    6850           0 :         CPLFree(psStatisticsOut);
    6851             :         return NULL;
    6852             :   }
    6853          34 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetResampled(GDALMDArrayHS *self,int nDimensions,GDALDimensionHS **dimensions,GDALRIOResampleAlg resample_alg,OSRSpatialReferenceShadow **srs,char **options=0){
    6854          34 :     return GDALMDArrayGetResampled(self, nDimensions, dimensions,
    6855             :                                   resample_alg, srs ? *srs : NULL, options);
    6856             :   }
    6857           7 : SWIGINTERN void GDALMDArrayHS_GetMeshGrid(int nInputArrays,GDALMDArrayHS **ahInputArrays,GDALMDArrayHS ***outputArrays,size_t *pnCountOutputArrays,char **options=0){
    6858          14 :     *outputArrays = GDALMDArrayGetMeshGrid(ahInputArrays, nInputArrays, pnCountOutputArrays, options);
    6859             :   }
    6860           7 : SWIGINTERN bool GDALMDArrayHS_Cache(GDALMDArrayHS *self,char **options=NULL){
    6861          14 :       return GDALMDArrayCache(self, options);
    6862             :   }
    6863          28 : SWIGINTERN CPLErr GDALMDArrayHS_Rename(GDALMDArrayHS *self,char const *newName){
    6864          28 :     return GDALMDArrayRename( self, newName ) ? CE_None : CE_Failure;
    6865             :   }
    6866         739 : SWIGINTERN void delete_GDALAttributeHS(GDALAttributeHS *self){
    6867         739 :     GDALAttributeRelease(self);
    6868         739 :   }
    6869         361 : SWIGINTERN char const *GDALAttributeHS_GetName(GDALAttributeHS *self){
    6870         361 :     return GDALAttributeGetName(self);
    6871             :   }
    6872          49 : SWIGINTERN char const *GDALAttributeHS_GetFullName(GDALAttributeHS *self){
    6873          49 :     return GDALAttributeGetFullName(self);
    6874             :   }
    6875         177 : SWIGINTERN GUIntBig GDALAttributeHS_GetTotalElementsCount(GDALAttributeHS *self){
    6876         177 :     return GDALAttributeGetTotalElementsCount(self);
    6877             :   }
    6878          12 : SWIGINTERN size_t GDALAttributeHS_GetDimensionCount(GDALAttributeHS *self){
    6879          12 :     return GDALAttributeGetDimensionCount(self);
    6880             :   }
    6881          11 : SWIGINTERN void GDALAttributeHS_GetDimensionsSize(GDALAttributeHS *self,GUIntBig **pdims,size_t *pnCount){
    6882          22 :     *pdims = GDALAttributeGetDimensionsSize(self, pnCount);
    6883             :   }
    6884         419 : SWIGINTERN GDALExtendedDataTypeHS *GDALAttributeHS_GetDataType(GDALAttributeHS *self){
    6885         419 :     return GDALAttributeGetDataType(self);
    6886             :   }
    6887          10 : SWIGINTERN CPLErr GDALAttributeHS_ReadAsRaw(GDALAttributeHS *self,void **buf){
    6888          10 :     *buf = NULL;
    6889          10 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6890          10 :     bool bIsNumeric = CheckNumericDataType(dt);
    6891          10 :     GDALExtendedDataTypeRelease(dt);
    6892          10 :     if( !bIsNumeric )
    6893             :     {
    6894           4 :         CPLError(CE_Failure, CPLE_NotSupported,
    6895             :             "non-numeric buffer data type not supported in SWIG bindings");
    6896           4 :         return CE_Failure;
    6897             :     }
    6898           6 :     size_t buf_size = 0;
    6899           6 :     GByte* pabyBuf = GDALAttributeReadAsRaw(self, &buf_size);
    6900           6 :     if( pabyBuf == NULL )
    6901             :     {
    6902             :       return CE_Failure;
    6903             :     }
    6904             : 
    6905          16 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6906           6 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size );
    6907           6 :     if (*buf == NULL)
    6908             :     {
    6909           0 :         *buf = Py_None;
    6910           0 :         if( !GetUseExceptions() )
    6911             :         {
    6912           0 :             PyErr_Clear();
    6913             :         }
    6914           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6915           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6916           0 :         GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6917             :         return CE_Failure;
    6918             :     }
    6919           6 :     char *data = PyBytes_AsString( (PyObject *)*buf );
    6920           6 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6921             : 
    6922           6 :     memcpy(data, pabyBuf, buf_size);
    6923           6 :     GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6924             : 
    6925             :     return CE_None;
    6926             :   }
    6927         108 : SWIGINTERN char const *GDALAttributeHS_ReadAsString(GDALAttributeHS *self){
    6928         108 :     return GDALAttributeReadAsString(self);
    6929             :   }
    6930          22 : SWIGINTERN int GDALAttributeHS_ReadAsInt(GDALAttributeHS *self){
    6931          22 :     return GDALAttributeReadAsInt(self);
    6932             :   }
    6933          15 : SWIGINTERN long long GDALAttributeHS_ReadAsInt64(GDALAttributeHS *self){
    6934          15 :     return GDALAttributeReadAsInt64(self);
    6935             :   }
    6936             : 
    6937             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6938             : SWIGINTERNINLINE PyObject* 
    6939          15 : SWIG_From_long_SS_long  (long long value)
    6940             : {
    6941          15 :   return ((value < LONG_MIN) || (value > LONG_MAX)) ?
    6942             :     PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6943             : }
    6944             : #endif
    6945             : 
    6946          40 : SWIGINTERN double GDALAttributeHS_ReadAsDouble(GDALAttributeHS *self){
    6947          40 :     return GDALAttributeReadAsDouble(self);
    6948             :   }
    6949          19 : SWIGINTERN char **GDALAttributeHS_ReadAsStringArray(GDALAttributeHS *self){
    6950          19 :     return GDALAttributeReadAsStringArray(self);
    6951             :   }
    6952             : 
    6953             : static PyObject *
    6954          15 : CreateTupleFromIntArray( const int *first, size_t size ) {
    6955          15 :   PyObject *out = PyTuple_New( size );
    6956         819 :   for( unsigned int i=0; i<size; i++ ) {
    6957         804 :     PyObject *val = PyInt_FromLong( *first );
    6958         804 :     ++first;
    6959         804 :     PyTuple_SetItem( out, i, val );
    6960             :   }
    6961          15 :   return out;
    6962             : }
    6963             : 
    6964          15 : SWIGINTERN void GDALAttributeHS_ReadAsIntArray(GDALAttributeHS *self,int **pvals,size_t *pnCount){
    6965          30 :     *pvals = GDALAttributeReadAsIntArray(self, pnCount);
    6966             :   }
    6967             : 
    6968             : static PyObject *
    6969          14 : CreateTupleFromInt64Array( const long long *first, size_t size ) {
    6970          14 :   PyObject *out = PyTuple_New( size );
    6971          69 :   for( unsigned int i=0; i<size; i++ ) {
    6972          55 :     PyObject *val = PyLong_FromLongLong( *first );
    6973          55 :     ++first;
    6974          55 :     PyTuple_SetItem( out, i, val );
    6975             :   }
    6976          14 :   return out;
    6977             : }
    6978             : 
    6979          14 : SWIGINTERN void GDALAttributeHS_ReadAsInt64Array(GDALAttributeHS *self,long long **pvals,size_t *pnCount){
    6980          28 :     *pvals = (long long*)GDALAttributeReadAsInt64Array(self, pnCount);
    6981             :   }
    6982          29 : SWIGINTERN void GDALAttributeHS_ReadAsDoubleArray(GDALAttributeHS *self,double **pvals,size_t *pnCount){
    6983          58 :     *pvals = GDALAttributeReadAsDoubleArray(self, pnCount);
    6984             :   }
    6985           5 : SWIGINTERN CPLErr GDALAttributeHS_WriteRaw(GDALAttributeHS *self,GIntBig nLen,char *pBuf){
    6986           5 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6987           5 :     bool bIsNumeric = CheckNumericDataType(dt);
    6988           5 :     GDALExtendedDataTypeRelease(dt);
    6989           5 :     if( !bIsNumeric )
    6990             :     {
    6991           0 :         CPLError(CE_Failure, CPLE_NotSupported,
    6992             :             "non-numeric buffer data type not supported in SWIG bindings");
    6993           0 :         return CE_Failure;
    6994             :     }
    6995           5 :     return GDALAttributeWriteRaw(self, pBuf, nLen) ? CE_None : CE_Failure;
    6996             :   }
    6997         181 : SWIGINTERN CPLErr GDALAttributeHS_WriteString(GDALAttributeHS *self,char const *val){
    6998         181 :     return GDALAttributeWriteString(self, val) ? CE_None : CE_Failure;
    6999             :   }
    7000           8 : SWIGINTERN CPLErr GDALAttributeHS_WriteStringArray(GDALAttributeHS *self,char **vals){
    7001           8 :     return GDALAttributeWriteStringArray(self, vals) ? CE_None : CE_Failure;
    7002             :   }
    7003          22 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt(GDALAttributeHS *self,int val){
    7004          22 :     return GDALAttributeWriteInt(self, val) ? CE_None : CE_Failure;
    7005             :   }
    7006             : 
    7007             : #ifdef SWIG_LONG_LONG_AVAILABLE
    7008             : SWIGINTERN int
    7009          11 : SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
    7010             : {
    7011          11 :   int res = SWIG_TypeError;
    7012          11 :   if (PyLong_Check(obj)) {
    7013          11 :     long long v = PyLong_AsLongLong(obj);
    7014          11 :     if (!PyErr_Occurred()) {
    7015          11 :       if (val) *val = v;
    7016          11 :       return SWIG_OK;
    7017             :     } else {
    7018           0 :       PyErr_Clear();
    7019           0 :       res = SWIG_OverflowError;
    7020             :     }
    7021             :   } else {
    7022           0 :     long v;
    7023           0 :     res = SWIG_AsVal_long (obj,&v);
    7024           0 :     if (SWIG_IsOK(res)) {
    7025           0 :       if (val) *val = v;
    7026           0 :       return res;
    7027             :     }
    7028             :   }
    7029             : #ifdef SWIG_PYTHON_CAST_MODE
    7030             :   {
    7031             :     const double mant_max = 1LL << DBL_MANT_DIG;
    7032             :     const double mant_min = -mant_max;
    7033             :     double d;
    7034             :     res = SWIG_AsVal_double (obj,&d);
    7035             :     if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max))
    7036             :       return SWIG_OverflowError;
    7037             :     if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
    7038             :       if (val) *val = (long long)(d);
    7039             :       return SWIG_AddCast(res);
    7040             :     }
    7041             :     res = SWIG_TypeError;
    7042             :   }
    7043             : #endif
    7044             :   return res;
    7045             : }
    7046             : #endif
    7047             : 
    7048          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64(GDALAttributeHS *self,long long val){
    7049          11 :     return GDALAttributeWriteInt64(self, val) ? CE_None : CE_Failure;
    7050             :   }
    7051          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteDouble(GDALAttributeHS *self,double val){
    7052          11 :     return GDALAttributeWriteDouble(self, val) ? CE_None : CE_Failure;
    7053             :   }
    7054          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteIntArray(GDALAttributeHS *self,int nList,int *pList){
    7055          11 :     return GDALAttributeWriteIntArray(self, pList, nList) ? CE_None : CE_Failure;
    7056             :   }
    7057             : 
    7058             : static long long*
    7059          10 : CreateCInt64ListFromSequence( PyObject* pySeq, int* pnSize ) {
    7060             :   /* check if is List */
    7061          10 :   if ( !PySequence_Check(pySeq) ) {
    7062           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7063           0 :     *pnSize = -1;
    7064           0 :     return NULL;
    7065             :   }
    7066          10 :   Py_ssize_t size = PySequence_Size(pySeq);
    7067          10 :   if( size > (Py_ssize_t)INT_MAX ) {
    7068           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7069           0 :     *pnSize = -1;
    7070           0 :     return NULL;
    7071             :   }
    7072          10 :   if( (size_t)size > SIZE_MAX / sizeof(long long) ) {
    7073           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7074           0 :     *pnSize = -1;
    7075           0 :     return NULL;
    7076             :   }
    7077          10 :   *pnSize = (int)size;
    7078          10 :   long long* ret = (long long*) malloc((*pnSize)*sizeof(long long));
    7079          10 :   if( !ret ) {
    7080           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7081           0 :     *pnSize = -1;
    7082           0 :     return NULL;
    7083             :   }
    7084          30 :   for( int i = 0; i<*pnSize; i++ ) {
    7085          20 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7086          20 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    7087           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    7088           0 :         Py_DECREF(o);
    7089           0 :         free(ret);
    7090           0 :         *pnSize = -1;
    7091           0 :         return NULL;
    7092             :     }
    7093          20 :     Py_DECREF(o);
    7094             :   }
    7095             :   return ret;
    7096             : }
    7097             : 
    7098          10 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64Array(GDALAttributeHS *self,int nList,long long *pList){
    7099          10 :     return GDALAttributeWriteInt64Array(self, (int64_t*)pList, nList) ? CE_None : CE_Failure;
    7100             :   }
    7101             : 
    7102             : static double*
    7103         178 : CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
    7104             :   /* check if is List */
    7105         178 :   if ( !PySequence_Check(pySeq) ) {
    7106           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7107           1 :     *pnSize = -1;
    7108           1 :     return NULL;
    7109             :   }
    7110         177 :   Py_ssize_t size = PySequence_Size(pySeq);
    7111         177 :   if( size > (Py_ssize_t)INT_MAX ) {
    7112           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7113           0 :     *pnSize = -1;
    7114           0 :     return NULL;
    7115             :   }
    7116         177 :   if( (size_t)size > SIZE_MAX / sizeof(double) ) {
    7117           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7118           0 :     *pnSize = -1;
    7119           0 :     return NULL;
    7120             :   }
    7121         177 :   *pnSize = (int)size;
    7122         177 :   double* ret = (double*) malloc((*pnSize)*sizeof(double));
    7123         177 :   if( !ret ) {
    7124           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7125           0 :     *pnSize = -1;
    7126           0 :     return NULL;
    7127             :   }
    7128         570 :   for( int i = 0; i<*pnSize; i++ ) {
    7129         394 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7130         394 :     if ( !PyArg_Parse(o,"d",&ret[i]) ) {
    7131           1 :         PyErr_SetString(PyExc_TypeError, "not an number");
    7132           1 :         Py_DECREF(o);
    7133           1 :         free(ret);
    7134           1 :         *pnSize = -1;
    7135           1 :         return NULL;
    7136             :     }
    7137         393 :     Py_DECREF(o);
    7138             :   }
    7139             :   return ret;
    7140             : }
    7141             : 
    7142           7 : SWIGINTERN CPLErr GDALAttributeHS_WriteDoubleArray(GDALAttributeHS *self,int nList,double *pList){
    7143           7 :     return GDALAttributeWriteDoubleArray(self, pList, nList) ? CE_None : CE_Failure;
    7144             :   }
    7145          27 : SWIGINTERN CPLErr GDALAttributeHS_Rename(GDALAttributeHS *self,char const *newName){
    7146          27 :     return GDALAttributeRename( self, newName ) ? CE_None : CE_Failure;
    7147             :   }
    7148        4995 : SWIGINTERN void delete_GDALDimensionHS(GDALDimensionHS *self){
    7149        4995 :     GDALDimensionRelease(self);
    7150        4995 :   }
    7151         279 : SWIGINTERN char const *GDALDimensionHS_GetName(GDALDimensionHS *self){
    7152         279 :     return GDALDimensionGetName(self);
    7153             :   }
    7154          82 : SWIGINTERN char const *GDALDimensionHS_GetFullName(GDALDimensionHS *self){
    7155          82 :     return GDALDimensionGetFullName(self);
    7156             :   }
    7157          54 : SWIGINTERN char const *GDALDimensionHS_GetType(GDALDimensionHS *self){
    7158          54 :     return GDALDimensionGetType(self);
    7159             :   }
    7160          22 : SWIGINTERN char const *GDALDimensionHS_GetDirection(GDALDimensionHS *self){
    7161          22 :     return GDALDimensionGetDirection(self);
    7162             :   }
    7163        3725 : SWIGINTERN GUIntBig GDALDimensionHS_GetSize(GDALDimensionHS *self){
    7164        3725 :     return GDALDimensionGetSize(self);
    7165             :   }
    7166         133 : SWIGINTERN GDALMDArrayHS *GDALDimensionHS_GetIndexingVariable(GDALDimensionHS *self){
    7167         133 :     return GDALDimensionGetIndexingVariable(self);
    7168             :   }
    7169          23 : SWIGINTERN bool GDALDimensionHS_SetIndexingVariable(GDALDimensionHS *self,GDALMDArrayHS *array){
    7170          46 :     return GDALDimensionSetIndexingVariable(self, array);
    7171             :   }
    7172          31 : SWIGINTERN CPLErr GDALDimensionHS_Rename(GDALDimensionHS *self,char const *newName){
    7173          31 :     return GDALDimensionRename( self, newName ) ? CE_None : CE_Failure;
    7174             :   }
    7175        4628 : SWIGINTERN void delete_GDALExtendedDataTypeHS(GDALExtendedDataTypeHS *self){
    7176        4628 :     GDALExtendedDataTypeRelease(self);
    7177        4628 :   }
    7178        1972 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_Create(GDALDataType dt){
    7179        1972 :     return GDALExtendedDataTypeCreate(dt);
    7180             :   }
    7181         195 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateString(size_t nMaxStringLength=0,GDALExtendedDataTypeSubType eSubType=GEDTST_NONE){
    7182         195 :     return GDALExtendedDataTypeCreateStringEx(nMaxStringLength, eSubType);
    7183             :   }
    7184          22 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateCompound(char const *name,size_t nTotalSize,int nComps,GDALEDTComponentHS **comps){
    7185          22 :     return GDALExtendedDataTypeCreateCompound(name, nTotalSize, nComps, comps);
    7186             :   }
    7187           8 : SWIGINTERN char const *GDALExtendedDataTypeHS_GetName(GDALExtendedDataTypeHS *self){
    7188           8 :     return GDALExtendedDataTypeGetName(self);
    7189             :   }
    7190        2935 : SWIGINTERN GDALExtendedDataTypeClass GDALExtendedDataTypeHS_GetClass(GDALExtendedDataTypeHS *self){
    7191        2935 :     return GDALExtendedDataTypeGetClass(self);
    7192             :   }
    7193        2100 : SWIGINTERN GDALDataType GDALExtendedDataTypeHS_GetNumericDataType(GDALExtendedDataTypeHS *self){
    7194        2100 :     return GDALExtendedDataTypeGetNumericDataType(self);
    7195             :   }
    7196          51 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetSize(GDALExtendedDataTypeHS *self){
    7197          51 :     return GDALExtendedDataTypeGetSize(self);
    7198             :   }
    7199           3 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetMaxStringLength(GDALExtendedDataTypeHS *self){
    7200           3 :     return GDALExtendedDataTypeGetMaxStringLength(self);
    7201             :   }
    7202         105 : SWIGINTERN GDALExtendedDataTypeSubType GDALExtendedDataTypeHS_GetSubType(GDALExtendedDataTypeHS *self){
    7203         105 :     return GDALExtendedDataTypeGetSubType(self);
    7204             :   }
    7205           1 : SWIGINTERN GDALRasterAttributeTableShadow *GDALExtendedDataTypeHS_GetRAT(GDALExtendedDataTypeHS *self){
    7206           1 :     return GDALExtendedDataTypeGetRAT(self);
    7207             :   }
    7208          21 : SWIGINTERN void GDALExtendedDataTypeHS_GetComponents(GDALExtendedDataTypeHS *self,GDALEDTComponentHS ***pcomps,size_t *pnCount){
    7209          42 :     *pcomps = GDALExtendedDataTypeGetComponents(self, pnCount);
    7210             :   }
    7211           7 : SWIGINTERN bool GDALExtendedDataTypeHS_CanConvertTo(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7212          14 :     return GDALExtendedDataTypeCanConvertTo(self, other);
    7213             :   }
    7214         100 : SWIGINTERN bool GDALExtendedDataTypeHS_Equals(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7215         200 :     return GDALExtendedDataTypeEquals(self, other);
    7216             :   }
    7217          61 : SWIGINTERN void delete_GDALEDTComponentHS(GDALEDTComponentHS *self){
    7218          61 :     GDALEDTComponentRelease(self);
    7219          61 :   }
    7220          20 : SWIGINTERN GDALEDTComponentHS *GDALEDTComponentHS_Create(char const *name,size_t offset,GDALExtendedDataTypeHS *type){
    7221          20 :     return GDALEDTComponentCreate(name, offset, type);
    7222             :   }
    7223          33 : SWIGINTERN char const *GDALEDTComponentHS_GetName(GDALEDTComponentHS *self){
    7224          33 :     return GDALEDTComponentGetName(self);
    7225             :   }
    7226          31 : SWIGINTERN size_t GDALEDTComponentHS_GetOffset(GDALEDTComponentHS *self){
    7227          31 :     return GDALEDTComponentGetOffset(self);
    7228             :   }
    7229          49 : SWIGINTERN GDALExtendedDataTypeHS *GDALEDTComponentHS_GetType(GDALEDTComponentHS *self){
    7230          49 :     return GDALEDTComponentGetType(self);
    7231             :   }
    7232             : 
    7233           6 : GDALRasterAttributeTableShadow* CreateRasterAttributeTableFromMDArrays(
    7234             :     GDALRATTableType eTableType, int nArrays, GDALMDArrayHS **ahArrays,
    7235             :     int nUsages = 0, GDALRATFieldUsage *paeUsages = NULL )
    7236             : {
    7237           6 :   if( nUsages != 0 && nUsages != nArrays )
    7238             :   {
    7239           1 :       CPLError(CE_Failure, CPLE_AppDefined, "nUsages != nArrays");
    7240           1 :       return NULL;
    7241             :   }
    7242           5 :   return GDALCreateRasterAttributeTableFromMDArrays( eTableType, nArrays, (const GDALMDArrayH *)ahArrays, paeUsages );
    7243             : }
    7244             : 
    7245             : 
    7246             : /* Returned size is in bytes or 0 if an error occurred. */
    7247             : static
    7248       19381 : GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    7249             :                                  GIntBig nPixelSpace, GIntBig nLineSpace,
    7250             :                                  int bSpacingShouldBeMultipleOfPixelSize )
    7251             : {
    7252       19381 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    7253             :     {
    7254           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    7255           2 :         return 0;
    7256             :     }
    7257             : 
    7258       19379 :     if (nPixelSpace < 0 || nLineSpace < 0)
    7259             :     {
    7260           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    7261           0 :         return 0;
    7262             :     }
    7263             : 
    7264       19379 :     if (nPixelSize == 0)
    7265             :     {
    7266           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    7267           1 :         return 0;
    7268             :     }
    7269             : 
    7270       19378 :     if( nPixelSpace == 0 )
    7271       19181 :         nPixelSpace = nPixelSize;
    7272         197 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    7273             :     {
    7274           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    7275           0 :         return 0;
    7276             :     }
    7277             : 
    7278       19378 :     if( nLineSpace == 0 )
    7279             :     {
    7280       19330 :         nLineSpace = nPixelSpace * buf_xsize;
    7281             :     }
    7282          48 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    7283             :     {
    7284           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    7285           0 :         return 0;
    7286             :     }
    7287             : 
    7288       19378 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
    7289             : #if SIZEOF_VOIDP == 4
    7290             :     if (nRet > INT_MAX)
    7291             :     {
    7292             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    7293             :         return 0;
    7294             :     }
    7295             : #endif
    7296             : 
    7297       19378 :     return nRet;
    7298             : }
    7299             : 
    7300             : 
    7301             : static
    7302        9141 : CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
    7303             :                              int xoff, int yoff, int xsize, int ysize,
    7304             :                              int buf_xsize, int buf_ysize,
    7305             :                              GDALDataType buf_type,
    7306             :                              GIntBig buf_size, char *buffer,
    7307             :                              GIntBig pixel_space, GIntBig line_space,
    7308             :                              GDALRasterIOExtraArg* psExtraArg )
    7309             : {
    7310        9141 :     GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSizeBytes( buf_type ),
    7311             :                                                    pixel_space, line_space, FALSE );
    7312        9141 :     if ( min_buffer_size == 0 )
    7313             :       return CE_Failure;
    7314             : 
    7315        9140 :     if ( buf_size < min_buffer_size ) {
    7316           1 :       CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    7317           1 :       return CE_Failure;
    7318             :     }
    7319             : 
    7320        9139 :     return GDALRasterIOEx( obj, GF_Write, xoff, yoff, xsize, ysize,
    7321        9139 :                            (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space, psExtraArg );
    7322             : }
    7323             : 
    7324          68 : SWIGINTERN GDALDatasetShadow *GDALRasterBandShadow_GetDataset(GDALRasterBandShadow *self){
    7325          68 :     return (GDALDatasetShadow*) GDALGetBandDataset(self);
    7326             :   }
    7327           8 : SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    7328           8 :     return GDALGetBandNumber(self);
    7329             :   }
    7330         491 : SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
    7331         491 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    7332         491 :   }
    7333           6 : SWIGINTERN void GDALRasterBandShadow_GetActualBlockSize(GDALRasterBandShadow *self,int nXBlockOff,int nYBlockOff,int *pnxvalid,int *pnyvalid,int *pisvalid){
    7334          12 :     *pisvalid = (GDALGetActualBlockSize(self, nXBlockOff, nYBlockOff, pnxvalid, pnyvalid) == CE_None);
    7335             :   }
    7336         839 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    7337         839 :     return GDALGetRasterColorInterpretation(self);
    7338             :   }
    7339         182 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    7340         182 :     return GDALGetRasterColorInterpretation(self);
    7341             :   }
    7342         693 : SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7343         693 :     return GDALSetRasterColorInterpretation( self, val );
    7344             :   }
    7345         409 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7346         409 :     return GDALSetRasterColorInterpretation( self, val );
    7347             :   }
    7348      410205 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    7349      820410 :     *val = GDALGetRasterNoDataValue( self, hasval );
    7350             :   }
    7351          31 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig *val,int *hasval){
    7352          62 :     *val = GDALGetRasterNoDataValueAsInt64( self, hasval );
    7353             :   }
    7354          22 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig *val,int *hasval){
    7355          44 :     *val = GDALGetRasterNoDataValueAsUInt64( self, hasval );
    7356             :   }
    7357         635 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    7358         635 :     return GDALSetRasterNoDataValue( self, d );
    7359             :   }
    7360          21 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig v){
    7361          21 :     return GDALSetRasterNoDataValueAsInt64( self, v );
    7362             :   }
    7363          20 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig v){
    7364          20 :     return GDALSetRasterNoDataValueAsUInt64( self, v );
    7365             :   }
    7366          53 : SWIGINTERN CPLErr GDALRasterBandShadow_DeleteNoDataValue(GDALRasterBandShadow *self){
    7367          53 :     return GDALDeleteRasterNoDataValue(self);
    7368             :   }
    7369          69 : SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
    7370          69 :       return GDALGetRasterUnitType(self);
    7371             :   }
    7372          38 : SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    7373          38 :     return GDALSetRasterUnitType( self, val );
    7374             :   }
    7375          17 : SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    7376          17 :     return GDALGetRasterCategoryNames(self);
    7377             :   }
    7378           0 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    7379           0 :     return GDALSetRasterCategoryNames( self, names );
    7380             :   }
    7381          97 : SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    7382         194 :     *val = GDALGetRasterMinimum( self, hasval );
    7383             :   }
    7384          87 : SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    7385         174 :     *val = GDALGetRasterMaximum( self, hasval );
    7386             :   }
    7387         151 : SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    7388         302 :     *val = GDALGetRasterOffset( self, hasval );
    7389             :   }
    7390         149 : SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    7391         298 :     *val = GDALGetRasterScale( self, hasval );
    7392             :   }
    7393          86 : SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    7394          86 :     return GDALSetRasterOffset( self, val );
    7395             :   }
    7396          87 : SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    7397          87 :     return GDALSetRasterScale( self, val );
    7398             :   }
    7399         136 : SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    7400         136 :     if (min) *min = 0;
    7401         136 :     if (max) *max = 0;
    7402         136 :     if (mean) *mean = 0;
    7403         136 :     if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    7404         136 :     return GDALGetRasterStatistics( self, approx_ok, force,
    7405         136 :             min, max, mean, stddev );
    7406             :   }
    7407         168 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeStatistics(GDALRasterBandShadow *self,bool approx_ok,double *min,double *max,double *mean,double *stddev,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7408         168 :     return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
    7409             :   }
    7410           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    7411           2 :     return GDALSetRasterStatistics( self, min, max, mean, stddev );
    7412             :   }
    7413         535 : SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    7414         535 :     return GDALGetOverviewCount(self);
    7415             :   }
    7416        5612 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    7417        5612 :     return (GDALRasterBandShadow*) GDALGetOverview( self, i );
    7418             :   }
    7419        2000 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetSampleOverview(GDALRasterBandShadow *self,GUIntBig nDesiredSamples){
    7420        2000 :     return (GDALRasterBandShadow*) GDALGetRasterSampleOverviewEx( self, nDesiredSamples );
    7421             :   }
    7422       38740 : SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    7423       38740 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    7424       38740 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    7425       38740 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    7426             :   }
    7427        1506 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int *isvalid,bool approx_ok=false,bool can_return_none=false){
    7428        1506 :     *isvalid = GDALComputeRasterMinMax( self, approx_ok, argout ) == CE_None;
    7429        1506 :     if( !can_return_none && !*isvalid )
    7430             :     {
    7431           4 :         *isvalid = true;
    7432           4 :         argout[0] = CPLAtof("nan");
    7433           4 :         argout[1] = CPLAtof("nan");
    7434             :     }
    7435        1506 :   }
    7436          18 : SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    7437          18 :     GDALComputeBandStats( self, samplestep, argout+0, argout+1,
    7438             :                           NULL, NULL );
    7439          18 :   }
    7440      268595 : SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    7441      268595 :     return GDALFillRaster( self, real_fill, imag_fill );
    7442             :   }
    7443        9141 : 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){
    7444        9141 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7445        9141 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7446        9141 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7447        9141 :                                         : *buf_type;
    7448        9141 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7449        9141 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7450        9141 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    7451        9141 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    7452        9141 :                                  nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space, psExtraArg );
    7453             :   }
    7454         391 : SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    7455         391 :     GDALFlushRasterCache( self );
    7456         391 :   }
    7457         130 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    7458         130 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7459             :   }
    7460         131 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    7461         131 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7462             :   }
    7463          46 : SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7464          92 :     return GDALSetRasterColorTable( self, arg );
    7465             :   }
    7466          30 : SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7467          60 :     return GDALSetRasterColorTable( self, arg );
    7468             :   }
    7469          70 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){
    7470          70 :       return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
    7471             :   }
    7472          18 : SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
    7473          36 :       return GDALSetDefaultRAT(self, table);
    7474             :   }
    7475       10834 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
    7476       10834 :       return (GDALRasterBandShadow *) GDALGetMaskBand( self );
    7477             :   }
    7478         456 : SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
    7479         456 :       return GDALGetMaskFlags( self );
    7480             :   }
    7481          34 : SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
    7482          34 :       return GDALCreateMaskBand( self, nFlags );
    7483             :   }
    7484          37 : SWIGINTERN bool GDALRasterBandShadow_IsMaskBand(GDALRasterBandShadow *self){
    7485          37 :       return GDALIsMaskBand( self );
    7486             :   }
    7487          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){
    7488          26 :     CPLErrorReset();
    7489          26 :     CPLErr err = GDALGetRasterHistogramEx( self, min, max, buckets, panHistogram,
    7490             :                                          include_out_of_range, approx_ok,
    7491             :                                          callback, callback_data );
    7492          26 :     return err;
    7493             :   }
    7494          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){
    7495          13 :     return GDALGetDefaultHistogramEx( self, min_ret, max_ret, buckets_ret,
    7496             :                                     ppanHistogram, force,
    7497             :                                     callback, callback_data );
    7498             : }
    7499           5 : SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,GUIntBig *panHistogram_in){
    7500           5 :     return GDALSetDefaultHistogramEx( self, min, max,
    7501             :                                     buckets_in, panHistogram_in );
    7502             : }
    7503          17 : SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
    7504          34 :       return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
    7505             :   }
    7506          10 : SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    7507          10 :     return GDALGetRasterCategoryNames( self );
    7508             :   }
    7509           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    7510           2 :     return GDALSetRasterCategoryNames( self, papszCategoryNames );
    7511             :   }
    7512           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){
    7513           1 :         CPLVirtualMem* vmem = GDALRasterBandGetVirtualMem( self,
    7514             :                                          eRWFlag,
    7515             :                                          nXOff, nYOff,
    7516             :                                          nXSize, nYSize,
    7517             :                                          nBufXSize, nBufYSize,
    7518             :                                          eBufType,
    7519             :                                          0,
    7520             :                                          0,
    7521             :                                          nCacheSize,
    7522             :                                          nPageSizeHint,
    7523             :                                          FALSE,
    7524             :                                          options );
    7525           1 :         if( vmem == NULL )
    7526             :             return NULL;
    7527           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7528           1 :         vmemshadow->vmem = vmem;
    7529           1 :         vmemshadow->eBufType = eBufType;
    7530           1 :         vmemshadow->bIsBandSequential = TRUE;
    7531           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7532           1 :         vmemshadow->nBufXSize = nBufXSize;
    7533           1 :         vmemshadow->nBufYSize = nBufYSize;
    7534           1 :         vmemshadow->nBandCount = 1;
    7535           1 :         return vmemshadow;
    7536             :     }
    7537          21 : SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMemAuto(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,char **options=NULL){
    7538          21 :         int            nPixelSpace;
    7539          21 :         GIntBig        nLineSpace;
    7540          21 :         CPLVirtualMem* vmem = GDALGetVirtualMemAuto( self,
    7541             :                                          eRWFlag,
    7542             :                                          &nPixelSpace,
    7543             :                                          &nLineSpace,
    7544             :                                          options );
    7545          21 :         if( vmem == NULL )
    7546             :             return NULL;
    7547          20 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7548          20 :         vmemshadow->vmem = vmem;
    7549          20 :         vmemshadow->eBufType = GDALGetRasterDataType( self );
    7550          20 :         vmemshadow->bAuto = TRUE;
    7551          20 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7552          20 :         vmemshadow->nBandCount = 1;
    7553          20 :         vmemshadow->nPixelSpace = nPixelSpace;
    7554          20 :         vmemshadow->nLineSpace = nLineSpace;
    7555          20 :         vmemshadow->nBufXSize = GDALGetRasterBandXSize(self);
    7556          20 :         vmemshadow->nBufYSize = GDALGetRasterBandYSize(self);
    7557          20 :         return vmemshadow;
    7558             :     }
    7559           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){
    7560           1 :         CPLVirtualMem* vmem = GDALRasterBandGetTiledVirtualMem( self,
    7561             :                                          eRWFlag,
    7562             :                                          nXOff, nYOff,
    7563             :                                          nXSize, nYSize,
    7564             :                                          nTileXSize, nTileYSize,
    7565             :                                          eBufType,
    7566             :                                          nCacheSize,
    7567             :                                          FALSE,
    7568             :                                          options );
    7569           1 :         if( vmem == NULL )
    7570             :             return NULL;
    7571           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7572           1 :         vmemshadow->vmem = vmem;
    7573           1 :         vmemshadow->eBufType = eBufType;
    7574           1 :         vmemshadow->bIsBandSequential = -1;
    7575           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7576           1 :         vmemshadow->nBufXSize = nXSize;
    7577           1 :         vmemshadow->nBufYSize = nYSize;
    7578           1 :         vmemshadow->eTileOrganization = GTO_BSQ;
    7579           1 :         vmemshadow->nTileXSize = nTileXSize;
    7580           1 :         vmemshadow->nTileYSize = nTileYSize;
    7581           1 :         vmemshadow->nBandCount = 1;
    7582           1 :         return vmemshadow;
    7583             :     }
    7584          26 : SWIGINTERN int GDALRasterBandShadow_GetDataCoverageStatus(GDALRasterBandShadow *self,int nXOff,int nYOff,int nXSize,int nYSize,int nMaskFlagStop=0,double *pdfDataPct=NULL){
    7585          26 :         return GDALGetDataCoverageStatus(self, nXOff, nYOff,
    7586             :                                          nXSize, nYSize,
    7587             :                                          nMaskFlagStop,
    7588             :                                          pdfDataPct);
    7589             :     }
    7590           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){
    7591           2 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7592           2 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7593           2 :     GDALDataType ntype;
    7594           2 :     if ( buf_type != 0 ) {
    7595           0 :       ntype = (GDALDataType) *buf_type;
    7596             :     } else {
    7597           2 :       ntype = GDALGetRasterDataType( self );
    7598             :     }
    7599           2 :     return GDALRasterAdviseRead(self, xoff, yoff, xsize, ysize,
    7600           2 :                                 nxsize, nysize, ntype, options);
    7601             : }
    7602          69 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtPoint(GDALRasterBandShadow *self,double pixel,double line,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue){
    7603          69 :     if (pdfRealValue) *pdfRealValue = 0;
    7604          69 :     if (pdfImagValue) *pdfImagValue = 0;
    7605          69 :     return GDALRasterInterpolateAtPoint( self, pixel, line, interpolation, pdfRealValue, pdfImagValue );
    7606             :   }
    7607          15 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtGeolocation(GDALRasterBandShadow *self,double geolocX,double geolocY,OSRSpatialReferenceShadow *srs,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue,char **transformerOptions=NULL){
    7608          15 :     if (pdfRealValue) *pdfRealValue = 0;
    7609          15 :     if (pdfImagValue) *pdfImagValue = 0;
    7610          15 :     return GDALRasterInterpolateAtGeolocation( self, geolocX, geolocY,
    7611             :                 (OGRSpatialReferenceH)srs, interpolation,
    7612             :                 pdfRealValue, pdfImagValue, transformerOptions );
    7613             :   }
    7614           2 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeMinMaxLocation(GDALRasterBandShadow *self,double *pdfMin,double *pdfMax,int *pnMinX,int *pnMinY,int *pnMaxX,int *pnMaxY){
    7615           2 :     return GDALComputeRasterMinMaxLocation( self, pdfMin, pdfMax,
    7616             :                                             pnMinX, pnMinY,
    7617             :                                             pnMaxX, pnMaxY );
    7618             :   }
    7619          24 : SWIGINTERN GDALMDArrayHS *GDALRasterBandShadow_AsMDArray(GDALRasterBandShadow *self){
    7620          24 :     return GDALRasterBandAsMDArray(self);
    7621             :   }
    7622        4884 : SWIGINTERN void GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(GDALRasterBandShadow *self,bool b){
    7623        4884 :       GDALEnablePixelTypeSignedByteWarning(self, b);
    7624        4884 :   }
    7625           6 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_UnaryOp(GDALRasterBandShadow *self,GDALRasterAlgebraUnaryOperation op){
    7626           6 :       return GDALRasterBandUnaryOp(self, op);
    7627             :   }
    7628          57 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpBand(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *other){
    7629          57 :       return GDALRasterBandBinaryOpBand(self, op, other);
    7630             :   }
    7631          59 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDouble(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,double constant){
    7632          59 :       return GDALRasterBandBinaryOpDouble(self, op, constant);
    7633             :   }
    7634          18 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDoubleToBand(double constant,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *band){
    7635          18 :       return GDALRasterBandBinaryOpDoubleToBand(constant, op, band);
    7636             :   }
    7637          12 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_IfThenElse(GDALRasterBandShadow *condBand,GDALRasterBandShadow *thenBand,GDALRasterBandShadow *elseBand){
    7638          12 :       return GDALRasterBandIfThenElse(condBand, thenBand, elseBand);
    7639             :   }
    7640          16 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_AsType(GDALRasterBandShadow *self,GDALDataType dt){
    7641          16 :       return GDALRasterBandAsDataType(self, dt);
    7642             :   }
    7643           4 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaximumOfNBands(int band_count,GDALRasterBandShadow **bands){
    7644           4 :      return GDALMaximumOfNBands(band_count, bands);
    7645             :   }
    7646           2 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaxConstant(GDALRasterBandShadow *self,double constant){
    7647           2 :       return GDALRasterBandMaxConstant(self, constant);
    7648             :   }
    7649           4 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinimumOfNBands(int band_count,GDALRasterBandShadow **bands){
    7650           4 :      return GDALMinimumOfNBands(band_count, bands);
    7651             :   }
    7652           2 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinConstant(GDALRasterBandShadow *self,double constant){
    7653           2 :       return GDALRasterBandMinConstant(self, constant);
    7654             :   }
    7655           3 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MeanOfNBands(int band_count,GDALRasterBandShadow **bands){
    7656           3 :      return GDALMeanOfNBands(band_count, bands);
    7657             :   }
    7658       10240 : 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){
    7659             : 
    7660       10240 :     *buf = NULL;
    7661             : 
    7662       10240 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    7663       10240 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    7664       10240 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7665       10240 :                                         : *buf_type;
    7666       10240 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7667       10240 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7668             : 
    7669       10240 :     size_t buf_size = static_cast<size_t>(
    7670       10240 :         ComputeBandRasterIOSize( nxsize, nysize,
    7671             :                                  GDALGetDataTypeSizeBytes( ntype ),
    7672       10240 :                                  pixel_space, line_space, FALSE ) );
    7673       10240 :     if (buf_size == 0)
    7674             :     {
    7675             :         return CE_Failure;
    7676             :     }
    7677             : 
    7678       10238 :     char *data;
    7679       10238 :     Py_buffer view;
    7680       14517 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    7681             :                                   GetUseExceptions(), data, view) )
    7682             :     {
    7683             :         return CE_Failure;
    7684             :     }
    7685             : 
    7686             :     /* Should we clear the buffer in case there are hole in it ? */
    7687       10225 :     if( inputOutputBuf == NULL &&
    7688       10213 :         line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    7689             :     {
    7690           4 :         memset(data, 0, buf_size);
    7691             :     }
    7692             : 
    7693       10225 :     GDALRasterIOExtraArg sExtraArg;
    7694       10225 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    7695       10225 :     sExtraArg.eResampleAlg = resample_alg;
    7696       10225 :     sExtraArg.pfnProgress = callback;
    7697       10225 :     sExtraArg.pProgressData = callback_data;
    7698       10225 :     int nXOff = (int)(xoff + 0.5);
    7699       10225 :     int nYOff = (int)(yoff + 0.5);
    7700       10225 :     int nXSize = (int)(xsize + 0.5);
    7701       10225 :     int nYSize = (int)(ysize + 0.5);
    7702       10225 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    7703       10219 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    7704             :     {
    7705           8 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    7706           8 :         sExtraArg.dfXOff = xoff;
    7707           8 :         sExtraArg.dfYOff = yoff;
    7708           8 :         sExtraArg.dfXSize = xsize;
    7709           8 :         sExtraArg.dfYSize = ysize;
    7710             :     }
    7711             : 
    7712       10225 :     CPLErr eErr = GDALRasterIOEx( self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    7713             :                          data, nxsize, nysize, ntype,
    7714             :                          pixel_space, line_space, &sExtraArg );
    7715             : 
    7716       10225 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    7717             : 
    7718             :     return eErr;
    7719             :   }
    7720          90 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf,void *buf_obj=NULL){
    7721             : 
    7722          90 :     int nBlockXSize, nBlockYSize;
    7723          90 :     GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    7724          90 :     GDALDataType ntype = GDALGetRasterDataType(self);
    7725          90 :     int nDataTypeSize = GDALGetDataTypeSizeBytes(ntype);
    7726          90 :     size_t buf_size = static_cast<size_t>(nBlockXSize) *
    7727          90 :                                                 nBlockYSize * nDataTypeSize;
    7728             : 
    7729          90 :     *buf = NULL;
    7730             : 
    7731          90 :     char *data;
    7732          90 :     Py_buffer view;
    7733             : 
    7734         124 :     if( !readraster_acquirebuffer(buf, buf_obj, buf_size, ntype,
    7735             :                                   GetUseExceptions(), data, view) )
    7736             :     {
    7737             :         return CE_Failure;
    7738             :     }
    7739             : 
    7740          77 :     CPLErr eErr = GDALReadBlock( self, xoff, yoff, data);
    7741             : 
    7742          77 :     readraster_releasebuffer(eErr, buf, buf_obj, view);
    7743             : 
    7744             :     return eErr;
    7745             :   }
    7746             : 
    7747      849817 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    7748      849817 :   return GDALGetRasterDataType( h );
    7749             : }
    7750       17985 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    7751       17985 :   return GDALGetRasterBandXSize( h );
    7752             : }
    7753       16846 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    7754       16846 :   return GDALGetRasterBandYSize( h );
    7755             : }
    7756             : 
    7757         163 : SWIGINTERN void delete_GDALComputedRasterBandShadow(GDALComputedRasterBandShadow *self){
    7758         163 :       GDALComputedRasterBandRelease(self);
    7759         163 :   }
    7760          56 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    7761          56 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    7762             :     }
    7763          68 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    7764          68 :         GDALDestroyColorTable(self);
    7765          68 :     }
    7766          12 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    7767          12 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    7768             :     }
    7769           2 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    7770           2 :         return GDALGetPaletteInterpretation(self);
    7771             :     }
    7772          73 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    7773          73 :         return GDALGetColorEntryCount(self);
    7774             :     }
    7775        4719 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    7776        4719 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    7777             :     }
    7778           0 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    7779           0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    7780             :     }
    7781        1379 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    7782        1379 :         GDALSetColorEntry(self, entry, centry);
    7783        1379 :     }
    7784           1 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    7785           1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    7786           1 :     }
    7787             : 
    7788             : #include "gdalsubdatasetinfo.h"
    7789             : 
    7790          60 : SWIGINTERN void delete_GDALSubdatasetInfoShadow(GDALSubdatasetInfoShadow *self){
    7791          60 :             GDALDestroySubdatasetInfo(reinterpret_cast<GDALSubdatasetInfoH>(self));
    7792          60 :         }
    7793          35 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetPathComponent(GDALSubdatasetInfoShadow *self){
    7794          35 :             return GDALSubdatasetInfoGetPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7795             :         }
    7796          39 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetSubdatasetComponent(GDALSubdatasetInfoShadow *self){
    7797          39 :         return GDALSubdatasetInfoGetSubdatasetComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7798             :         }
    7799          21 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_ModifyPathComponent(GDALSubdatasetInfoShadow *self,char const *pszNewFileName){
    7800          21 :         return GDALSubdatasetInfoModifyPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self), pszNewFileName );
    7801             :         }
    7802             : 
    7803          83 : GDALSubdatasetInfoShadow* GetSubdatasetInfo(const char *pszFileName)
    7804             : {
    7805          83 :     GDALSubdatasetInfoH info { GDALGetSubdatasetInfo(pszFileName) };
    7806             : 
    7807          83 :     if( ! info )
    7808             :     {
    7809          23 :       return nullptr;
    7810             :     }
    7811             : 
    7812             :     return (GDALSubdatasetInfoShadow*)( info );
    7813             : };
    7814             : 
    7815          29 : SWIGINTERN GDALRelationshipShadow *new_GDALRelationshipShadow(char const *name,char const *leftTableName,char const *rightTableName,GDALRelationshipCardinality cardinality){
    7816          29 :         return (GDALRelationshipShadow*)
    7817          29 :         GDALRelationshipCreate(name,
    7818             :                                leftTableName,
    7819             :                                rightTableName,
    7820             :                                cardinality);
    7821             :     }
    7822          29 : SWIGINTERN void delete_GDALRelationshipShadow(GDALRelationshipShadow *self){
    7823          29 :         GDALDestroyRelationship(self);
    7824          29 :     }
    7825          31 : SWIGINTERN char const *GDALRelationshipShadow_GetName(GDALRelationshipShadow *self){
    7826          31 :         return GDALRelationshipGetName( self );
    7827             :     }
    7828          47 : SWIGINTERN GDALRelationshipCardinality GDALRelationshipShadow_GetCardinality(GDALRelationshipShadow *self){
    7829          47 :         return GDALRelationshipGetCardinality( self );
    7830             :     }
    7831          49 : SWIGINTERN char const *GDALRelationshipShadow_GetLeftTableName(GDALRelationshipShadow *self){
    7832          49 :         return GDALRelationshipGetLeftTableName( self );
    7833             :     }
    7834          49 : SWIGINTERN char const *GDALRelationshipShadow_GetRightTableName(GDALRelationshipShadow *self){
    7835          49 :         return GDALRelationshipGetRightTableName( self );
    7836             :     }
    7837          34 : SWIGINTERN char const *GDALRelationshipShadow_GetMappingTableName(GDALRelationshipShadow *self){
    7838          34 :         return GDALRelationshipGetMappingTableName( self );
    7839             :     }
    7840          14 : SWIGINTERN void GDALRelationshipShadow_SetMappingTableName(GDALRelationshipShadow *self,char const *pszName){
    7841          14 :         GDALRelationshipSetMappingTableName( self, pszName );
    7842          14 :     }
    7843          48 : SWIGINTERN char **GDALRelationshipShadow_GetLeftTableFields(GDALRelationshipShadow *self){
    7844          48 :            return GDALRelationshipGetLeftTableFields(self);
    7845             :         }
    7846          48 : SWIGINTERN char **GDALRelationshipShadow_GetRightTableFields(GDALRelationshipShadow *self){
    7847          48 :             return GDALRelationshipGetRightTableFields(self);
    7848             :         }
    7849          37 : SWIGINTERN void GDALRelationshipShadow_SetLeftTableFields(GDALRelationshipShadow *self,char **pFields){
    7850          37 :             GDALRelationshipSetLeftTableFields(self, pFields);
    7851          37 :         }
    7852          38 : SWIGINTERN void GDALRelationshipShadow_SetRightTableFields(GDALRelationshipShadow *self,char **pFields){
    7853          38 :             GDALRelationshipSetRightTableFields(self, pFields);
    7854          38 :         }
    7855          23 : SWIGINTERN char **GDALRelationshipShadow_GetLeftMappingTableFields(GDALRelationshipShadow *self){
    7856          23 :             return GDALRelationshipGetLeftMappingTableFields(self);
    7857             :         }
    7858          23 : SWIGINTERN char **GDALRelationshipShadow_GetRightMappingTableFields(GDALRelationshipShadow *self){
    7859          23 :             return GDALRelationshipGetRightMappingTableFields(self);
    7860             :         }
    7861           9 : SWIGINTERN void GDALRelationshipShadow_SetLeftMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7862           9 :           GDALRelationshipSetLeftMappingTableFields(self, pFields);
    7863           9 :       }
    7864           9 : SWIGINTERN void GDALRelationshipShadow_SetRightMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7865           9 :           GDALRelationshipSetRightMappingTableFields(self, pFields);
    7866           9 :       }
    7867          47 : SWIGINTERN GDALRelationshipType GDALRelationshipShadow_GetType(GDALRelationshipShadow *self){
    7868          47 :         return GDALRelationshipGetType( self );
    7869             :     }
    7870          10 : SWIGINTERN void GDALRelationshipShadow_SetType(GDALRelationshipShadow *self,GDALRelationshipType type){
    7871          10 :       return GDALRelationshipSetType( self, type );
    7872             :     }
    7873          14 : SWIGINTERN char const *GDALRelationshipShadow_GetForwardPathLabel(GDALRelationshipShadow *self){
    7874          14 :         return GDALRelationshipGetForwardPathLabel( self );
    7875             :     }
    7876           9 : SWIGINTERN void GDALRelationshipShadow_SetForwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7877           9 :         GDALRelationshipSetForwardPathLabel( self, pszLabel );
    7878           9 :     }
    7879          14 : SWIGINTERN char const *GDALRelationshipShadow_GetBackwardPathLabel(GDALRelationshipShadow *self){
    7880          14 :         return GDALRelationshipGetBackwardPathLabel( self );
    7881             :     }
    7882           9 : SWIGINTERN void GDALRelationshipShadow_SetBackwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7883           9 :         GDALRelationshipSetBackwardPathLabel( self, pszLabel );
    7884           9 :     }
    7885          44 : SWIGINTERN char const *GDALRelationshipShadow_GetRelatedTableType(GDALRelationshipShadow *self){
    7886          44 :         return GDALRelationshipGetRelatedTableType( self );
    7887             :     }
    7888          20 : SWIGINTERN void GDALRelationshipShadow_SetRelatedTableType(GDALRelationshipShadow *self,char const *pszType){
    7889          20 :         GDALRelationshipSetRelatedTableType( self, pszType );
    7890          20 :     }
    7891             : 
    7892             : #include "gdalgrid.h"
    7893             : 
    7894             : #ifdef DEBUG
    7895             : typedef struct OGRLayerHS OGRLayerShadow;
    7896             : typedef struct OGRGeometryHS OGRGeometryShadow;
    7897             : #else
    7898             : typedef void OGRLayerShadow;
    7899             : typedef void OGRGeometryShadow;
    7900             : #endif
    7901             : 
    7902             : 
    7903             : static int
    7904        3713 : GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    7905        3713 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    7906             : }
    7907             : 
    7908             : 
    7909           4 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    7910             :                               GDALRasterBandShadow *green,
    7911             :                               GDALRasterBandShadow *blue,
    7912             :                               int num_colors,
    7913             :                               GDALColorTableShadow* colors,
    7914             :                               GDALProgressFunc callback = NULL,
    7915             :                               void* callback_data=NULL) {
    7916             : 
    7917           4 :     CPLErrorReset();
    7918             : 
    7919           4 :     int err = GDALComputeMedianCutPCT( red,
    7920             :                                           green,
    7921             :                                           blue,
    7922             :                                           NULL,
    7923             :                                           num_colors,
    7924             :                                           colors,
    7925             :                                           callback,
    7926             :                                           callback_data);
    7927             : 
    7928           4 :     return err;
    7929             : }
    7930             : 
    7931             : 
    7932           7 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    7933             :                      GDALRasterBandShadow *green,
    7934             :                      GDALRasterBandShadow *blue,
    7935             :                      GDALRasterBandShadow *target,
    7936             :                      GDALColorTableShadow *colors,
    7937             :                      GDALProgressFunc callback = NULL,
    7938             :                      void* callback_data=NULL) {
    7939             : 
    7940           7 :     CPLErrorReset();
    7941           7 :     int err;
    7942           7 :     err = GDALDitherRGB2PCT(  red,
    7943             :                                   green,
    7944             :                                   blue,
    7945             :                                   target,
    7946             :                                   colors,
    7947             :                                   callback,
    7948             :                                   callback_data);
    7949             : 
    7950           7 :     return err;
    7951             : }
    7952             : 
    7953             : 
    7954          62 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    7955             :                          GDALDatasetShadow *dst_ds,
    7956             :                          const char *src_wkt=NULL,
    7957             :                          const char *dst_wkt=NULL,
    7958             :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    7959             :                          double WarpMemoryLimit=0.0,
    7960             :                          double maxerror = 0.0,
    7961             :        GDALProgressFunc callback = NULL,
    7962             :                        void* callback_data=NULL,
    7963             :                          char** options = NULL ) {
    7964             : 
    7965          62 :     CPLErrorReset();
    7966             : 
    7967          62 :     GDALWarpOptions* psOptions = NULL;
    7968          62 :     if( options != NULL )
    7969             :     {
    7970           1 :         psOptions = GDALCreateWarpOptions();
    7971           1 :         psOptions->papszWarpOptions = CSLDuplicate(options);
    7972             :     }
    7973             : 
    7974          62 :     CPLErr err = GDALReprojectImage( src_ds,
    7975             :                                      src_wkt,
    7976             :                                      dst_ds,
    7977             :                                      dst_wkt,
    7978             :                                      eResampleAlg,
    7979             :                                      WarpMemoryLimit,
    7980             :                                      maxerror,
    7981             :                                      callback,
    7982             :                                      callback_data,
    7983             :                                      psOptions);
    7984             : 
    7985          62 :     if( psOptions != NULL )
    7986           1 :         GDALDestroyWarpOptions(psOptions);
    7987             : 
    7988          62 :     return err;
    7989             : }
    7990             : 
    7991             : 
    7992           6 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    7993             :                        GDALRasterBandShadow *proximityBand,
    7994             :                        char **options = NULL,
    7995             :                        GDALProgressFunc callback=NULL,
    7996             :                        void* callback_data=NULL) {
    7997             : 
    7998           6 :     CPLErrorReset();
    7999             : 
    8000           6 :     return GDALComputeProximity( srcBand, proximityBand, options,
    8001           6 :                                  callback, callback_data );
    8002             : }
    8003             : 
    8004             : 
    8005          42 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    8006             :                  int bands, int *band_list,
    8007             :                  OGRLayerShadow *layer,
    8008             :                  void *pfnTransformer = NULL,
    8009             :                  void *pTransformArg = NULL,
    8010             :      int burn_values = 0, double *burn_values_list = NULL,
    8011             :                  char **options = NULL,
    8012             :                  GDALProgressFunc callback=NULL,
    8013             :                  void* callback_data=NULL) {
    8014             : 
    8015          42 :     CPLErr eErr;
    8016             : 
    8017          42 :     CPLErrorReset();
    8018             : 
    8019          42 :     if( burn_values == 0 )
    8020             :     {
    8021           1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    8022           4 :         for( int i = 0; i < bands; i++ )
    8023           3 :             burn_values_list[i] = 255.0;
    8024             :     }
    8025          41 :     else if( burn_values != bands )
    8026             :     {
    8027           0 :         CPLError( CE_Failure, CPLE_AppDefined,
    8028             :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    8029           0 :         return CE_Failure;
    8030             :     }
    8031             : 
    8032          42 :     OGRLayerH hLayer = (OGRLayerH)layer;
    8033          42 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    8034             :                                 1, &hLayer,
    8035             :                                 (GDALTransformerFunc) pfnTransformer,
    8036             :                                 pTransformArg,
    8037             :                                 burn_values_list, options,
    8038             :                                 callback, callback_data );
    8039             : 
    8040          42 :     if( burn_values == 0 )
    8041           1 :         CPLFree( burn_values_list );
    8042             : 
    8043          42 :     return eErr;
    8044             : }
    8045             : 
    8046             : 
    8047          21 : int  Polygonize( GDALRasterBandShadow *srcBand,
    8048             :          GDALRasterBandShadow *maskBand,
    8049             :              OGRLayerShadow *outLayer,
    8050             :                  int iPixValField,
    8051             :                  char **options = NULL,
    8052             :                  GDALProgressFunc callback=NULL,
    8053             :                  void* callback_data=NULL) {
    8054             : 
    8055          21 :     CPLErrorReset();
    8056             : 
    8057          21 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    8058          21 :                            options, callback, callback_data );
    8059             : }
    8060             : 
    8061             : 
    8062           1 : int  FPolygonize( GDALRasterBandShadow *srcBand,
    8063             :                  GDALRasterBandShadow *maskBand,
    8064             :                  OGRLayerShadow *outLayer,
    8065             :                  int iPixValField,
    8066             :                  char **options = NULL,
    8067             :                  GDALProgressFunc callback=NULL,
    8068             :                  void* callback_data=NULL) {
    8069             : 
    8070           1 :     CPLErrorReset();
    8071             : 
    8072           1 :     return GDALFPolygonize( srcBand, maskBand, outLayer, iPixValField,
    8073           1 :                            options, callback, callback_data );
    8074             : }
    8075             : 
    8076             : 
    8077          29 : int  FillNodata( GDALRasterBandShadow *targetBand,
    8078             :          GDALRasterBandShadow *maskBand,
    8079             :                  double maxSearchDist,
    8080             :                  int smoothingIterations,
    8081             :                  char **options = NULL,
    8082             :                  GDALProgressFunc callback=NULL,
    8083             :                  void* callback_data=NULL) {
    8084             : 
    8085          29 :     CPLErrorReset();
    8086             : 
    8087          29 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist,
    8088             :                0, smoothingIterations, options,
    8089          29 :          callback, callback_data );
    8090             : }
    8091             : 
    8092             : 
    8093          12 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    8094             :           GDALRasterBandShadow *maskBand,
    8095             :               GDALRasterBandShadow *dstBand,
    8096             :                   int threshold, int connectedness=4,
    8097             :                   char **options = NULL,
    8098             :                   GDALProgressFunc callback=NULL,
    8099             :                   void* callback_data=NULL) {
    8100             : 
    8101          12 :     CPLErrorReset();
    8102             : 
    8103          12 :     return GDALSieveFilter( srcBand, maskBand, dstBand,
    8104             :                             threshold, connectedness,
    8105          12 :                             options, callback, callback_data );
    8106             : }
    8107             : 
    8108             : 
    8109           2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    8110             :             int overviewBandCount,
    8111             :                           GDALRasterBandShadow **overviewBands,
    8112             :                           const char *resampling = "average",
    8113             :                           GDALProgressFunc callback=NULL,
    8114             :                           void* callback_data=NULL) {
    8115             : 
    8116           2 :     CPLErrorReset();
    8117             : 
    8118           2 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    8119           2 :                   resampling ? resampling : "average", callback, callback_data );
    8120             : }
    8121             : 
    8122             : 
    8123         248 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    8124             :                           GDALRasterBandShadow *overviewBand,
    8125             :                           const char *resampling = "average",
    8126             :                           GDALProgressFunc callback=NULL,
    8127             :                           void* callback_data=NULL) {
    8128             : 
    8129         248 :     CPLErrorReset();
    8130             : 
    8131         248 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    8132         248 :                   resampling ? resampling : "average", callback, callback_data );
    8133             : }
    8134             : 
    8135             : 
    8136           3 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    8137             :                      double contourInterval,
    8138             :                      double contourBase,
    8139             :                      int fixedLevelCount,
    8140             :                      double *fixedLevels,
    8141             :                      int useNoData,
    8142             :                      double noDataValue,
    8143             :                      OGRLayerShadow* dstLayer,
    8144             :                      int idField,
    8145             :                      int elevField,
    8146             :                      GDALProgressFunc callback = NULL,
    8147             :                      void* callback_data = NULL)
    8148             : {
    8149           3 :     CPLErr eErr;
    8150             : 
    8151           3 :     CPLErrorReset();
    8152             : 
    8153           3 :     eErr =  GDALContourGenerate( srcBand,
    8154             :                                  contourInterval,
    8155             :                                  contourBase,
    8156             :                                  fixedLevelCount,
    8157             :                                  fixedLevels,
    8158             :                                  useNoData,
    8159             :                                  noDataValue,
    8160             :                                  dstLayer,
    8161             :                                  idField,
    8162             :                                  elevField,
    8163             :                                  callback,
    8164             :                                  callback_data);
    8165             : 
    8166           3 :     return eErr;
    8167             : }
    8168             : 
    8169             : 
    8170          25 : int ContourGenerateEx( GDALRasterBandShadow *srcBand,
    8171             :                        OGRLayerShadow* dstLayer,
    8172             :                        char** options = NULL,
    8173             :                        GDALProgressFunc callback = NULL,
    8174             :                        void* callback_data = NULL )
    8175             : {
    8176          25 :     CPLErr eErr;
    8177             : 
    8178          25 :     CPLErrorReset();
    8179             : 
    8180          25 :     eErr =  GDALContourGenerateEx( srcBand,
    8181             :                                    dstLayer,
    8182             :                                    options,
    8183             :                                    callback,
    8184             :                                    callback_data);
    8185             : 
    8186          25 :     return eErr;
    8187             : }
    8188             : 
    8189             : 
    8190           0 : GDALDatasetShadow *ViewshedGenerate( GDALRasterBandShadow *srcBand,
    8191             :                         const char* driverName,
    8192             :                         const char* targetRasterName,
    8193             :                         char** creationOptions,
    8194             :                         double observerX, double observerY, double observerHeight,
    8195             :                         double targetHeight, double visibleVal, double invisibleVal,
    8196             :                         double outOfRangeVal,  double noDataVal, double dfCurvCoeff,
    8197             :                         GDALViewshedMode mode, double maxDistance,
    8198             :                         GDALProgressFunc callback = NULL, void* callback_data = NULL,
    8199             :                         GDALViewshedOutputType heightMode = GVOT_NORMAL,
    8200             :                         char** options = NULL)
    8201             : {
    8202           0 :     GDALDatasetShadow* ds = GDALViewshedGenerate( srcBand,
    8203             :                                  driverName,
    8204             :                                  targetRasterName,
    8205             :                                  creationOptions,
    8206             :                                  observerX,
    8207             :                                  observerY,
    8208             :                                  observerHeight,
    8209             :                                  targetHeight,
    8210             :                                  visibleVal,
    8211             :                                  invisibleVal,
    8212             :                                  outOfRangeVal,
    8213             :                                  noDataVal,
    8214             :                                  dfCurvCoeff,
    8215             :                                  mode,
    8216             :                                  maxDistance,
    8217             :                                  callback,
    8218             :                                  callback_data,
    8219             :                                  heightMode,
    8220             :                                  options);
    8221           0 :   if (ds == 0) {
    8222             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8223             :   }
    8224           0 :   return ds;
    8225             : }
    8226             : 
    8227             : 
    8228           5 : void IsLineOfSightVisible(GDALRasterBandShadow *band,
    8229             :                           int xA, int yA, double zA,
    8230             :                           int xB, int yB, double zB,
    8231             :                           bool *pbVisible, int *pnXIntersection, int *pnYIntersection,
    8232             :                           char** options = NULL)
    8233             : {
    8234           5 :     *pbVisible = GDALIsLineOfSightVisible(band, xA, yA, zA, xB, yB, zB, pnXIntersection, pnYIntersection, options);
    8235           5 : }
    8236             : 
    8237             : 
    8238          24 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    8239             :                                         const char *src_wkt = 0,
    8240             :                                         const char *dst_wkt = 0,
    8241             :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    8242             :                                         double maxerror = 0.0 ) {
    8243          24 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    8244             :                                                    dst_wkt,
    8245             :                                                    eResampleAlg,
    8246             :                                                    maxerror,
    8247             :                                                    0 );
    8248          24 :   if (ds == 0) {
    8249             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8250             :   }
    8251          24 :   return ds;
    8252             : 
    8253             : }
    8254             : 
    8255             : 
    8256           8 : GDALDatasetShadow*  CreatePansharpenedVRT( const char* pszXML,
    8257             :                             GDALRasterBandShadow* panchroBand,
    8258             :                             int nInputSpectralBands,
    8259             :                             GDALRasterBandShadow** ahInputSpectralBands )
    8260             : {
    8261           8 :     CPLErrorReset();
    8262             : 
    8263           8 :     return (GDALDatasetShadow*)GDALCreatePansharpenedVRT( pszXML, panchroBand,
    8264           8 :                                       nInputSpectralBands, ahInputSpectralBands );
    8265             : }
    8266             : 
    8267          71 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    8268          71 :     GDALDestroyTransformer( self );
    8269          71 :   }
    8270           0 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    8271           0 :     int nRet, nSuccess = TRUE;
    8272             : 
    8273           0 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8274             :                                1, &inout[0], &inout[1], &inout[2],
    8275             :                                &nSuccess );
    8276             : 
    8277           0 :     return nRet && nSuccess;
    8278             :   }
    8279        8677 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    8280        8677 :     int nRet, nSuccess = TRUE;
    8281             : 
    8282        8677 :     argout[0] = x;
    8283        8677 :     argout[1] = y;
    8284        8677 :     argout[2] = z;
    8285        8677 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8286             :                                1, &argout[0], &argout[1], &argout[2],
    8287             :                                &nSuccess );
    8288             : 
    8289        8677 :     return nRet && nSuccess;
    8290             :   }
    8291             : 
    8292             : static int
    8293           4 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    8294             : {
    8295          35 :   for( int i = 0; i<nCount; ++i )
    8296             :   {
    8297             : 
    8298          31 :     PyObject *o = PySequence_GetItem(seq, i);
    8299          31 :     if ( !PySequence_Check(o) )
    8300             :     {
    8301           0 :         Py_DECREF(o);
    8302           0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    8303             : 
    8304           0 :         return FALSE;
    8305             :     }
    8306             : 
    8307          31 :     Py_ssize_t len = PySequence_Size(o);
    8308             : 
    8309          31 :     if (len == 2 || len == 3)
    8310             :     {
    8311          31 :         PyObject *o1 = PySequence_GetItem(o, 0);
    8312          31 :         if (!PyNumber_Check(o1))
    8313             :         {
    8314           0 :             Py_DECREF(o); Py_DECREF(o1);
    8315           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8316             : 
    8317           0 :             return FALSE;
    8318             :         }
    8319          31 :         x[i] = PyFloat_AsDouble(o1);
    8320          31 :         Py_DECREF(o1);
    8321             : 
    8322          31 :         o1 = PySequence_GetItem(o, 1);
    8323          31 :         if (!PyNumber_Check(o1))
    8324             :         {
    8325           0 :             Py_DECREF(o); Py_DECREF(o1);
    8326           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8327             : 
    8328           0 :             return FALSE;
    8329             :         }
    8330          31 :         y[i] = PyFloat_AsDouble(o1);
    8331          31 :         Py_DECREF(o1);
    8332             : 
    8333             :         /* The 3rd coordinate is optional, default 0.0 */
    8334          31 :         if (len == 3)
    8335             :         {
    8336           0 :             o1 = PySequence_GetItem(o, 2);
    8337           0 :             if (!PyNumber_Check(o1))
    8338             :             {
    8339           0 :                 Py_DECREF(o); Py_DECREF(o1);
    8340           0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    8341             : 
    8342           0 :                 return FALSE;
    8343             :             }
    8344           0 :             z[i] = PyFloat_AsDouble(o1);
    8345           0 :             Py_DECREF(o1);
    8346             :         }
    8347             :         else
    8348             :         {
    8349          31 :             z[i] = 0.0;
    8350             :         }
    8351             :     }
    8352             :     else
    8353             :     {
    8354           0 :         Py_DECREF(o);
    8355           0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    8356             : 
    8357           0 :         return FALSE;
    8358             :     }
    8359             : 
    8360          31 :     Py_DECREF(o);
    8361             :   }
    8362             : 
    8363             :   return TRUE;
    8364             : }
    8365             : 
    8366           4 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    8367           4 :     int nRet;
    8368             : 
    8369           8 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    8370             : 
    8371           4 :     return nRet;
    8372             :   }
    8373           1 : SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    8374             : 
    8375           1 :     CPLErrorReset();
    8376             : 
    8377           1 :     return GDALTransformGeolocations( xBand, yBand, zBand,
    8378             :                                       GDALUseTransformer, self,
    8379           1 :                                     callback, callback_data, options );
    8380             :   }
    8381             : 
    8382          79 :   GDALTransformerInfoShadow* Transformer( GDALDatasetShadow *src, GDALDatasetShadow *dst,
    8383             :                              char **options ) {
    8384          79 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*)
    8385          79 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst,
    8386             :                                          options );
    8387          79 :     return obj;
    8388             :   }
    8389             : 
    8390             : 
    8391             : typedef struct
    8392             : {
    8393             :   int     width;
    8394             :   int     height;
    8395             :   double  xmin;
    8396             :   double  ymin;
    8397             :   double  xmax;
    8398             :   double  ymax;
    8399             :   double  geotransform[6];
    8400             : } SuggestedWarpOutputRes;
    8401             : 
    8402           3 : SWIGINTERN void delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes *self){
    8403           3 :     CPLFree(self);
    8404           3 :   }
    8405           2 : SWIGINTERN void SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes *self,double geotransform[6]){
    8406           2 :       memcpy(geotransform, self->geotransform, 6 * sizeof(double));
    8407             :   }
    8408             : 
    8409             : #ifdef SWIGPYTHON
    8410           1 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromTransformer(
    8411             :                                                GDALDatasetShadow *src,
    8412             :                                                GDALTransformerInfoShadow* transformer )
    8413             : #else
    8414             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8415             :                                                GDALTransformerInfoShadow* transformer )
    8416             : #endif
    8417             :   {
    8418           1 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8419           1 :     double extent[4];
    8420           1 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, transformer,
    8421           1 :                                  res->geotransform,&(res->width), &(res->height),
    8422             :                                  extent, 0) != CE_None )
    8423             :     {
    8424           0 :         CPLFree(res);
    8425           0 :         return NULL;
    8426             :     }
    8427           1 :     res->xmin = extent[0];
    8428           1 :     res->ymin = extent[1];
    8429           1 :     res->xmax = extent[2];
    8430           1 :     res->ymax = extent[3];
    8431           1 :     return res;
    8432             :   }
    8433             : 
    8434             : 
    8435             : #ifdef SWIGPYTHON
    8436           2 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromOptions( GDALDatasetShadow *src,
    8437             :                                                           char** options )
    8438             : #else
    8439             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8440             :                                                char** options )
    8441             : #endif
    8442             :   {
    8443           2 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8444           2 :     double extent[4];
    8445           2 :     void* pTransformArg = GDALCreateGenImgProjTransformer2( src, NULL, options );
    8446           2 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, pTransformArg,
    8447           2 :                                  res->geotransform,&(res->width), &(res->height),
    8448             :                                  extent, 0) != CE_None )
    8449             :     {
    8450           0 :         GDALDestroyTransformer(pTransformArg);
    8451           0 :         CPLFree(res);
    8452           0 :         return NULL;
    8453             :     }
    8454           2 :     GDALDestroyTransformer(pTransformArg);
    8455           2 :     res->xmin = extent[0];
    8456           2 :     res->ymin = extent[1];
    8457           2 :     res->xmax = extent[2];
    8458           2 :     res->ymax = extent[3];
    8459           2 :     return res;
    8460             :   }
    8461             : 
    8462             : 
    8463          23 : GDALDatasetShadow* ApplyVerticalShiftGrid( GDALDatasetShadow *src_ds,
    8464             :                                            GDALDatasetShadow *grid_ds,
    8465             :                                            bool inverse = false,
    8466             :                                            double srcUnitToMeter = 1.0,
    8467             :                                            double dstUnitToMeter = 1.0,
    8468             :                                            char** options = NULL ) {
    8469          23 :   GDALDatasetShadow *ds = GDALApplyVerticalShiftGrid( src_ds, grid_ds,
    8470             :                                                       inverse,
    8471             :                                                       srcUnitToMeter,
    8472             :                                                       dstUnitToMeter,
    8473             :                                                       options );
    8474          23 :   return ds;
    8475             : 
    8476             : }
    8477             : 
    8478             : 
    8479             : #include "gdalalgorithm.h"
    8480             : 
    8481             : typedef GDALAlgorithmRegistryHS GDALAlgorithmRegistryHS;
    8482             : typedef GDALAlgorithmHS GDALAlgorithmHS;
    8483             : typedef GDALAlgorithmArgHS GDALAlgorithmArgHS;
    8484             : typedef GDALArgDatasetValueHS GDALArgDatasetValueHS;
    8485             : 
    8486       10004 : SWIGINTERN void delete_GDALAlgorithmArgHS(GDALAlgorithmArgHS *self){
    8487       10004 :     GDALAlgorithmArgRelease( self );
    8488       10004 :   }
    8489         308 : SWIGINTERN char const *GDALAlgorithmArgHS_GetName(GDALAlgorithmArgHS *self){
    8490         308 :     return GDALAlgorithmArgGetName(self);
    8491             :   }
    8492        6951 : SWIGINTERN GDALAlgorithmArgType GDALAlgorithmArgHS_GetType(GDALAlgorithmArgHS *self){
    8493        6951 :     return GDALAlgorithmArgGetType(self);
    8494             :   }
    8495           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetDescription(GDALAlgorithmArgHS *self){
    8496           1 :     return GDALAlgorithmArgGetDescription(self);
    8497             :   }
    8498           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetShortName(GDALAlgorithmArgHS *self){
    8499           1 :     return GDALAlgorithmArgGetShortName(self);
    8500             :   }
    8501           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAliases(GDALAlgorithmArgHS *self){
    8502           1 :     return GDALAlgorithmArgGetAliases( self );
    8503             :   }
    8504           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMetaVar(GDALAlgorithmArgHS *self){
    8505           1 :     return GDALAlgorithmArgGetMetaVar(self);
    8506             :   }
    8507           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetCategory(GDALAlgorithmArgHS *self){
    8508           1 :     return GDALAlgorithmArgGetCategory(self);
    8509             :   }
    8510           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsPositional(GDALAlgorithmArgHS *self){
    8511           1 :     return GDALAlgorithmArgIsPositional(self);
    8512             :   }
    8513           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsRequired(GDALAlgorithmArgHS *self){
    8514           1 :     return GDALAlgorithmArgIsRequired(self);
    8515             :   }
    8516           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMinCount(GDALAlgorithmArgHS *self){
    8517           1 :     return GDALAlgorithmArgGetMinCount(self);
    8518             :   }
    8519           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMaxCount(GDALAlgorithmArgHS *self){
    8520           1 :     return GDALAlgorithmArgGetMaxCount(self);
    8521             :   }
    8522           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetPackedValuesAllowed(GDALAlgorithmArgHS *self){
    8523           1 :     return GDALAlgorithmArgGetPackedValuesAllowed(self);
    8524             :   }
    8525           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetRepeatedArgAllowed(GDALAlgorithmArgHS *self){
    8526           1 :     return GDALAlgorithmArgGetRepeatedArgAllowed(self);
    8527             :   }
    8528           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetChoices(GDALAlgorithmArgHS *self){
    8529           1 :     return GDALAlgorithmArgGetChoices( self );
    8530             :   }
    8531          28 : SWIGINTERN char **GDALAlgorithmArgHS_GetMetadataItem(GDALAlgorithmArgHS *self,char const *item){
    8532          28 :     return GDALAlgorithmArgGetMetadataItem( self, item );
    8533             :   }
    8534         218 : SWIGINTERN bool GDALAlgorithmArgHS_IsExplicitlySet(GDALAlgorithmArgHS *self){
    8535         218 :     return GDALAlgorithmArgIsExplicitlySet(self);
    8536             :   }
    8537           1 : SWIGINTERN bool GDALAlgorithmArgHS_HasDefaultValue(GDALAlgorithmArgHS *self){
    8538           1 :     return GDALAlgorithmArgHasDefaultValue(self);
    8539             :   }
    8540           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetDefaultAsBoolean(GDALAlgorithmArgHS *self){
    8541           1 :     return GDALAlgorithmArgGetDefaultAsBoolean(self);
    8542             :   }
    8543           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetDefaultAsString(GDALAlgorithmArgHS *self){
    8544           1 :     return GDALAlgorithmArgGetDefaultAsString(self);
    8545             :   }
    8546           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDefaultAsInteger(GDALAlgorithmArgHS *self){
    8547           1 :     return GDALAlgorithmArgGetDefaultAsInteger(self);
    8548             :   }
    8549           1 : SWIGINTERN double GDALAlgorithmArgHS_GetDefaultAsDouble(GDALAlgorithmArgHS *self){
    8550           1 :     return GDALAlgorithmArgGetDefaultAsDouble(self);
    8551             :   }
    8552           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetDefaultAsStringList(GDALAlgorithmArgHS *self){
    8553           1 :     return GDALAlgorithmArgGetDefaultAsStringList( self );
    8554             :   }
    8555           1 : SWIGINTERN void GDALAlgorithmArgHS_GetDefaultAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
    8556           1 :      size_t nLenSizet = 0;
    8557           2 :     *pList = GDALAlgorithmArgGetDefaultAsIntegerList(self, &nLenSizet);
    8558           1 :     *nLen = (int)nLenSizet;
    8559             :   }
    8560           1 : SWIGINTERN void GDALAlgorithmArgHS_GetDefaultAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
    8561           1 :      size_t nLenSizet = 0;
    8562           2 :     *pList = GDALAlgorithmArgGetDefaultAsDoubleList(self, &nLenSizet);
    8563           1 :     *nLen = (int)nLenSizet;
    8564             :   }
    8565           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHidden(GDALAlgorithmArgHS *self){
    8566           1 :     return GDALAlgorithmArgIsHidden(self);
    8567             :   }
    8568           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForCLI(GDALAlgorithmArgHS *self){
    8569           1 :     return GDALAlgorithmArgIsHiddenForCLI(self);
    8570             :   }
    8571           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForAPI(GDALAlgorithmArgHS *self){
    8572           1 :     return GDALAlgorithmArgIsHiddenForAPI(self);
    8573             :   }
    8574           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsInput(GDALAlgorithmArgHS *self){
    8575           1 :     return GDALAlgorithmArgIsInput(self);
    8576             :   }
    8577        3580 : SWIGINTERN bool GDALAlgorithmArgHS_IsOutput(GDALAlgorithmArgHS *self){
    8578        3580 :     return GDALAlgorithmArgIsOutput(self);
    8579             :   }
    8580           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetType(GDALAlgorithmArgHS *self){
    8581           1 :     return GDALAlgorithmArgGetDatasetType(self);
    8582             :   }
    8583           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetInputFlags(GDALAlgorithmArgHS *self){
    8584           1 :     return GDALAlgorithmArgGetDatasetInputFlags(self);
    8585             :   }
    8586           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetOutputFlags(GDALAlgorithmArgHS *self){
    8587           1 :     return GDALAlgorithmArgGetDatasetOutputFlags(self);
    8588             :   }
    8589           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMutualExclusionGroup(GDALAlgorithmArgHS *self){
    8590           1 :     return GDALAlgorithmArgGetMutualExclusionGroup(self);
    8591             :   }
    8592           7 : SWIGINTERN bool GDALAlgorithmArgHS_GetAsBoolean(GDALAlgorithmArgHS *self){
    8593           7 :     return GDALAlgorithmArgGetAsBoolean(self);
    8594             :   }
    8595         292 : SWIGINTERN char const *GDALAlgorithmArgHS_GetAsString(GDALAlgorithmArgHS *self){
    8596         292 :     return GDALAlgorithmArgGetAsString(self);
    8597             :   }
    8598           7 : SWIGINTERN int GDALAlgorithmArgHS_GetAsInteger(GDALAlgorithmArgHS *self){
    8599           7 :     return GDALAlgorithmArgGetAsInteger(self);
    8600             :   }
    8601           7 : SWIGINTERN double GDALAlgorithmArgHS_GetAsDouble(GDALAlgorithmArgHS *self){
    8602           7 :     return GDALAlgorithmArgGetAsDouble(self);
    8603             :   }
    8604        1819 : SWIGINTERN GDALArgDatasetValueHS *GDALAlgorithmArgHS_GetAsDatasetValue(GDALAlgorithmArgHS *self){
    8605        1819 :     return GDALAlgorithmArgGetAsDatasetValue(self);
    8606             :   }
    8607           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAsStringList(GDALAlgorithmArgHS *self){
    8608           1 :     return GDALAlgorithmArgGetAsStringList( self );
    8609             :   }
    8610           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
    8611           7 :      size_t nLenSizet = 0;
    8612          14 :     *pList = GDALAlgorithmArgGetAsIntegerList(self, &nLenSizet);
    8613           7 :     *nLen = (int)nLenSizet;
    8614             :   }
    8615           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
    8616           7 :      size_t nLenSizet = 0;
    8617          14 :     *pList = GDALAlgorithmArgGetAsDoubleList(self, &nLenSizet);
    8618           7 :     *nLen = (int)nLenSizet;
    8619             :   }
    8620         512 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsBoolean(GDALAlgorithmArgHS *self,bool value){
    8621         512 :     return GDALAlgorithmArgSetAsBoolean(self, value);
    8622             :   }
    8623        1634 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsString(GDALAlgorithmArgHS *self,char const *value){
    8624        1634 :     return GDALAlgorithmArgSetAsString(self, value);
    8625             :   }
    8626         255 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsInteger(GDALAlgorithmArgHS *self,int value){
    8627         255 :     return GDALAlgorithmArgSetAsInteger(self, value);
    8628             :   }
    8629         215 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDouble(GDALAlgorithmArgHS *self,double value){
    8630         215 :     return GDALAlgorithmArgSetAsDouble(self, value);
    8631             :   }
    8632           1 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDatasetValue(GDALAlgorithmArgHS *self,GDALArgDatasetValueHS *value){
    8633           1 :     return GDALAlgorithmArgSetAsDatasetValue(self, value);
    8634             :   }
    8635         357 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsStringList(GDALAlgorithmArgHS *self,char **value){
    8636         357 :     return GDALAlgorithmArgSetAsStringList(self, value);
    8637             :   }
    8638          60 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsIntegerList(GDALAlgorithmArgHS *self,int nList,int *pList){
    8639          60 :     return GDALAlgorithmArgSetAsIntegerList(self, nList, pList);
    8640             :   }
    8641         125 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDoubleList(GDALAlgorithmArgHS *self,int nList,double *pList){
    8642         125 :     return GDALAlgorithmArgSetAsDoubleList(self, nList, pList);
    8643             :   }
    8644           0 : SWIGINTERN bool GDALAlgorithmArgHS_SetDataset(GDALAlgorithmArgHS *self,GDALDatasetShadow *ds){
    8645           0 :     return GDALAlgorithmArgSetDataset(self, ds);
    8646             :   }
    8647         793 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasets(GDALAlgorithmArgHS *self,int object_list_count,GDALDatasetShadow **poObjects){
    8648         793 :     return GDALAlgorithmArgSetDatasets(self, object_list_count, poObjects);
    8649             :   }
    8650         485 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasetNames(GDALAlgorithmArgHS *self,char **names){
    8651         485 :     return GDALAlgorithmArgSetDatasetNames(self, names);
    8652             :   }
    8653        4733 : SWIGINTERN void delete_GDALAlgorithmHS(GDALAlgorithmHS *self){
    8654        4733 :     GDALAlgorithmRelease( self );
    8655        4733 :   }
    8656          32 : SWIGINTERN char const *GDALAlgorithmHS_GetName(GDALAlgorithmHS *self){
    8657          32 :     return GDALAlgorithmGetName(self);
    8658             :   }
    8659           1 : SWIGINTERN char const *GDALAlgorithmHS_GetDescription(GDALAlgorithmHS *self){
    8660           1 :     return GDALAlgorithmGetDescription(self);
    8661             :   }
    8662           1 : SWIGINTERN char const *GDALAlgorithmHS_GetLongDescription(GDALAlgorithmHS *self){
    8663           1 :     return GDALAlgorithmGetLongDescription(self);
    8664             :   }
    8665           1 : SWIGINTERN char const *GDALAlgorithmHS_GetHelpFullURL(GDALAlgorithmHS *self){
    8666           1 :     return GDALAlgorithmGetHelpFullURL(self);
    8667             :   }
    8668        2586 : SWIGINTERN bool GDALAlgorithmHS_HasSubAlgorithms(GDALAlgorithmHS *self){
    8669        2586 :     return GDALAlgorithmHasSubAlgorithms(self);
    8670             :   }
    8671           6 : SWIGINTERN char **GDALAlgorithmHS_GetSubAlgorithmNames(GDALAlgorithmHS *self){
    8672           6 :     return GDALAlgorithmGetSubAlgorithmNames( self );
    8673             :   }
    8674        2029 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_InstantiateSubAlgorithm(GDALAlgorithmHS *self,char const *algName){
    8675        2029 :     return GDALAlgorithmInstantiateSubAlgorithm(self, algName);
    8676             :   }
    8677          85 : SWIGINTERN bool GDALAlgorithmHS_ParseCommandLineArguments(GDALAlgorithmHS *self,char **args){
    8678          85 :     return GDALAlgorithmParseCommandLineArguments(self, args);
    8679             :   }
    8680         790 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_GetActualAlgorithm(GDALAlgorithmHS *self){
    8681         790 :     return GDALAlgorithmGetActualAlgorithm(self);
    8682             :   }
    8683        1616 : SWIGINTERN bool GDALAlgorithmHS_Run(GDALAlgorithmHS *self,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8684        1616 :     return GDALAlgorithmRun(self, callback, callback_data);
    8685             :   }
    8686         466 : SWIGINTERN bool GDALAlgorithmHS_Finalize(GDALAlgorithmHS *self){
    8687         466 :     return GDALAlgorithmFinalize(self);
    8688             :   }
    8689         249 : SWIGINTERN bool GDALAlgorithmHS_ParseRunAndFinalize(GDALAlgorithmHS *self,char **args,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8690         440 :     return GDALAlgorithmParseCommandLineArguments(self, args) &&
    8691         417 :            GDALAlgorithmRun(self, callback, callback_data) &&
    8692         168 :            GDALAlgorithmFinalize(self);
    8693             :   }
    8694           3 : SWIGINTERN retStringAndCPLFree *GDALAlgorithmHS_GetUsageAsJSON(GDALAlgorithmHS *self){
    8695           3 :     return GDALAlgorithmGetUsageAsJSON(self);
    8696             :   }
    8697         178 : SWIGINTERN char **GDALAlgorithmHS_GetArgNames(GDALAlgorithmHS *self){
    8698         178 :     return GDALAlgorithmGetArgNames( self );
    8699             :   }
    8700        4375 : SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArg(GDALAlgorithmHS *self,char const *argName){
    8701        4375 :     return GDALAlgorithmGetArg(self, argName);
    8702             :   }
    8703        5632 : SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArgNonConst(GDALAlgorithmHS *self,char const *argName){
    8704        5632 :     return GDALAlgorithmGetArgNonConst(self, argName);
    8705             :   }
    8706        1930 : SWIGINTERN void delete_GDALAlgorithmRegistryHS(GDALAlgorithmRegistryHS *self){
    8707        1930 :     GDALAlgorithmRegistryRelease( self );
    8708        1930 :   }
    8709           1 : SWIGINTERN char **GDALAlgorithmRegistryHS_GetAlgNames(GDALAlgorithmRegistryHS *self){
    8710           1 :     return GDALAlgorithmRegistryGetAlgNames( self );
    8711             :   }
    8712        1931 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmRegistryHS_InstantiateAlg(GDALAlgorithmRegistryHS *self,char const *algName){
    8713        1931 :     return GDALAlgorithmRegistryInstantiateAlg(self, algName);
    8714             :   }
    8715        1818 : SWIGINTERN void delete_GDALArgDatasetValueHS(GDALArgDatasetValueHS *self){
    8716        1818 :     GDALArgDatasetValueRelease( self );
    8717        1818 :   }
    8718           2 : SWIGINTERN char const *GDALArgDatasetValueHS_GetName(GDALArgDatasetValueHS *self){
    8719           2 :     return GDALArgDatasetValueGetName(self);
    8720             :   }
    8721         641 : SWIGINTERN GDALDatasetShadow *GDALArgDatasetValueHS_GetDataset(GDALArgDatasetValueHS *self){
    8722         641 :     return GDALArgDatasetValueGetDatasetIncreaseRefCount(self);
    8723             :   }
    8724         835 : SWIGINTERN void GDALArgDatasetValueHS_SetName(GDALArgDatasetValueHS *self,char const *name){
    8725         835 :     GDALArgDatasetValueSetName(self, name);
    8726         835 :   }
    8727         335 : SWIGINTERN void GDALArgDatasetValueHS_SetDataset(GDALArgDatasetValueHS *self,GDALDatasetShadow *ds){
    8728         335 :     GDALArgDatasetValueSetDataset(self, ds);
    8729         335 :   }
    8730             : 
    8731          56 : GIntBig wrapper_GDALGetCacheMax()
    8732             : {
    8733          56 :     return GDALGetCacheMax64();
    8734             : }
    8735             : 
    8736             : 
    8737           2 : GIntBig wrapper_GDALGetCacheUsed()
    8738             : {
    8739           2 :     return GDALGetCacheUsed64();
    8740             : }
    8741             : 
    8742             : 
    8743          76 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    8744             : {
    8745          76 :     return GDALSetCacheMax64(nBytes);
    8746             : }
    8747             : 
    8748             : 
    8749          43 : int wrapper_GDALGetDataTypeSizeBits( GDALDataType eDataType )
    8750             : {
    8751          43 :     return GDALGetDataTypeSizeBits(eDataType);
    8752             : }
    8753             : 
    8754             : 
    8755             : /************************************************************************/
    8756             : /*                          XMLTreeToPyList()                           */
    8757             : /************************************************************************/
    8758       26996 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    8759             : {
    8760       26996 :     PyObject *pyList;
    8761       26996 :     int      nChildCount = 0, iChild;
    8762       26996 :     CPLXMLNode *psChild;
    8763             : 
    8764       26996 :     if( psTree == NULL )
    8765             :         return Py_None;
    8766             : 
    8767       26983 :     for( psChild = psTree->psChild;
    8768       53900 :          psChild != NULL;
    8769       26917 :          psChild = psChild->psNext )
    8770       26917 :         nChildCount++;
    8771             : 
    8772       26983 :     pyList = PyList_New(nChildCount+2);
    8773             : 
    8774       26983 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    8775       26983 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    8776             : 
    8777       26983 :     for( psChild = psTree->psChild, iChild = 2;
    8778       53900 :          psChild != NULL;
    8779       26917 :          psChild = psChild->psNext, iChild++ )
    8780             :     {
    8781       26917 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    8782             :     }
    8783             : 
    8784             :     return pyList;
    8785             : }
    8786             : 
    8787             : 
    8788             : /************************************************************************/
    8789             : /*                          PyListToXMLTree()                           */
    8790             : /************************************************************************/
    8791         339 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    8792             : 
    8793             : {
    8794         339 :     int      nChildCount = 0, iChild, nType = 0;
    8795         339 :     CPLXMLNode *psThisNode;
    8796         339 :     CPLXMLNode *psChild;
    8797         339 :     char       *pszText = NULL;
    8798             : 
    8799         339 :     if( PyList_Size(pyList) > INT_MAX )
    8800             :     {
    8801           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8802           0 :         return NULL;
    8803             :     }
    8804         339 :     nChildCount = static_cast<int>(PyList_Size(pyList)) - 2;
    8805         339 :     if( nChildCount < 0 )
    8806             :     {
    8807           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8808           0 :         return NULL;
    8809             :     }
    8810             : 
    8811         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType ));
    8812         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText ));
    8813             : 
    8814             :     /* Detect "pseudo" root */
    8815         339 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    8816             :     {
    8817           2 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    8818           2 :         if (PyList_Size(pyFirst) < 2)
    8819             :         {
    8820           0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8821           2 :             return NULL;
    8822             :         }
    8823           2 :         int nTypeFirst = 0;
    8824           2 :         char* pszTextFirst = NULL;
    8825           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst ));
    8826           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst ));
    8827           2 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    8828             :         {
    8829           2 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    8830           2 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    8831           2 :             return psThisNode;
    8832             :         }
    8833             :     }
    8834             : 
    8835         337 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    8836             : 
    8837         659 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    8838             :     {
    8839         322 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    8840         322 :         CPLAddXMLChild( psThisNode, psChild );
    8841             :     }
    8842             : 
    8843             :     return psThisNode;
    8844             : }
    8845             : 
    8846             : 
    8847           9 : retStringAndCPLFree *GetJPEG2000StructureAsString( const char* pszFilename, char** options = NULL )
    8848             : {
    8849           9 :     CPLXMLNode* psNode = GDALGetJPEG2000Structure(pszFilename, options);
    8850           9 :     if( psNode == NULL )
    8851             :         return NULL;
    8852           9 :     char* pszXML = CPLSerializeXMLTree(psNode);
    8853           9 :     CPLDestroyXMLNode(psNode);
    8854           9 :     return pszXML;
    8855             : }
    8856             : 
    8857             : 
    8858         373 : int GetDriverCount() {
    8859         373 :   return GDALGetDriverCount();
    8860             : }
    8861             : 
    8862             : 
    8863             : static
    8864       15901 : GDALDriverShadow* GetDriverByName( char const *name ) {
    8865       15901 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    8866             : }
    8867             : 
    8868             : 
    8869       82225 : GDALDriverShadow* GetDriver( int i ) {
    8870       82225 :   return (GDALDriverShadow*) GDALGetDriver( i );
    8871             : }
    8872             : 
    8873             : 
    8874       23391 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8875       23391 :   CPLErrorReset();
    8876       23391 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    8877             : #ifndef SWIGPYTHON
    8878             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8879             :   {
    8880             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8881             :           GDALClose(ds);
    8882             :       ds = NULL;
    8883             :   }
    8884             : #endif
    8885       23391 :   return (GDALDatasetShadow*) ds;
    8886             : }
    8887             : 
    8888             : 
    8889        6621 : GDALDatasetShadow* OpenEx( char const* utf8_path, unsigned int nOpenFlags = 0,
    8890             :                            char** allowed_drivers = NULL, char** open_options = NULL,
    8891             :                            char** sibling_files = NULL ) {
    8892        6621 :   CPLErrorReset();
    8893             : #ifdef SWIGPYTHON
    8894        9142 :   if( GetUseExceptions() )
    8895        2986 :       nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
    8896             : #endif
    8897        6621 :   GDALDatasetShadow *ds = GDALOpenEx( utf8_path, nOpenFlags, allowed_drivers,
    8898             :                                       open_options, sibling_files );
    8899             : #ifndef SWIGPYTHON
    8900             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8901             :   {
    8902             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8903             :           GDALClose(ds);
    8904             :       ds = NULL;
    8905             :   }
    8906             : #endif
    8907        6621 :   return (GDALDatasetShadow*) ds;
    8908             : }
    8909             : 
    8910             : 
    8911        5053 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8912        5053 :   CPLErrorReset();
    8913        5053 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    8914             : #ifndef SWIGPYTHON
    8915             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8916             :   {
    8917             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8918             :           GDALClose(ds);
    8919             :       ds = NULL;
    8920             :   }
    8921             : #endif
    8922        5053 :   return (GDALDatasetShadow*) ds;
    8923             : }
    8924             : 
    8925             : 
    8926          11 : GDALDriverShadow *IdentifyDriver( const char *utf8_path,
    8927             :                                   char **papszSiblings = NULL ) {
    8928          11 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path,
    8929          11 :                                                 papszSiblings );
    8930             : }
    8931             : 
    8932             : 
    8933          50 : GDALDriverShadow *IdentifyDriverEx( const char* utf8_path,
    8934             :                                     unsigned int nIdentifyFlags = 0,
    8935             :                                     char** allowed_drivers = NULL,
    8936             :                                     char** sibling_files = NULL )
    8937             : {
    8938          50 :     return  (GDALDriverShadow *) GDALIdentifyDriverEx( utf8_path,
    8939             :                                                 nIdentifyFlags,
    8940             :                                                 allowed_drivers,
    8941          50 :                                                 sibling_files );
    8942             : }
    8943             : 
    8944             : 
    8945         193 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    8946         193 :     int nResArgCount;
    8947             : 
    8948         193 :     if( papszArgv == NULL )
    8949             :         return NULL;
    8950             : 
    8951         386 :     bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
    8952         193 :                             CSLFindString(papszArgv, "OGR_SKIP") >= 0 );
    8953             : 
    8954         193 :     nResArgCount =
    8955         193 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );
    8956             : 
    8957         193 :     if( bReloadDrivers )
    8958             :     {
    8959           0 :         GDALAllRegister();
    8960             :     }
    8961             : 
    8962         193 :     if( nResArgCount <= 0 )
    8963             :         return NULL;
    8964             :     else
    8965         178 :         return papszArgv;
    8966             :   }
    8967             : 
    8968             : 
    8969             : #include "gdal_utils.h"
    8970             : 
    8971             : 
    8972             : 
    8973             : #include <vector>
    8974             : 
    8975             : class ErrorStruct
    8976             : {
    8977             :   public:
    8978             :     CPLErr type;
    8979             :     CPLErrorNum no;
    8980             :     char* msg;
    8981             : 
    8982             :     ErrorStruct() = delete;
    8983         282 :     ErrorStruct(CPLErr eErrIn, CPLErrorNum noIn, const char* msgIn) :
    8984         282 :         type(eErrIn), no(noIn), msg(msgIn ? CPLStrdup(msgIn) : nullptr) {}
    8985          70 :     ErrorStruct(const ErrorStruct& other):
    8986          70 :         type(other.type), no(other.no),
    8987          70 :         msg(other.msg ? CPLStrdup(other.msg) : nullptr) {}
    8988         352 :     ~ErrorStruct() { CPLFree(msg); }
    8989             : };
    8990             : 
    8991         282 : static void CPL_STDCALL StackingErrorHandler( CPLErr eErr, CPLErrorNum no,
    8992             :                                            const char* msg )
    8993             : {
    8994         282 :     std::vector<ErrorStruct>* paoErrors =
    8995             :         static_cast<std::vector<ErrorStruct> *>(
    8996         282 :             CPLGetErrorHandlerUserData());
    8997         282 :     paoErrors->emplace_back(eErr, no, msg);
    8998         282 : }
    8999             : 
    9000        2599 : static void PushStackingErrorHandler(std::vector<ErrorStruct>* paoErrors)
    9001             : {
    9002        2599 :     CPLPushErrorHandlerEx(StackingErrorHandler, paoErrors);
    9003        2599 :     CPLSetCurrentErrorHandlerCatchDebug(false);
    9004        2599 : }
    9005             : 
    9006        2599 : static void PopStackingErrorHandler(std::vector<ErrorStruct>* paoErrors, bool bSuccess)
    9007             : {
    9008        2599 :     CPLPopErrorHandler();
    9009             : 
    9010             :     // If the operation was successful, do not emit regular CPLError()
    9011             :     // of CE_Failure type that would be caught by the PythonBindingErrorHandler
    9012             :     // and turned into
    9013             :     // Python exceptions. Just emit them with the previous error handler
    9014             : 
    9015        2881 :     for( size_t iError = 0; iError < paoErrors->size(); ++iError )
    9016             :     {
    9017         282 :         CPLErr eErrClass = (*paoErrors)[iError].type;
    9018         282 :         if( bSuccess && eErrClass == CE_Failure )
    9019             :         {
    9020          13 :             CPLCallPreviousHandler( eErrClass,
    9021          13 :                                 (*paoErrors)[iError].no,
    9022          13 :                                 (*paoErrors)[iError].msg );
    9023             :         }
    9024             :         else
    9025             :         {
    9026         269 :             CPLError( eErrClass,
    9027         269 :                     (*paoErrors)[iError].no,
    9028             :                     "%s",
    9029         269 :                     (*paoErrors)[iError].msg );
    9030             :         }
    9031             :     }
    9032             : 
    9033        2599 :     if( bSuccess )
    9034             :     {
    9035        2483 :         CPLErrorReset();
    9036             :     }
    9037        2599 : }
    9038             : 
    9039          57 : SWIGINTERN GDALInfoOptions *new_GDALInfoOptions(char **options){
    9040          57 :         return GDALInfoOptionsNew(options, NULL);
    9041             :     }
    9042          57 : SWIGINTERN void delete_GDALInfoOptions(GDALInfoOptions *self){
    9043          57 :         GDALInfoOptionsFree( self );
    9044          57 :     }
    9045          36 : SWIGINTERN GDALVectorInfoOptions *new_GDALVectorInfoOptions(char **options){
    9046          36 :         return GDALVectorInfoOptionsNew(options, NULL);
    9047             :     }
    9048          36 : SWIGINTERN void delete_GDALVectorInfoOptions(GDALVectorInfoOptions *self){
    9049          36 :         GDALVectorInfoOptionsFree( self );
    9050          36 :     }
    9051          28 : SWIGINTERN GDALMultiDimInfoOptions *new_GDALMultiDimInfoOptions(char **options){
    9052          28 :         return GDALMultiDimInfoOptionsNew(options, NULL);
    9053             :     }
    9054          28 : SWIGINTERN void delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions *self){
    9055          28 :         GDALMultiDimInfoOptionsFree( self );
    9056          28 :     }
    9057        2034 : SWIGINTERN GDALTranslateOptions *new_GDALTranslateOptions(char **options){
    9058        2034 :         return GDALTranslateOptionsNew(options, NULL);
    9059             :     }
    9060        2030 : SWIGINTERN void delete_GDALTranslateOptions(GDALTranslateOptions *self){
    9061        2030 :         GDALTranslateOptionsFree( self );
    9062        2030 :     }
    9063             : 
    9064        2032 : GDALDatasetShadow* wrapper_GDALTranslate( const char* dest,
    9065             :                                       GDALDatasetShadow* dataset,
    9066             :                                       GDALTranslateOptions* translateOptions,
    9067             :                                       GDALProgressFunc callback=NULL,
    9068             :                                       void* callback_data=NULL)
    9069             : {
    9070        2032 :     int usageError; /* ignored */
    9071        2032 :     bool bFreeOptions = false;
    9072        2032 :     if( callback )
    9073             :     {
    9074           3 :         if( translateOptions == NULL )
    9075             :         {
    9076           1 :             bFreeOptions = true;
    9077           1 :             translateOptions = GDALTranslateOptionsNew(NULL, NULL);
    9078             :         }
    9079           3 :         GDALTranslateOptionsSetProgress(translateOptions, callback, callback_data);
    9080             :     }
    9081             : #ifdef SWIGPYTHON
    9082        2032 :     std::vector<ErrorStruct> aoErrors;
    9083        2915 :     if( GetUseExceptions() )
    9084             :     {
    9085         900 :         PushStackingErrorHandler(&aoErrors);
    9086             :     }
    9087             : #endif
    9088        2032 :     GDALDatasetH hDSRet = GDALTranslate(dest, dataset, translateOptions, &usageError);
    9089        2032 :     if( bFreeOptions )
    9090           1 :         GDALTranslateOptionsFree(translateOptions);
    9091             : #ifdef SWIGPYTHON
    9092        2915 :     if( GetUseExceptions() )
    9093             :     {
    9094         900 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9095             :     }
    9096             : #endif
    9097        2032 :     return hDSRet;
    9098             : }
    9099             : 
    9100         810 : SWIGINTERN GDALWarpAppOptions *new_GDALWarpAppOptions(char **options){
    9101         810 :         return GDALWarpAppOptionsNew(options, NULL);
    9102             :     }
    9103         808 : SWIGINTERN void delete_GDALWarpAppOptions(GDALWarpAppOptions *self){
    9104         808 :         GDALWarpAppOptionsFree( self );
    9105         808 :     }
    9106             : 
    9107             : 
    9108          86 : int wrapper_GDALWarpDestDS( GDALDatasetShadow* dstDS,
    9109             :                             int object_list_count, GDALDatasetShadow** poObjects,
    9110             :                             GDALWarpAppOptions* warpAppOptions,
    9111             :                             GDALProgressFunc callback=NULL,
    9112             :                             void* callback_data=NULL)
    9113             : {
    9114          86 :     int usageError; /* ignored */
    9115          86 :     bool bFreeOptions = false;
    9116          86 :     if( callback )
    9117             :     {
    9118           1 :         if( warpAppOptions == NULL )
    9119             :         {
    9120           1 :             bFreeOptions = true;
    9121           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9122             :         }
    9123           1 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9124             :     }
    9125             : #ifdef SWIGPYTHON
    9126          86 :     std::vector<ErrorStruct> aoErrors;
    9127         166 :     if( GetUseExceptions() )
    9128             :     {
    9129          86 :         PushStackingErrorHandler(&aoErrors);
    9130             :     }
    9131             : #endif
    9132          86 :     bool bRet = (GDALWarp(NULL, dstDS, object_list_count, poObjects, warpAppOptions, &usageError) != NULL);
    9133          86 :     if( bFreeOptions )
    9134           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9135             : #ifdef SWIGPYTHON
    9136         166 :     if( GetUseExceptions() )
    9137             :     {
    9138          86 :         PopStackingErrorHandler(&aoErrors, bRet);
    9139             :     }
    9140             : #endif
    9141          86 :     return bRet;
    9142             : }
    9143             : 
    9144             : 
    9145         725 : GDALDatasetShadow* wrapper_GDALWarpDestName( const char* dest,
    9146             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9147             :                                              GDALWarpAppOptions* warpAppOptions,
    9148             :                                              GDALProgressFunc callback=NULL,
    9149             :                                              void* callback_data=NULL)
    9150             : {
    9151         725 :     int usageError; /* ignored */
    9152         725 :     bool bFreeOptions = false;
    9153         725 :     if( callback )
    9154             :     {
    9155           2 :         if( warpAppOptions == NULL )
    9156             :         {
    9157           1 :             bFreeOptions = true;
    9158           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9159             :         }
    9160           2 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9161             :     }
    9162             : #ifdef SWIGPYTHON
    9163         725 :     std::vector<ErrorStruct> aoErrors;
    9164        1385 :     if( GetUseExceptions() )
    9165             :     {
    9166         701 :         PushStackingErrorHandler(&aoErrors);
    9167             :     }
    9168             : #endif
    9169         725 :     GDALDatasetH hDSRet = GDALWarp(dest, NULL, object_list_count, poObjects, warpAppOptions, &usageError);
    9170         725 :     if( bFreeOptions )
    9171           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9172             : #ifdef SWIGPYTHON
    9173        1385 :     if( GetUseExceptions() )
    9174             :     {
    9175         701 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9176             :     }
    9177             : #endif
    9178         725 :     return hDSRet;
    9179             : }
    9180             : 
    9181         652 : SWIGINTERN GDALVectorTranslateOptions *new_GDALVectorTranslateOptions(char **options){
    9182         652 :         return GDALVectorTranslateOptionsNew(options, NULL);
    9183             :     }
    9184         625 : SWIGINTERN void delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions *self){
    9185         625 :         GDALVectorTranslateOptionsFree( self );
    9186         625 :     }
    9187             : 
    9188          12 : int wrapper_GDALVectorTranslateDestDS( GDALDatasetShadow* dstDS,
    9189             :                                        GDALDatasetShadow* srcDS,
    9190             :                             GDALVectorTranslateOptions* options,
    9191             :                             GDALProgressFunc callback=NULL,
    9192             :                             void* callback_data=NULL)
    9193             : {
    9194          12 :     int usageError; /* ignored */
    9195          12 :     bool bFreeOptions = false;
    9196          12 :     if( callback )
    9197             :     {
    9198           0 :         if( options == NULL )
    9199             :         {
    9200           0 :             bFreeOptions = true;
    9201           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9202             :         }
    9203           0 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9204             :     }
    9205             : #ifdef SWIGPYTHON
    9206          12 :     std::vector<ErrorStruct> aoErrors;
    9207          19 :     if( GetUseExceptions() )
    9208             :     {
    9209          11 :         PushStackingErrorHandler(&aoErrors);
    9210             :     }
    9211             : #endif
    9212          12 :     bool bRet = (GDALVectorTranslate(NULL, dstDS, 1, &srcDS, options, &usageError) != NULL);
    9213          12 :     if( bFreeOptions )
    9214           0 :         GDALVectorTranslateOptionsFree(options);
    9215             : #ifdef SWIGPYTHON
    9216          19 :     if( GetUseExceptions() )
    9217             :     {
    9218          11 :         PopStackingErrorHandler(&aoErrors, bRet);
    9219             :     }
    9220             : #endif
    9221          12 :     return bRet;
    9222             : }
    9223             : 
    9224             : 
    9225         601 : GDALDatasetShadow* wrapper_GDALVectorTranslateDestName( const char* dest,
    9226             :                                              GDALDatasetShadow* srcDS,
    9227             :                                              GDALVectorTranslateOptions* options,
    9228             :                                              GDALProgressFunc callback=NULL,
    9229             :                                              void* callback_data=NULL)
    9230             : {
    9231         601 :     int usageError; /* ignored */
    9232         601 :     bool bFreeOptions = false;
    9233         601 :     if( callback )
    9234             :     {
    9235           3 :         if( options == NULL )
    9236             :         {
    9237           0 :             bFreeOptions = true;
    9238           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9239             :         }
    9240           3 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9241             :     }
    9242             : #ifdef SWIGPYTHON
    9243         601 :     std::vector<ErrorStruct> aoErrors;
    9244         989 :     if( GetUseExceptions() )
    9245             :     {
    9246         451 :         PushStackingErrorHandler(&aoErrors);
    9247             :     }
    9248             : #endif
    9249         601 :     GDALDatasetH hDSRet = GDALVectorTranslate(dest, NULL, 1, &srcDS, options, &usageError);
    9250         601 :     if( bFreeOptions )
    9251           0 :         GDALVectorTranslateOptionsFree(options);
    9252             : #ifdef SWIGPYTHON
    9253         989 :     if( GetUseExceptions() )
    9254             :     {
    9255         451 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9256             :     }
    9257             : #endif
    9258         601 :     return hDSRet;
    9259             : }
    9260             : 
    9261          93 : SWIGINTERN GDALDEMProcessingOptions *new_GDALDEMProcessingOptions(char **options){
    9262          93 :         return GDALDEMProcessingOptionsNew(options, NULL);
    9263             :     }
    9264          89 : SWIGINTERN void delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions *self){
    9265          89 :         GDALDEMProcessingOptionsFree( self );
    9266          89 :     }
    9267             : 
    9268          89 : GDALDatasetShadow* wrapper_GDALDEMProcessing( const char* dest,
    9269             :                                       GDALDatasetShadow* dataset,
    9270             :                                       const char* pszProcessing,
    9271             :                                       const char* pszColorFilename,
    9272             :                                       GDALDEMProcessingOptions* options,
    9273             :                                       GDALProgressFunc callback=NULL,
    9274             :                                       void* callback_data=NULL)
    9275             : {
    9276          89 :     int usageError; /* ignored */
    9277          89 :     bool bFreeOptions = false;
    9278          89 :     if( callback )
    9279             :     {
    9280           0 :         if( options == NULL )
    9281             :         {
    9282           0 :             bFreeOptions = true;
    9283           0 :             options = GDALDEMProcessingOptionsNew(NULL, NULL);
    9284             :         }
    9285           0 :         GDALDEMProcessingOptionsSetProgress(options, callback, callback_data);
    9286             :     }
    9287             : #ifdef SWIGPYTHON
    9288          89 :     std::vector<ErrorStruct> aoErrors;
    9289         178 :     if( GetUseExceptions() )
    9290             :     {
    9291          89 :         PushStackingErrorHandler(&aoErrors);
    9292             :     }
    9293             : #endif
    9294          89 :     GDALDatasetH hDSRet = GDALDEMProcessing(dest, dataset, pszProcessing, pszColorFilename, options, &usageError);
    9295          89 :     if( bFreeOptions )
    9296           0 :         GDALDEMProcessingOptionsFree(options);
    9297             : #ifdef SWIGPYTHON
    9298         178 :     if( GetUseExceptions() )
    9299             :     {
    9300          89 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9301             :     }
    9302             : #endif
    9303          89 :     return hDSRet;
    9304             : }
    9305             : 
    9306          45 : SWIGINTERN GDALNearblackOptions *new_GDALNearblackOptions(char **options){
    9307          45 :         return GDALNearblackOptionsNew(options, NULL);
    9308             :     }
    9309          45 : SWIGINTERN void delete_GDALNearblackOptions(GDALNearblackOptions *self){
    9310          45 :         GDALNearblackOptionsFree( self );
    9311          45 :     }
    9312             : 
    9313           2 : int wrapper_GDALNearblackDestDS( GDALDatasetShadow* dstDS,
    9314             :                             GDALDatasetShadow* srcDS,
    9315             :                             GDALNearblackOptions* options,
    9316             :                             GDALProgressFunc callback=NULL,
    9317             :                             void* callback_data=NULL)
    9318             : {
    9319           2 :     int usageError; /* ignored */
    9320           2 :     bool bFreeOptions = false;
    9321           2 :     if( callback )
    9322             :     {
    9323           0 :         if( options == NULL )
    9324             :         {
    9325           0 :             bFreeOptions = true;
    9326           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9327             :         }
    9328           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9329             :     }
    9330             : #ifdef SWIGPYTHON
    9331           2 :     std::vector<ErrorStruct> aoErrors;
    9332           4 :     if( GetUseExceptions() )
    9333             :     {
    9334           2 :         PushStackingErrorHandler(&aoErrors);
    9335             :     }
    9336             : #endif
    9337           2 :     bool bRet = (GDALNearblack(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9338           2 :     if( bFreeOptions )
    9339           0 :         GDALNearblackOptionsFree(options);
    9340             : #ifdef SWIGPYTHON
    9341           4 :     if( GetUseExceptions() )
    9342             :     {
    9343           2 :         PopStackingErrorHandler(&aoErrors, bRet);
    9344             :     }
    9345             : #endif
    9346           2 :     return bRet;
    9347             : }
    9348             : 
    9349             : 
    9350          43 : GDALDatasetShadow* wrapper_GDALNearblackDestName( const char* dest,
    9351             :                                              GDALDatasetShadow* srcDS,
    9352             :                                              GDALNearblackOptions* options,
    9353             :                                              GDALProgressFunc callback=NULL,
    9354             :                                              void* callback_data=NULL)
    9355             : {
    9356          43 :     int usageError; /* ignored */
    9357          43 :     bool bFreeOptions = false;
    9358          43 :     if( callback )
    9359             :     {
    9360           0 :         if( options == NULL )
    9361             :         {
    9362           0 :             bFreeOptions = true;
    9363           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9364             :         }
    9365           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9366             :     }
    9367             : #ifdef SWIGPYTHON
    9368          43 :     std::vector<ErrorStruct> aoErrors;
    9369          86 :     if( GetUseExceptions() )
    9370             :     {
    9371          43 :         PushStackingErrorHandler(&aoErrors);
    9372             :     }
    9373             : #endif
    9374          43 :     GDALDatasetH hDSRet = GDALNearblack(dest, NULL, srcDS, options, &usageError);
    9375          43 :     if( bFreeOptions )
    9376           0 :         GDALNearblackOptionsFree(options);
    9377             : #ifdef SWIGPYTHON
    9378          86 :     if( GetUseExceptions() )
    9379             :     {
    9380          43 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9381             :     }
    9382             : #endif
    9383          43 :     return hDSRet;
    9384             : }
    9385             : 
    9386          52 : SWIGINTERN GDALGridOptions *new_GDALGridOptions(char **options){
    9387          52 :         return GDALGridOptionsNew(options, NULL);
    9388             :     }
    9389          52 : SWIGINTERN void delete_GDALGridOptions(GDALGridOptions *self){
    9390          52 :         GDALGridOptionsFree( self );
    9391          52 :     }
    9392             : 
    9393          52 : GDALDatasetShadow* wrapper_GDALGrid( const char* dest,
    9394             :                                       GDALDatasetShadow* dataset,
    9395             :                                       GDALGridOptions* options,
    9396             :                                       GDALProgressFunc callback=NULL,
    9397             :                                       void* callback_data=NULL)
    9398             : {
    9399          52 :     int usageError; /* ignored */
    9400          52 :     bool bFreeOptions = false;
    9401          52 :     if( callback )
    9402             :     {
    9403           0 :         if( options == NULL )
    9404             :         {
    9405           0 :             bFreeOptions = true;
    9406           0 :             options = GDALGridOptionsNew(NULL, NULL);
    9407             :         }
    9408           0 :         GDALGridOptionsSetProgress(options, callback, callback_data);
    9409             :     }
    9410             : #ifdef SWIGPYTHON
    9411          52 :     std::vector<ErrorStruct> aoErrors;
    9412         103 :     if( GetUseExceptions() )
    9413             :     {
    9414          51 :         PushStackingErrorHandler(&aoErrors);
    9415             :     }
    9416             : #endif
    9417          52 :     GDALDatasetH hDSRet = GDALGrid(dest, dataset, options, &usageError);
    9418          52 :     if( bFreeOptions )
    9419           0 :         GDALGridOptionsFree(options);
    9420             : #ifdef SWIGPYTHON
    9421         103 :     if( GetUseExceptions() )
    9422             :     {
    9423          51 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9424             :     }
    9425             : #endif
    9426          52 :     return hDSRet;
    9427             : }
    9428             : 
    9429          12 : SWIGINTERN GDALContourOptions *new_GDALContourOptions(char **options){
    9430          12 :             return GDALContourOptionsNew(options, NULL);
    9431             :         }
    9432          12 : SWIGINTERN void delete_GDALContourOptions(GDALContourOptions *self){
    9433          12 :             GDALContourOptionsFree( self );
    9434          12 :         }
    9435             : 
    9436             : 
    9437           6 : int wrapper_GDALContourDestDS(  GDALDatasetShadow* dstDS,
    9438             :                                 GDALDatasetShadow* srcDS,
    9439             :                                 GDALContourOptions* options,
    9440             :                                 GDALProgressFunc callback=NULL,
    9441             :                                 void* callback_data=NULL)
    9442             : {
    9443           6 :     bool bFreeOptions = false;
    9444           6 :     if( callback )
    9445             :     {
    9446           0 :         if( options == NULL )
    9447             :         {
    9448           0 :             bFreeOptions = true;
    9449           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9450             :         }
    9451           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9452             :     }
    9453             : 
    9454             : #ifdef SWIGPYTHON
    9455           6 :     std::vector<ErrorStruct> aoErrors;
    9456          12 :     if( GetUseExceptions() )
    9457             :     {
    9458           6 :         PushStackingErrorHandler(&aoErrors);
    9459             :     }
    9460             : #endif
    9461             : 
    9462           6 :     char** papszStringOptions = NULL;
    9463           6 :     GDALRasterBandH hBand = NULL;
    9464           6 :     OGRLayerH hLayer = NULL;
    9465           6 :     const CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9466           6 :     bool bRet = (err == CE_None && GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data) == CE_None);
    9467           6 :     if( bFreeOptions )
    9468           0 :         GDALContourOptionsFree(options);
    9469             : #ifdef SWIGPYTHON
    9470          12 :     if( GetUseExceptions() )
    9471             :     {
    9472           6 :         PopStackingErrorHandler(&aoErrors, bRet);
    9473             :     }
    9474             : #endif
    9475           6 :     CSLDestroy(papszStringOptions);
    9476           6 :     return bRet;
    9477             : }
    9478             : 
    9479             : 
    9480           6 : GDALDatasetShadow* wrapper_GDALContourDestName( const char* dest,
    9481             :                                                   GDALDatasetShadow* srcDS,
    9482             :                                                   GDALContourOptions* options,
    9483             :                                                   GDALProgressFunc callback=NULL,
    9484             :                                                   void* callback_data=NULL)
    9485             : {
    9486           6 :     bool bFreeOptions = false;
    9487           6 :     if( callback )
    9488             :     {
    9489           0 :         if( options == NULL )
    9490             :         {
    9491           0 :             bFreeOptions = true;
    9492           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9493             :         }
    9494           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9495             :     }
    9496             : 
    9497             : #ifdef SWIGPYTHON
    9498           6 :     std::vector<ErrorStruct> aoErrors;
    9499          12 :     if( GetUseExceptions() )
    9500             :     {
    9501           6 :         PushStackingErrorHandler(&aoErrors);
    9502             :     }
    9503             : #endif
    9504             : 
    9505           6 :     GDALContourOptionsSetDestDataSource(options, dest);
    9506           6 :     char** papszStringOptions = NULL;
    9507           6 :     GDALRasterBandH hBand = NULL;
    9508           6 :     OGRLayerH hLayer = NULL;
    9509           6 :     GDALDatasetH dstDS = NULL;
    9510           6 :     CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9511           6 :     if (err == CE_None )
    9512             :     {
    9513           6 :         err = GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data);
    9514             :     }
    9515             : 
    9516           6 :     if( bFreeOptions )
    9517           0 :         GDALContourOptionsFree(options);
    9518             : #ifdef SWIGPYTHON
    9519          12 :     if( GetUseExceptions() )
    9520             :     {
    9521           6 :         PopStackingErrorHandler(&aoErrors, dstDS != NULL);
    9522             :     }
    9523             : #endif
    9524           6 :     CSLDestroy(papszStringOptions);
    9525           6 :     return dstDS;
    9526             : }
    9527             : 
    9528          23 : SWIGINTERN GDALRasterizeOptions *new_GDALRasterizeOptions(char **options){
    9529          23 :         return GDALRasterizeOptionsNew(options, NULL);
    9530             :     }
    9531          23 : SWIGINTERN void delete_GDALRasterizeOptions(GDALRasterizeOptions *self){
    9532          23 :         GDALRasterizeOptionsFree( self );
    9533          23 :     }
    9534             : 
    9535          13 : int wrapper_GDALRasterizeDestDS( GDALDatasetShadow* dstDS,
    9536             :                             GDALDatasetShadow* srcDS,
    9537             :                             GDALRasterizeOptions* options,
    9538             :                             GDALProgressFunc callback=NULL,
    9539             :                             void* callback_data=NULL)
    9540             : {
    9541          13 :     int usageError; /* ignored */
    9542          13 :     bool bFreeOptions = false;
    9543          13 :     if( callback )
    9544             :     {
    9545           0 :         if( options == NULL )
    9546             :         {
    9547           0 :             bFreeOptions = true;
    9548           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9549             :         }
    9550           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9551             :     }
    9552             : #ifdef SWIGPYTHON
    9553          13 :     std::vector<ErrorStruct> aoErrors;
    9554          26 :     if( GetUseExceptions() )
    9555             :     {
    9556          13 :         PushStackingErrorHandler(&aoErrors);
    9557             :     }
    9558             : #endif
    9559          13 :     bool bRet = (GDALRasterize(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9560          13 :     if( bFreeOptions )
    9561           0 :         GDALRasterizeOptionsFree(options);
    9562             : #ifdef SWIGPYTHON
    9563          26 :     if( GetUseExceptions() )
    9564             :     {
    9565          13 :         PopStackingErrorHandler(&aoErrors, bRet);
    9566             :     }
    9567             : #endif
    9568          13 :     return bRet;
    9569             : }
    9570             : 
    9571             : 
    9572          10 : GDALDatasetShadow* wrapper_GDALRasterizeDestName( const char* dest,
    9573             :                                              GDALDatasetShadow* srcDS,
    9574             :                                              GDALRasterizeOptions* options,
    9575             :                                              GDALProgressFunc callback=NULL,
    9576             :                                              void* callback_data=NULL)
    9577             : {
    9578          10 :     int usageError; /* ignored */
    9579          10 :     bool bFreeOptions = false;
    9580          10 :     if( callback )
    9581             :     {
    9582           0 :         if( options == NULL )
    9583             :         {
    9584           0 :             bFreeOptions = true;
    9585           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9586             :         }
    9587           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9588             :     }
    9589             : #ifdef SWIGPYTHON
    9590          10 :     std::vector<ErrorStruct> aoErrors;
    9591          17 :     if( GetUseExceptions() )
    9592             :     {
    9593          10 :         PushStackingErrorHandler(&aoErrors);
    9594             :     }
    9595             : #endif
    9596          10 :     GDALDatasetH hDSRet = GDALRasterize(dest, NULL, srcDS, options, &usageError);
    9597          10 :     if( bFreeOptions )
    9598           0 :         GDALRasterizeOptionsFree(options);
    9599             : #ifdef SWIGPYTHON
    9600          17 :     if( GetUseExceptions() )
    9601             :     {
    9602          10 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9603             :     }
    9604             : #endif
    9605          10 :     return hDSRet;
    9606             : }
    9607             : 
    9608          39 : SWIGINTERN GDALFootprintOptions *new_GDALFootprintOptions(char **options){
    9609          39 :         return GDALFootprintOptionsNew(options, NULL);
    9610             :     }
    9611          37 : SWIGINTERN void delete_GDALFootprintOptions(GDALFootprintOptions *self){
    9612          37 :         GDALFootprintOptionsFree( self );
    9613          37 :     }
    9614             : 
    9615           3 : int wrapper_GDALFootprintDestDS( GDALDatasetShadow* dstDS,
    9616             :                             GDALDatasetShadow* srcDS,
    9617             :                             GDALFootprintOptions* options,
    9618             :                             GDALProgressFunc callback=NULL,
    9619             :                             void* callback_data=NULL)
    9620             : {
    9621           3 :     int usageError; /* ignored */
    9622           3 :     bool bFreeOptions = false;
    9623           3 :     if( callback )
    9624             :     {
    9625           0 :         if( options == NULL )
    9626             :         {
    9627           0 :             bFreeOptions = true;
    9628           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9629             :         }
    9630           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9631             :     }
    9632             : #ifdef SWIGPYTHON
    9633           3 :     std::vector<ErrorStruct> aoErrors;
    9634           6 :     if( GetUseExceptions() )
    9635             :     {
    9636           3 :         PushStackingErrorHandler(&aoErrors);
    9637             :     }
    9638             : #endif
    9639           3 :     bool bRet = (GDALFootprint(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9640           3 :     if( bFreeOptions )
    9641           0 :         GDALFootprintOptionsFree(options);
    9642             : #ifdef SWIGPYTHON
    9643           6 :     if( GetUseExceptions() )
    9644             :     {
    9645           3 :         PopStackingErrorHandler(&aoErrors, bRet);
    9646             :     }
    9647             : #endif
    9648           3 :     return bRet;
    9649             : }
    9650             : 
    9651             : 
    9652          34 : GDALDatasetShadow* wrapper_GDALFootprintDestName( const char* dest,
    9653             :                                              GDALDatasetShadow* srcDS,
    9654             :                                              GDALFootprintOptions* options,
    9655             :                                              GDALProgressFunc callback=NULL,
    9656             :                                              void* callback_data=NULL)
    9657             : {
    9658          34 :     int usageError; /* ignored */
    9659          34 :     bool bFreeOptions = false;
    9660          34 :     if( callback )
    9661             :     {
    9662           0 :         if( options == NULL )
    9663             :         {
    9664           0 :             bFreeOptions = true;
    9665           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9666             :         }
    9667           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9668             :     }
    9669             : #ifdef SWIGPYTHON
    9670          34 :     std::vector<ErrorStruct> aoErrors;
    9671          68 :     if( GetUseExceptions() )
    9672             :     {
    9673          34 :         PushStackingErrorHandler(&aoErrors);
    9674             :     }
    9675             : #endif
    9676          34 :     GDALDatasetH hDSRet = GDALFootprint(dest, NULL, srcDS, options, &usageError);
    9677          34 :     if( bFreeOptions )
    9678           0 :         GDALFootprintOptionsFree(options);
    9679             : #ifdef SWIGPYTHON
    9680          68 :     if( GetUseExceptions() )
    9681             :     {
    9682          34 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9683             :     }
    9684             : #endif
    9685          34 :     return hDSRet;
    9686             : }
    9687             : 
    9688         172 : SWIGINTERN GDALBuildVRTOptions *new_GDALBuildVRTOptions(char **options){
    9689         172 :         return GDALBuildVRTOptionsNew(options, NULL);
    9690             :     }
    9691         169 : SWIGINTERN void delete_GDALBuildVRTOptions(GDALBuildVRTOptions *self){
    9692         169 :         GDALBuildVRTOptionsFree( self );
    9693         169 :     }
    9694             : 
    9695          69 : GDALDatasetShadow* wrapper_GDALBuildVRT_objects( const char* dest,
    9696             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9697             :                                              GDALBuildVRTOptions* options,
    9698             :                                              GDALProgressFunc callback=NULL,
    9699             :                                              void* callback_data=NULL)
    9700             : {
    9701          69 :     int usageError; /* ignored */
    9702          69 :     bool bFreeOptions = false;
    9703          69 :     if( callback )
    9704             :     {
    9705           0 :         if( options == NULL )
    9706             :         {
    9707           0 :             bFreeOptions = true;
    9708           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9709             :         }
    9710           0 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9711             :     }
    9712             : #ifdef SWIGPYTHON
    9713          69 :     std::vector<ErrorStruct> aoErrors;
    9714         116 :     if( GetUseExceptions() )
    9715             :     {
    9716          56 :         PushStackingErrorHandler(&aoErrors);
    9717             :     }
    9718             : #endif
    9719          69 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, object_list_count, poObjects, NULL, options, &usageError);
    9720          69 :     if( bFreeOptions )
    9721           0 :         GDALBuildVRTOptionsFree(options);
    9722             : #ifdef SWIGPYTHON
    9723         116 :     if( GetUseExceptions() )
    9724             :     {
    9725          56 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9726             :     }
    9727             : #endif
    9728          69 :     return hDSRet;
    9729             : }
    9730             : 
    9731             : 
    9732         100 : GDALDatasetShadow* wrapper_GDALBuildVRT_names( const char* dest,
    9733             :                                          char ** source_filenames,
    9734             :                                          GDALBuildVRTOptions* options,
    9735             :                                          GDALProgressFunc callback=NULL,
    9736             :                                          void* callback_data=NULL)
    9737             : {
    9738         100 :     int usageError; /* ignored */
    9739         100 :     bool bFreeOptions = false;
    9740         100 :     if( callback )
    9741             :     {
    9742           1 :         if( options == NULL )
    9743             :         {
    9744           0 :             bFreeOptions = true;
    9745           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9746             :         }
    9747           1 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9748             :     }
    9749             : #ifdef SWIGPYTHON
    9750         100 :     std::vector<ErrorStruct> aoErrors;
    9751         173 :     if( GetUseExceptions() )
    9752             :     {
    9753          85 :         PushStackingErrorHandler(&aoErrors);
    9754             :     }
    9755             : #endif
    9756         100 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, CSLCount(source_filenames), NULL, source_filenames, options, &usageError);
    9757         100 :     if( bFreeOptions )
    9758           0 :         GDALBuildVRTOptionsFree(options);
    9759             : #ifdef SWIGPYTHON
    9760         173 :     if( GetUseExceptions() )
    9761             :     {
    9762          85 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9763             :     }
    9764             : #endif
    9765         100 :     return hDSRet;
    9766             : }
    9767             : 
    9768          23 : SWIGINTERN GDALTileIndexOptions *new_GDALTileIndexOptions(char **options){
    9769          23 :         return GDALTileIndexOptionsNew(options, NULL);
    9770             :     }
    9771          23 : SWIGINTERN void delete_GDALTileIndexOptions(GDALTileIndexOptions *self){
    9772          23 :         GDALTileIndexOptionsFree( self );
    9773          23 :     }
    9774             : 
    9775          23 : GDALDatasetShadow* wrapper_TileIndex_names( const char* dest,
    9776             :                                             char ** source_filenames,
    9777             :                                             GDALTileIndexOptions* options,
    9778             :                                             GDALProgressFunc callback=NULL,
    9779             :                                             void* callback_data=NULL)
    9780             : {
    9781          23 :     int usageError; /* ignored */
    9782             : #if 0
    9783             :     bool bFreeOptions = false;
    9784             :     if( callback )
    9785             :     {
    9786             :         if( options == NULL )
    9787             :         {
    9788             :             bFreeOptions = true;
    9789             :             options = GDALTileIndexOptionsNew(NULL, NULL);
    9790             :         }
    9791             :         GDALTileIndexOptionsSetProgress(options, callback, callback_data);
    9792             :     }
    9793             : #endif
    9794             : 
    9795             : #ifdef SWIGPYTHON
    9796          23 :     std::vector<ErrorStruct> aoErrors;
    9797          46 :     if( GetUseExceptions() )
    9798             :     {
    9799          23 :         PushStackingErrorHandler(&aoErrors);
    9800             :     }
    9801             : #endif
    9802          23 :     GDALDatasetH hDSRet = GDALTileIndex(dest, CSLCount(source_filenames), source_filenames, options, &usageError);
    9803             : #if 0
    9804             :     if( bFreeOptions )
    9805             :         GDALTileIndexOptionsFree(options);
    9806             : #endif
    9807             : #ifdef SWIGPYTHON
    9808          46 :     if( GetUseExceptions() )
    9809             :     {
    9810          23 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9811             :     }
    9812             : #endif
    9813          23 :     return hDSRet;
    9814             : }
    9815             : 
    9816         108 : SWIGINTERN GDALMultiDimTranslateOptions *new_GDALMultiDimTranslateOptions(char **options){
    9817         108 :         return GDALMultiDimTranslateOptionsNew(options, NULL);
    9818             :     }
    9819         108 : SWIGINTERN void delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions *self){
    9820         108 :         GDALMultiDimTranslateOptionsFree( self );
    9821         108 :     }
    9822             : 
    9823         108 : GDALDatasetShadow* wrapper_GDALMultiDimTranslateDestName( const char* dest,
    9824             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9825             :                                              GDALMultiDimTranslateOptions* multiDimTranslateOptions,
    9826             :                                              GDALProgressFunc callback=NULL,
    9827             :                                              void* callback_data=NULL)
    9828             : {
    9829         108 :     int usageError; /* ignored */
    9830         108 :     bool bFreeOptions = false;
    9831         108 :     if( callback )
    9832             :     {
    9833           0 :         if( multiDimTranslateOptions == NULL )
    9834             :         {
    9835           0 :             bFreeOptions = true;
    9836           0 :             multiDimTranslateOptions = GDALMultiDimTranslateOptionsNew(NULL, NULL);
    9837             :         }
    9838           0 :         GDALMultiDimTranslateOptionsSetProgress(multiDimTranslateOptions, callback, callback_data);
    9839             :     }
    9840             : #ifdef SWIGPYTHON
    9841         108 :     std::vector<ErrorStruct> aoErrors;
    9842         134 :     if( GetUseExceptions() )
    9843             :     {
    9844          29 :         PushStackingErrorHandler(&aoErrors);
    9845             :     }
    9846             : #endif
    9847         108 :     GDALDatasetH hDSRet = GDALMultiDimTranslate(dest, NULL, object_list_count, poObjects, multiDimTranslateOptions, &usageError);
    9848         108 :     if( bFreeOptions )
    9849           0 :         GDALMultiDimTranslateOptionsFree(multiDimTranslateOptions);
    9850             : #ifdef SWIGPYTHON
    9851         134 :     if( GetUseExceptions() )
    9852             :     {
    9853          29 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9854             :     }
    9855             : #endif
    9856         108 :     return hDSRet;
    9857             : }
    9858             : 
    9859             : #ifdef __cplusplus
    9860             : extern "C" {
    9861             : #endif
    9862       10014 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9863       10014 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9864       10014 :   int result;
    9865             :   
    9866       10014 :   if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
    9867       10014 :   {
    9868             : #ifdef SED_HACKS
    9869       10014 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9870             : #endif
    9871       10014 :     result = GetUseExceptions();
    9872             :   }
    9873       10014 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9874       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; } }
    9875             :   return resultobj;
    9876           0 : fail:
    9877           0 :   return NULL;
    9878             : }
    9879             : 
    9880             : 
    9881       11394 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9882       11394 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9883       11394 :   int result;
    9884             :   
    9885       11394 :   if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
    9886       11394 :   {
    9887             : #ifdef SED_HACKS
    9888       11394 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9889             : #endif
    9890       11394 :     {
    9891       11394 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9892       11394 :       result = (int)_GetExceptionsLocal();
    9893       11394 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9894             :     }
    9895             :   }
    9896       11394 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9897       11394 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9898             :   return resultobj;
    9899           0 : fail:
    9900           0 :   return NULL;
    9901             : }
    9902             : 
    9903             : 
    9904       22788 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9905       22788 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9906       22788 :   int arg1 ;
    9907       22788 :   int val1 ;
    9908       22788 :   int ecode1 = 0 ;
    9909       22788 :   PyObject *swig_obj[1] ;
    9910             :   
    9911       22788 :   if (!args) SWIG_fail;
    9912       22788 :   swig_obj[0] = args;
    9913       22788 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    9914       22788 :   if (!SWIG_IsOK(ecode1)) {
    9915           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
    9916             :   } 
    9917       22788 :   arg1 = static_cast< int >(val1);
    9918       22788 :   {
    9919             : #ifdef SED_HACKS
    9920       22788 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9921             : #endif
    9922       22788 :     {
    9923       22788 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9924       22788 :       _SetExceptionsLocal(arg1);
    9925       22788 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9926             :     }
    9927             :   }
    9928       22788 :   resultobj = SWIG_Py_Void();
    9929       22788 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9930             :   return resultobj;
    9931             : fail:
    9932             :   return NULL;
    9933             : }
    9934             : 
    9935             : 
    9936          29 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9937          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9938             :   
    9939          29 :   if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
    9940          29 :   {
    9941          29 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9942          29 :     _UseExceptions();
    9943          29 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9944             :   }
    9945          29 :   resultobj = SWIG_Py_Void();
    9946          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; } }
    9947             :   return resultobj;
    9948           0 : fail:
    9949           0 :   return NULL;
    9950             : }
    9951             : 
    9952             : 
    9953           5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9954           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9955             :   
    9956           5 :   if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
    9957           5 :   {
    9958           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9959           5 :     _DontUseExceptions();
    9960           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9961             :   }
    9962           5 :   resultobj = SWIG_Py_Void();
    9963           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; } }
    9964             :   return resultobj;
    9965           0 : fail:
    9966           0 :   return NULL;
    9967             : }
    9968             : 
    9969             : 
    9970       58267 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9971       58267 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9972       58267 :   int result;
    9973             :   
    9974       58267 :   if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
    9975       58267 :   {
    9976             : #ifdef SED_HACKS
    9977       58267 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9978             : #endif
    9979       58267 :     {
    9980       58267 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9981       58267 :       result = (int)_UserHasSpecifiedIfUsingExceptions();
    9982       58267 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9983             :     }
    9984             :   }
    9985       58267 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9986       58267 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9987             :   return resultobj;
    9988           0 : fail:
    9989           0 :   return NULL;
    9990             : }
    9991             : 
    9992             : 
    9993       27539 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9994       27539 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9995       27539 :   void **arg1 = (void **) 0 ;
    9996       27539 :   unsigned int arg2 ;
    9997       27539 :   unsigned int arg3 ;
    9998       27539 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    9999       27539 :   void *pyObject1 = NULL ;
   10000       27539 :   unsigned int val2 ;
   10001       27539 :   int ecode2 = 0 ;
   10002       27539 :   unsigned int val3 ;
   10003       27539 :   int ecode3 = 0 ;
   10004       27539 :   void *argp4 = 0 ;
   10005       27539 :   int res4 = 0 ;
   10006       27539 :   PyObject *swig_obj[3] ;
   10007       27539 :   unsigned int result;
   10008             :   
   10009       27539 :   {
   10010             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
   10011       27539 :     arg1 = &pyObject1;
   10012             :   }
   10013       27539 :   if (!SWIG_Python_UnpackTuple(args, "VSIFReadL", 3, 3, swig_obj)) SWIG_fail;
   10014       27539 :   ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val2);
   10015       27539 :   if (!SWIG_IsOK(ecode2)) {
   10016           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "unsigned int""'");
   10017             :   } 
   10018       27539 :   arg2 = static_cast< unsigned int >(val2);
   10019       27539 :   ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val3);
   10020       27539 :   if (!SWIG_IsOK(ecode3)) {
   10021           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "unsigned int""'");
   10022             :   } 
   10023       27539 :   arg3 = static_cast< unsigned int >(val3);
   10024       27539 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_VSILFILE, 0 |  0 );
   10025       27539 :   if (!SWIG_IsOK(res4)) {
   10026           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
   10027             :   }
   10028       27539 :   arg4 = reinterpret_cast< VSILFILE * >(argp4);
   10029       27539 :   {
   10030       27539 :     if (!arg4) {
   10031           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10032             :     }
   10033             :   }
   10034       27538 :   {
   10035       27538 :     const int bLocalUseExceptions = GetUseExceptions();
   10036       27538 :     if ( bLocalUseExceptions ) {
   10037        1671 :       pushErrorHandler();
   10038             :     }
   10039       27538 :     {
   10040       27538 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10041       27538 :       result = (unsigned int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
   10042       27538 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10043             :     }
   10044       27538 :     if ( bLocalUseExceptions ) {
   10045        1671 :       popErrorHandler();
   10046             :     }
   10047             : #ifndef SED_HACKS
   10048             :     if ( bLocalUseExceptions ) {
   10049             :       CPLErr eclass = CPLGetLastErrorType();
   10050             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10051             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10052             :       }
   10053             :     }
   10054             : #endif
   10055             :   }
   10056       27538 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   10057       27538 :   {
   10058             :     /* %typemap(argout) ( void **outPythonObject ) */
   10059       27538 :     Py_XDECREF(resultobj);
   10060       27538 :     if (*arg1)
   10061             :     {
   10062             :       resultobj = (PyObject*)*arg1;
   10063             :     }
   10064             :     else
   10065             :     {
   10066          12 :       resultobj = Py_None;
   10067          12 :       Py_INCREF(resultobj);
   10068             :     }
   10069             :   }
   10070       27539 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10071             :   return resultobj;
   10072             : fail:
   10073             :   return NULL;
   10074             : }
   10075             : 
   10076             : 
   10077           2 : SWIGINTERN PyObject *_wrap_VSIGetMemFileBuffer_unsafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10078           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10079           2 :   char *arg1 = (char *) 0 ;
   10080           2 :   GByte **arg2 = (GByte **) 0 ;
   10081           2 :   vsi_l_offset *arg3 = (vsi_l_offset *) 0 ;
   10082           2 :   int bToFree1 = 0 ;
   10083           2 :   GByte *out2 = NULL ;
   10084           2 :   vsi_l_offset length2 ;
   10085           2 :   PyObject *swig_obj[1] ;
   10086             :   
   10087           2 :   {
   10088           2 :     arg2 = &out2;
   10089           2 :     arg3 = &length2;
   10090             :   }
   10091           2 :   if (!args) SWIG_fail;
   10092           2 :   swig_obj[0] = args;
   10093           2 :   {
   10094             :     /* %typemap(in) (const char *utf8_path) */
   10095           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   10096             :     {
   10097           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   10098             :     }
   10099             :     else
   10100             :     {
   10101           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   10102             :       
   10103             :     }
   10104           2 :     if (arg1 == NULL)
   10105             :     {
   10106           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10107           0 :       SWIG_fail;
   10108             :     }
   10109             :   }
   10110           2 :   {
   10111           2 :     const int bLocalUseExceptions = GetUseExceptions();
   10112           2 :     if ( bLocalUseExceptions ) {
   10113           0 :       pushErrorHandler();
   10114             :     }
   10115           2 :     {
   10116           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10117           2 :       wrapper_VSIGetMemFileBuffer((char const *)arg1,arg2,arg3);
   10118           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10119             :     }
   10120           2 :     if ( bLocalUseExceptions ) {
   10121           0 :       popErrorHandler();
   10122             :     }
   10123             : #ifndef SED_HACKS
   10124             :     if ( bLocalUseExceptions ) {
   10125             :       CPLErr eclass = CPLGetLastErrorType();
   10126             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10127             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10128             :       }
   10129             :     }
   10130             : #endif
   10131             :   }
   10132           2 :   resultobj = SWIG_Py_Void();
   10133           2 :   {
   10134           2 :     if (*arg2 == NULL) {
   10135           1 :       if( GetUseExceptions() ) {
   10136           0 :         PyErr_SetString(PyExc_RuntimeError, "Could not find path");
   10137             :         resultobj = NULL;
   10138             :       } else {
   10139           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Could not find path");
   10140           1 :         resultobj = Py_None;
   10141           1 :         Py_INCREF(resultobj);
   10142             :       }
   10143             :     } else {
   10144           1 :       do {
   10145           1 :         resultobj = PyMemoryView_FromMemory(reinterpret_cast<char *>(*arg2), *arg3, PyBUF_READ);
   10146           1 :         if (resultobj == NULL) {
   10147           0 :           if( GetUseExceptions() ) {
   10148           0 :             PyErr_SetString(PyExc_RuntimeError, "Could not allocate result buffer");
   10149             :             resultobj = NULL;
   10150             :           } else {
   10151           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Could not allocate result buffer");
   10152           0 :             resultobj = Py_None;
   10153           0 :             Py_INCREF(resultobj);
   10154             :           }
   10155             :         }
   10156             :       } while(0);
   10157             :     }
   10158             :   }
   10159           2 :   {
   10160             :     /* %typemap(freearg) (const char *utf8_path) */
   10161           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10162             :   }
   10163           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; } }
   10164             :   return resultobj;
   10165           0 : fail:
   10166           0 :   {
   10167             :     /* %typemap(freearg) (const char *utf8_path) */
   10168           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10169             :   }
   10170             :   return NULL;
   10171             : }
   10172             : 
   10173             : 
   10174         147 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10175         147 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10176         147 :   char *arg1 = (char *) 0 ;
   10177         147 :   char *arg2 = (char *) 0 ;
   10178         147 :   int res1 ;
   10179         147 :   char *buf1 = 0 ;
   10180         147 :   int alloc1 = 0 ;
   10181         147 :   int res2 ;
   10182         147 :   char *buf2 = 0 ;
   10183         147 :   int alloc2 = 0 ;
   10184         147 :   PyObject *swig_obj[2] ;
   10185             :   
   10186         147 :   if (!SWIG_Python_UnpackTuple(args, "Debug", 2, 2, swig_obj)) SWIG_fail;
   10187         147 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10188         147 :   if (!SWIG_IsOK(res1)) {
   10189           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
   10190             :   }
   10191         147 :   arg1 = reinterpret_cast< char * >(buf1);
   10192         147 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10193         147 :   if (!SWIG_IsOK(res2)) {
   10194           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
   10195             :   }
   10196         147 :   arg2 = reinterpret_cast< char * >(buf2);
   10197         147 :   {
   10198         147 :     if (!arg2) {
   10199           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10200             :     }
   10201             :   }
   10202         147 :   {
   10203         147 :     const int bLocalUseExceptions = GetUseExceptions();
   10204         147 :     if ( bLocalUseExceptions ) {
   10205          98 :       pushErrorHandler();
   10206             :     }
   10207         147 :     {
   10208         147 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10209         147 :       Debug((char const *)arg1,(char const *)arg2);
   10210         147 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10211             :     }
   10212         147 :     if ( bLocalUseExceptions ) {
   10213          98 :       popErrorHandler();
   10214             :     }
   10215             : #ifndef SED_HACKS
   10216             :     if ( bLocalUseExceptions ) {
   10217             :       CPLErr eclass = CPLGetLastErrorType();
   10218             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10219             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10220             :       }
   10221             :     }
   10222             : #endif
   10223             :   }
   10224         147 :   resultobj = SWIG_Py_Void();
   10225         147 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10226         147 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10227         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; } }
   10228             :   return resultobj;
   10229           0 : fail:
   10230           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10231           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10232             :   return NULL;
   10233             : }
   10234             : 
   10235             : 
   10236           6 : SWIGINTERN PyObject *_wrap_SetErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10237           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10238           6 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10239           6 :   void *arg2 = (void *) NULL ;
   10240           6 :   PyObject *swig_obj[1] ;
   10241           6 :   CPLErr result;
   10242             :   
   10243           6 :   if (!SWIG_Python_UnpackTuple(args, "SetErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10244           6 :   if (swig_obj[0]) {
   10245           6 :     {
   10246             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10247           6 :       int alloc = 0;
   10248           6 :       char* pszCallbackName = NULL;
   10249           6 :       arg2 = NULL;
   10250           6 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10251             :       {
   10252           3 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10253             :         arg1 = CPLQuietErrorHandler;
   10254           3 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10255             :         arg1 = CPLQuietWarningsErrorHandler;
   10256           3 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10257             :         arg1 = CPLDefaultErrorHandler;
   10258           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10259             :         arg1 = CPLLoggingErrorHandler;
   10260             :         else
   10261             :         {
   10262           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10263           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10264           0 :           SWIG_fail;
   10265             :         }
   10266             :         
   10267           3 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10268             :       }
   10269           3 :       else if (!PyCallable_Check(swig_obj[0]))
   10270             :       {
   10271           0 :         PyErr_SetString( PyExc_RuntimeError,
   10272             :           "Object given is not a String or a Python function" );
   10273           0 :         SWIG_fail;
   10274             :       }
   10275             :       else
   10276             :       {
   10277           3 :         Py_INCREF(swig_obj[0]);
   10278           3 :         arg1 = PyCPLErrorHandler;
   10279           3 :         arg2 = swig_obj[0];
   10280             :       }
   10281             :     }
   10282             :   }
   10283           6 :   {
   10284           6 :     const int bLocalUseExceptions = GetUseExceptions();
   10285           6 :     if ( bLocalUseExceptions ) {
   10286           0 :       pushErrorHandler();
   10287             :     }
   10288           6 :     {
   10289           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10290           6 :       result = (CPLErr)SetErrorHandler(arg1,arg2);
   10291           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10292             :     }
   10293           6 :     if ( bLocalUseExceptions ) {
   10294           0 :       popErrorHandler();
   10295             :     }
   10296             : #ifndef SED_HACKS
   10297             :     if ( bLocalUseExceptions ) {
   10298             :       CPLErr eclass = CPLGetLastErrorType();
   10299             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10300             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10301             :       }
   10302             :     }
   10303             : #endif
   10304             :   }
   10305           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10306           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; } }
   10307             :   return resultobj;
   10308             : fail:
   10309             :   return NULL;
   10310             : }
   10311             : 
   10312             : 
   10313           1 : SWIGINTERN PyObject *_wrap_SetCurrentErrorHandlerCatchDebug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10314           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10315           1 :   int arg1 ;
   10316           1 :   int val1 ;
   10317           1 :   int ecode1 = 0 ;
   10318           1 :   PyObject *swig_obj[1] ;
   10319             :   
   10320           1 :   if (!args) SWIG_fail;
   10321           1 :   swig_obj[0] = args;
   10322           1 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10323           1 :   if (!SWIG_IsOK(ecode1)) {
   10324           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetCurrentErrorHandlerCatchDebug" "', argument " "1"" of type '" "int""'");
   10325             :   } 
   10326           1 :   arg1 = static_cast< int >(val1);
   10327           1 :   {
   10328           1 :     const int bLocalUseExceptions = GetUseExceptions();
   10329           1 :     if ( bLocalUseExceptions ) {
   10330           0 :       pushErrorHandler();
   10331             :     }
   10332           1 :     {
   10333           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10334           1 :       CPLSetCurrentErrorHandlerCatchDebug(arg1);
   10335           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10336             :     }
   10337           1 :     if ( bLocalUseExceptions ) {
   10338           0 :       popErrorHandler();
   10339             :     }
   10340             : #ifndef SED_HACKS
   10341             :     if ( bLocalUseExceptions ) {
   10342             :       CPLErr eclass = CPLGetLastErrorType();
   10343             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10344             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10345             :       }
   10346             :     }
   10347             : #endif
   10348             :   }
   10349           1 :   resultobj = SWIG_Py_Void();
   10350           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; } }
   10351             :   return resultobj;
   10352             : fail:
   10353             :   return NULL;
   10354             : }
   10355             : 
   10356             : 
   10357       30130 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10358       30130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10359       30130 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10360       30130 :   void *arg2 = (void *) NULL ;
   10361       30130 :   PyObject *swig_obj[1] ;
   10362       30130 :   CPLErr result;
   10363             :   
   10364       30130 :   if (!SWIG_Python_UnpackTuple(args, "PushErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10365       30130 :   if (swig_obj[0]) {
   10366       30054 :     {
   10367             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10368       30054 :       int alloc = 0;
   10369       30054 :       char* pszCallbackName = NULL;
   10370       30054 :       arg2 = NULL;
   10371       30054 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10372             :       {
   10373       28507 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10374             :         arg1 = CPLQuietErrorHandler;
   10375           7 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10376             :         arg1 = CPLQuietWarningsErrorHandler;
   10377           0 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10378             :         arg1 = CPLDefaultErrorHandler;
   10379           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10380             :         arg1 = CPLLoggingErrorHandler;
   10381             :         else
   10382             :         {
   10383           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10384           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10385           0 :           SWIG_fail;
   10386             :         }
   10387             :         
   10388       28507 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10389             :       }
   10390        1547 :       else if (!PyCallable_Check(swig_obj[0]))
   10391             :       {
   10392           0 :         PyErr_SetString( PyExc_RuntimeError,
   10393             :           "Object given is not a String or a Python function" );
   10394           0 :         SWIG_fail;
   10395             :       }
   10396             :       else
   10397             :       {
   10398        1547 :         Py_INCREF(swig_obj[0]);
   10399        1547 :         arg1 = PyCPLErrorHandler;
   10400        1547 :         arg2 = swig_obj[0];
   10401             :       }
   10402             :     }
   10403             :   }
   10404       30130 :   {
   10405       30694 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10406       30130 :     result = (CPLErr)PushErrorHandler(arg1,arg2);
   10407             :   }
   10408       30130 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10409       30130 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10410             :   return resultobj;
   10411             : fail:
   10412             :   return NULL;
   10413             : }
   10414             : 
   10415             : 
   10416       30125 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10417       30125 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10418             :   
   10419       30125 :   if (!SWIG_Python_UnpackTuple(args, "PopErrorHandler", 0, 0, 0)) SWIG_fail;
   10420       30125 :   {
   10421       30689 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10422       30125 :     PopErrorHandler();
   10423             :   }
   10424       30125 :   resultobj = SWIG_Py_Void();
   10425       30125 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10426             :   return resultobj;
   10427           0 : fail:
   10428           0 :   return NULL;
   10429             : }
   10430             : 
   10431             : 
   10432          29 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10433          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10434          29 :   CPLErr arg1 = (CPLErr) CE_Failure ;
   10435          29 :   int arg2 = (int) 0 ;
   10436          29 :   char *arg3 = (char *) "error" ;
   10437          29 :   int val1 ;
   10438          29 :   int ecode1 = 0 ;
   10439          29 :   int val2 ;
   10440          29 :   int ecode2 = 0 ;
   10441          29 :   int res3 ;
   10442          29 :   char *buf3 = 0 ;
   10443          29 :   int alloc3 = 0 ;
   10444          29 :   PyObject *swig_obj[3] ;
   10445             :   
   10446          29 :   if (!SWIG_Python_UnpackTuple(args, "Error", 0, 3, swig_obj)) SWIG_fail;
   10447          29 :   if (swig_obj[0]) {
   10448          29 :     ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10449          29 :     if (!SWIG_IsOK(ecode1)) {
   10450           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
   10451             :     } 
   10452          29 :     arg1 = static_cast< CPLErr >(val1);
   10453             :   }
   10454          29 :   if (swig_obj[1]) {
   10455          29 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   10456          29 :     if (!SWIG_IsOK(ecode2)) {
   10457           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
   10458             :     } 
   10459             :     arg2 = static_cast< int >(val2);
   10460             :   }
   10461          29 :   if (swig_obj[2]) {
   10462          29 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   10463          29 :     if (!SWIG_IsOK(res3)) {
   10464           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
   10465             :     }
   10466          29 :     arg3 = reinterpret_cast< char * >(buf3);
   10467             :   }
   10468          29 :   {
   10469          29 :     const int bLocalUseExceptions = GetUseExceptions();
   10470          29 :     if ( bLocalUseExceptions ) {
   10471           2 :       pushErrorHandler();
   10472             :     }
   10473          29 :     {
   10474          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10475          29 :       Error(arg1,arg2,(char const *)arg3);
   10476          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10477             :     }
   10478          29 :     if ( bLocalUseExceptions ) {
   10479           2 :       popErrorHandler();
   10480             :     }
   10481             : #ifndef SED_HACKS
   10482             :     if ( bLocalUseExceptions ) {
   10483             :       CPLErr eclass = CPLGetLastErrorType();
   10484             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10485             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10486             :       }
   10487             :     }
   10488             : #endif
   10489             :   }
   10490          29 :   resultobj = SWIG_Py_Void();
   10491          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10492          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; } }
   10493             :   return resultobj;
   10494           0 : fail:
   10495           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10496             :   return NULL;
   10497             : }
   10498             : 
   10499             : 
   10500           0 : SWIGINTERN PyObject *_wrap_GOA2GetAuthorizationURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10501           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10502           0 :   char *arg1 = (char *) 0 ;
   10503           0 :   int res1 ;
   10504           0 :   char *buf1 = 0 ;
   10505           0 :   int alloc1 = 0 ;
   10506           0 :   PyObject *swig_obj[1] ;
   10507           0 :   retStringAndCPLFree *result = 0 ;
   10508             :   
   10509           0 :   if (!args) SWIG_fail;
   10510           0 :   swig_obj[0] = args;
   10511           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10512           0 :   if (!SWIG_IsOK(res1)) {
   10513           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAuthorizationURL" "', argument " "1"" of type '" "char const *""'");
   10514             :   }
   10515           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10516           0 :   {
   10517           0 :     if (!arg1) {
   10518           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10519             :     }
   10520             :   }
   10521           0 :   {
   10522           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10523           0 :     if ( bLocalUseExceptions ) {
   10524           0 :       pushErrorHandler();
   10525             :     }
   10526           0 :     {
   10527           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10528           0 :       result = (retStringAndCPLFree *)GOA2GetAuthorizationURL((char const *)arg1);
   10529           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10530             :     }
   10531           0 :     if ( bLocalUseExceptions ) {
   10532           0 :       popErrorHandler();
   10533             :     }
   10534             : #ifndef SED_HACKS
   10535             :     if ( bLocalUseExceptions ) {
   10536             :       CPLErr eclass = CPLGetLastErrorType();
   10537             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10538             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10539             :       }
   10540             :     }
   10541             : #endif
   10542             :   }
   10543           0 :   {
   10544             :     /* %typemap(out) (retStringAndCPLFree*) */
   10545           0 :     Py_XDECREF(resultobj);
   10546           0 :     if(result)
   10547             :     {
   10548           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10549           0 :       CPLFree(result);
   10550             :     }
   10551             :     else
   10552             :     {
   10553           0 :       resultobj = Py_None;
   10554           0 :       Py_INCREF(resultobj);
   10555             :     }
   10556             :   }
   10557           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10558           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; } }
   10559             :   return resultobj;
   10560           0 : fail:
   10561           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10562             :   return NULL;
   10563             : }
   10564             : 
   10565             : 
   10566           0 : SWIGINTERN PyObject *_wrap_GOA2GetRefreshToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10567           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10568           0 :   char *arg1 = (char *) 0 ;
   10569           0 :   char *arg2 = (char *) 0 ;
   10570           0 :   int res1 ;
   10571           0 :   char *buf1 = 0 ;
   10572           0 :   int alloc1 = 0 ;
   10573           0 :   int res2 ;
   10574           0 :   char *buf2 = 0 ;
   10575           0 :   int alloc2 = 0 ;
   10576           0 :   PyObject *swig_obj[2] ;
   10577           0 :   retStringAndCPLFree *result = 0 ;
   10578             :   
   10579           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetRefreshToken", 2, 2, swig_obj)) SWIG_fail;
   10580           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10581           0 :   if (!SWIG_IsOK(res1)) {
   10582           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetRefreshToken" "', argument " "1"" of type '" "char const *""'");
   10583             :   }
   10584           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10585           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10586           0 :   if (!SWIG_IsOK(res2)) {
   10587           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetRefreshToken" "', argument " "2"" of type '" "char const *""'");
   10588             :   }
   10589           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10590           0 :   {
   10591           0 :     if (!arg1) {
   10592           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10593             :     }
   10594             :   }
   10595           0 :   {
   10596           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10597           0 :     if ( bLocalUseExceptions ) {
   10598           0 :       pushErrorHandler();
   10599             :     }
   10600           0 :     {
   10601           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10602           0 :       result = (retStringAndCPLFree *)GOA2GetRefreshToken((char const *)arg1,(char const *)arg2);
   10603           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10604             :     }
   10605           0 :     if ( bLocalUseExceptions ) {
   10606           0 :       popErrorHandler();
   10607             :     }
   10608             : #ifndef SED_HACKS
   10609             :     if ( bLocalUseExceptions ) {
   10610             :       CPLErr eclass = CPLGetLastErrorType();
   10611             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10612             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10613             :       }
   10614             :     }
   10615             : #endif
   10616             :   }
   10617           0 :   {
   10618             :     /* %typemap(out) (retStringAndCPLFree*) */
   10619           0 :     Py_XDECREF(resultobj);
   10620           0 :     if(result)
   10621             :     {
   10622           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10623           0 :       CPLFree(result);
   10624             :     }
   10625             :     else
   10626             :     {
   10627           0 :       resultobj = Py_None;
   10628           0 :       Py_INCREF(resultobj);
   10629             :     }
   10630             :   }
   10631           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10632           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10633           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; } }
   10634             :   return resultobj;
   10635           0 : fail:
   10636           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10637           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10638             :   return NULL;
   10639             : }
   10640             : 
   10641             : 
   10642           0 : SWIGINTERN PyObject *_wrap_GOA2GetAccessToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10643           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10644           0 :   char *arg1 = (char *) 0 ;
   10645           0 :   char *arg2 = (char *) 0 ;
   10646           0 :   int res1 ;
   10647           0 :   char *buf1 = 0 ;
   10648           0 :   int alloc1 = 0 ;
   10649           0 :   int res2 ;
   10650           0 :   char *buf2 = 0 ;
   10651           0 :   int alloc2 = 0 ;
   10652           0 :   PyObject *swig_obj[2] ;
   10653           0 :   retStringAndCPLFree *result = 0 ;
   10654             :   
   10655           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetAccessToken", 2, 2, swig_obj)) SWIG_fail;
   10656           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10657           0 :   if (!SWIG_IsOK(res1)) {
   10658           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAccessToken" "', argument " "1"" of type '" "char const *""'");
   10659             :   }
   10660           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10661           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10662           0 :   if (!SWIG_IsOK(res2)) {
   10663           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetAccessToken" "', argument " "2"" of type '" "char const *""'");
   10664             :   }
   10665           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10666           0 :   {
   10667           0 :     if (!arg1) {
   10668           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10669             :     }
   10670             :   }
   10671           0 :   {
   10672           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10673           0 :     if ( bLocalUseExceptions ) {
   10674           0 :       pushErrorHandler();
   10675             :     }
   10676           0 :     {
   10677           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10678           0 :       result = (retStringAndCPLFree *)GOA2GetAccessToken((char const *)arg1,(char const *)arg2);
   10679           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10680             :     }
   10681           0 :     if ( bLocalUseExceptions ) {
   10682           0 :       popErrorHandler();
   10683             :     }
   10684             : #ifndef SED_HACKS
   10685             :     if ( bLocalUseExceptions ) {
   10686             :       CPLErr eclass = CPLGetLastErrorType();
   10687             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10688             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10689             :       }
   10690             :     }
   10691             : #endif
   10692             :   }
   10693           0 :   {
   10694             :     /* %typemap(out) (retStringAndCPLFree*) */
   10695           0 :     Py_XDECREF(resultobj);
   10696           0 :     if(result)
   10697             :     {
   10698           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10699           0 :       CPLFree(result);
   10700             :     }
   10701             :     else
   10702             :     {
   10703           0 :       resultobj = Py_None;
   10704           0 :       Py_INCREF(resultobj);
   10705             :     }
   10706             :   }
   10707           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10708           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10709           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; } }
   10710             :   return resultobj;
   10711           0 : fail:
   10712           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10713           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10714             :   return NULL;
   10715             : }
   10716             : 
   10717             : 
   10718        1783 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10719        1783 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10720             :   
   10721        1783 :   if (!SWIG_Python_UnpackTuple(args, "ErrorReset", 0, 0, 0)) SWIG_fail;
   10722        1783 :   {
   10723        1783 :     const int bLocalUseExceptions = GetUseExceptions();
   10724        1783 :     if ( bLocalUseExceptions ) {
   10725         306 :       pushErrorHandler();
   10726             :     }
   10727        1783 :     {
   10728        1783 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10729        1783 :       CPLErrorReset();
   10730        1783 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10731             :     }
   10732        1783 :     if ( bLocalUseExceptions ) {
   10733         306 :       popErrorHandler();
   10734             :     }
   10735             : #ifndef SED_HACKS
   10736             :     if ( bLocalUseExceptions ) {
   10737             :       CPLErr eclass = CPLGetLastErrorType();
   10738             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10739             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10740             :       }
   10741             :     }
   10742             : #endif
   10743             :   }
   10744        1783 :   resultobj = SWIG_Py_Void();
   10745        1783 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10746             :   return resultobj;
   10747           0 : fail:
   10748           0 :   return NULL;
   10749             : }
   10750             : 
   10751             : 
   10752         170 : SWIGINTERN PyObject *_wrap_wrapper_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10753         170 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10754         170 :   int arg1 ;
   10755         170 :   char *arg2 = (char *) 0 ;
   10756         170 :   int arg3 = (int) CPLES_SQL ;
   10757         170 :   int alloc1 = 0 ;
   10758         170 :   bool viewIsValid1 = false ;
   10759         170 :   Py_buffer view1 ;
   10760         170 :   int val3 ;
   10761         170 :   int ecode3 = 0 ;
   10762         170 :   PyObject * obj0 = 0 ;
   10763         170 :   PyObject * obj1 = 0 ;
   10764         170 :   char * kwnames[] = {
   10765             :     (char *)"len",  (char *)"scheme",  NULL 
   10766             :   };
   10767         170 :   retStringAndCPLFree *result = 0 ;
   10768             :   
   10769         170 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:wrapper_EscapeString", kwnames, &obj0, &obj1)) SWIG_fail;
   10770         170 :   {
   10771             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10772         170 :     char* ptr = NULL;
   10773         170 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10774           0 :       SWIG_fail;
   10775             :     }
   10776         170 :     arg2 = (char *)ptr;
   10777             :   }
   10778         170 :   if (obj1) {
   10779         170 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   10780         170 :     if (!SWIG_IsOK(ecode3)) {
   10781           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wrapper_EscapeString" "', argument " "3"" of type '" "int""'");
   10782             :     } 
   10783             :     arg3 = static_cast< int >(val3);
   10784             :   }
   10785         170 :   {
   10786         170 :     const int bLocalUseExceptions = GetUseExceptions();
   10787         170 :     if ( bLocalUseExceptions ) {
   10788         137 :       pushErrorHandler();
   10789             :     }
   10790         170 :     {
   10791         170 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10792         170 :       result = (retStringAndCPLFree *)wrapper_EscapeString(arg1,arg2,arg3);
   10793         170 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10794             :     }
   10795         170 :     if ( bLocalUseExceptions ) {
   10796         137 :       popErrorHandler();
   10797             :     }
   10798             : #ifndef SED_HACKS
   10799             :     if ( bLocalUseExceptions ) {
   10800             :       CPLErr eclass = CPLGetLastErrorType();
   10801             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10802             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10803             :       }
   10804             :     }
   10805             : #endif
   10806             :   }
   10807         170 :   {
   10808             :     /* %typemap(out) (retStringAndCPLFree*) */
   10809         170 :     Py_XDECREF(resultobj);
   10810         170 :     if(result)
   10811             :     {
   10812         170 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10813         170 :       CPLFree(result);
   10814             :     }
   10815             :     else
   10816             :     {
   10817           0 :       resultobj = Py_None;
   10818           0 :       Py_INCREF(resultobj);
   10819             :     }
   10820             :   }
   10821         170 :   {
   10822             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10823         170 :     if( viewIsValid1 ) {
   10824           0 :       PyBuffer_Release(&view1);
   10825             :     }
   10826         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10827         170 :       delete[] arg2;
   10828             :     }
   10829             :   }
   10830         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; } }
   10831             :   return resultobj;
   10832           0 : fail:
   10833           0 :   {
   10834             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10835           0 :     if( viewIsValid1 ) {
   10836           0 :       PyBuffer_Release(&view1);
   10837             :     }
   10838         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10839           0 :       delete[] arg2;
   10840             :     }
   10841             :   }
   10842             :   return NULL;
   10843             : }
   10844             : 
   10845             : 
   10846          81 : SWIGINTERN PyObject *_wrap_EscapeBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10847          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10848          81 :   int arg1 ;
   10849          81 :   char *arg2 = (char *) 0 ;
   10850          81 :   size_t *arg3 = (size_t *) 0 ;
   10851          81 :   char **arg4 = (char **) 0 ;
   10852          81 :   int arg5 = (int) CPLES_SQL ;
   10853          81 :   int alloc1 = 0 ;
   10854          81 :   bool viewIsValid1 = false ;
   10855          81 :   Py_buffer view1 ;
   10856          81 :   size_t nLen3 = 0 ;
   10857          81 :   char *pBuf3 = 0 ;
   10858          81 :   int val5 ;
   10859          81 :   int ecode5 = 0 ;
   10860          81 :   PyObject * obj0 = 0 ;
   10861          81 :   PyObject * obj1 = 0 ;
   10862          81 :   char * kwnames[] = {
   10863             :     (char *)"len",  (char *)"scheme",  NULL 
   10864             :   };
   10865             :   
   10866          81 :   {
   10867             :     /* %typemap(in,numinputs=0) (size_t *nLen3, char **pBuf3 ) */
   10868          81 :     arg3 = &nLen3;
   10869          81 :     arg4 = &pBuf3;
   10870             :   }
   10871          81 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:EscapeBinary", kwnames, &obj0, &obj1)) SWIG_fail;
   10872          81 :   {
   10873             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10874          81 :     char* ptr = NULL;
   10875          81 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10876           0 :       SWIG_fail;
   10877             :     }
   10878          81 :     arg2 = (char *)ptr;
   10879             :   }
   10880          81 :   if (obj1) {
   10881          81 :     ecode5 = SWIG_AsVal_int(obj1, &val5);
   10882          81 :     if (!SWIG_IsOK(ecode5)) {
   10883           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EscapeBinary" "', argument " "5"" of type '" "int""'");
   10884             :     } 
   10885             :     arg5 = static_cast< int >(val5);
   10886             :   }
   10887          81 :   {
   10888          81 :     const int bLocalUseExceptions = GetUseExceptions();
   10889          81 :     if ( bLocalUseExceptions ) {
   10890          72 :       pushErrorHandler();
   10891             :     }
   10892          81 :     {
   10893          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10894          81 :       EscapeBinary(arg1,arg2,arg3,arg4,arg5);
   10895          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10896             :     }
   10897          81 :     if ( bLocalUseExceptions ) {
   10898          72 :       popErrorHandler();
   10899             :     }
   10900             : #ifndef SED_HACKS
   10901             :     if ( bLocalUseExceptions ) {
   10902             :       CPLErr eclass = CPLGetLastErrorType();
   10903             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10904             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10905             :       }
   10906             :     }
   10907             : #endif
   10908             :   }
   10909          81 :   resultobj = SWIG_Py_Void();
   10910          81 :   {
   10911             :     /* %typemap(argout) (size_t *nLen, char **pBuf ) */
   10912          81 :     Py_XDECREF(resultobj);
   10913          81 :     if( *arg4 ) {
   10914          81 :       resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
   10915             :     }
   10916             :     else {
   10917           0 :       resultobj = Py_None;
   10918           0 :       Py_INCREF(Py_None);
   10919             :     }
   10920             :   }
   10921          81 :   {
   10922             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10923          81 :     if( viewIsValid1 ) {
   10924          81 :       PyBuffer_Release(&view1);
   10925             :     }
   10926           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10927           0 :       delete[] arg2;
   10928             :     }
   10929             :   }
   10930          81 :   {
   10931             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10932          81 :     VSIFree( *arg4 );
   10933             :   }
   10934          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; } }
   10935             :   return resultobj;
   10936           0 : fail:
   10937           0 :   {
   10938             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10939           0 :     if( viewIsValid1 ) {
   10940           0 :       PyBuffer_Release(&view1);
   10941             :     }
   10942           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10943           0 :       delete[] arg2;
   10944             :     }
   10945             :   }
   10946           0 :   {
   10947             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10948           0 :     VSIFree( *arg4 );
   10949             :   }
   10950             :   return NULL;
   10951             : }
   10952             : 
   10953             : 
   10954           2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10955           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10956           2 :   int result;
   10957             :   
   10958           2 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10959           2 :   {
   10960             : #ifdef SED_HACKS
   10961           2 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10962             : #endif
   10963             :     
   10964           2 :     result = CPLGetLastErrorNo();
   10965             :   }
   10966           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10967           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; } }
   10968             :   return resultobj;
   10969           0 : fail:
   10970           0 :   return NULL;
   10971             : }
   10972             : 
   10973             : 
   10974          75 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10975          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10976          75 :   int result;
   10977             :   
   10978          75 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorType", 0, 0, 0)) SWIG_fail;
   10979          75 :   {
   10980             : #ifdef SED_HACKS
   10981          87 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10982             : #endif
   10983             :     
   10984          75 :     result = CPLGetLastErrorType();
   10985             :   }
   10986          75 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10987          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; } }
   10988             :   return resultobj;
   10989           0 : fail:
   10990           0 :   return NULL;
   10991             : }
   10992             : 
   10993             : 
   10994        2091 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10995        2091 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10996        2091 :   char *result = 0 ;
   10997             :   
   10998        2091 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   10999        2091 :   {
   11000             : #ifdef SED_HACKS
   11001        2322 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   11002             : #endif
   11003             :     
   11004        2091 :     result = (char*)CPLGetLastErrorMsg();
   11005             :   }
   11006        2091 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11007        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; } }
   11008             :   return resultobj;
   11009           0 : fail:
   11010           0 :   return NULL;
   11011             : }
   11012             : 
   11013             : 
   11014           0 : SWIGINTERN PyObject *_wrap_GetErrorCounter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11015           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11016           0 :   unsigned int result;
   11017             :   
   11018           0 :   if (!SWIG_Python_UnpackTuple(args, "GetErrorCounter", 0, 0, 0)) SWIG_fail;
   11019           0 :   {
   11020             : #ifdef SED_HACKS
   11021           0 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   11022             : #endif
   11023             :     
   11024           0 :     result = CPLGetErrorCounter();
   11025             :   }
   11026           0 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   11027           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; } }
   11028             :   return resultobj;
   11029           0 : fail:
   11030           0 :   return NULL;
   11031             : }
   11032             : 
   11033             : 
   11034           4 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11035           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11036           4 :   int result;
   11037             :   
   11038           4 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorNo", 0, 0, 0)) SWIG_fail;
   11039           4 :   {
   11040           4 :     const int bLocalUseExceptions = GetUseExceptions();
   11041           4 :     if ( bLocalUseExceptions ) {
   11042           0 :       pushErrorHandler();
   11043             :     }
   11044           4 :     {
   11045           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11046           4 :       result = (int)VSIGetLastErrorNo();
   11047           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11048             :     }
   11049           4 :     if ( bLocalUseExceptions ) {
   11050           0 :       popErrorHandler();
   11051             :     }
   11052             : #ifndef SED_HACKS
   11053             :     if ( bLocalUseExceptions ) {
   11054             :       CPLErr eclass = CPLGetLastErrorType();
   11055             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11056             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11057             :       }
   11058             :     }
   11059             : #endif
   11060             :   }
   11061           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11062           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; } }
   11063             :   return resultobj;
   11064           0 : fail:
   11065           0 :   return NULL;
   11066             : }
   11067             : 
   11068             : 
   11069          42 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11070          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11071          42 :   char *result = 0 ;
   11072             :   
   11073          42 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   11074          42 :   {
   11075          42 :     const int bLocalUseExceptions = GetUseExceptions();
   11076          42 :     if ( bLocalUseExceptions ) {
   11077          11 :       pushErrorHandler();
   11078             :     }
   11079          42 :     {
   11080          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11081          42 :       result = (char *)VSIGetLastErrorMsg();
   11082          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11083             :     }
   11084          42 :     if ( bLocalUseExceptions ) {
   11085          11 :       popErrorHandler();
   11086             :     }
   11087             : #ifndef SED_HACKS
   11088             :     if ( bLocalUseExceptions ) {
   11089             :       CPLErr eclass = CPLGetLastErrorType();
   11090             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11091             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11092             :       }
   11093             :     }
   11094             : #endif
   11095             :   }
   11096          42 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11097          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; } }
   11098             :   return resultobj;
   11099           0 : fail:
   11100           0 :   return NULL;
   11101             : }
   11102             : 
   11103             : 
   11104           3 : SWIGINTERN PyObject *_wrap_VSIErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11105           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11106             :   
   11107           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIErrorReset", 0, 0, 0)) SWIG_fail;
   11108           3 :   {
   11109           3 :     const int bLocalUseExceptions = GetUseExceptions();
   11110           3 :     if ( bLocalUseExceptions ) {
   11111           1 :       pushErrorHandler();
   11112             :     }
   11113           3 :     {
   11114           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11115           3 :       VSIErrorReset();
   11116           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11117             :     }
   11118           3 :     if ( bLocalUseExceptions ) {
   11119           1 :       popErrorHandler();
   11120             :     }
   11121             : #ifndef SED_HACKS
   11122             :     if ( bLocalUseExceptions ) {
   11123             :       CPLErr eclass = CPLGetLastErrorType();
   11124             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11125             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11126             :       }
   11127             :     }
   11128             : #endif
   11129             :   }
   11130           3 :   resultobj = SWIG_Py_Void();
   11131           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; } }
   11132             :   return resultobj;
   11133           0 : fail:
   11134           0 :   return NULL;
   11135             : }
   11136             : 
   11137             : 
   11138           0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11139           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11140           0 :   char *arg1 = (char *) 0 ;
   11141           0 :   int bToFree1 = 0 ;
   11142           0 :   PyObject *swig_obj[1] ;
   11143             :   
   11144           0 :   if (!args) SWIG_fail;
   11145           0 :   swig_obj[0] = args;
   11146           0 :   {
   11147             :     /* %typemap(in) (const char *utf8_path) */
   11148           0 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11149             :     {
   11150           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11151             :     }
   11152             :     else
   11153             :     {
   11154           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11155             :       
   11156             :     }
   11157           0 :     if (arg1 == NULL)
   11158             :     {
   11159           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11160           0 :       SWIG_fail;
   11161             :     }
   11162             :   }
   11163           0 :   {
   11164           0 :     if (!arg1) {
   11165           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11166             :     }
   11167             :   }
   11168           0 :   {
   11169           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11170           0 :     if ( bLocalUseExceptions ) {
   11171           0 :       pushErrorHandler();
   11172             :     }
   11173           0 :     {
   11174           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11175           0 :       CPLPushFinderLocation((char const *)arg1);
   11176           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11177             :     }
   11178           0 :     if ( bLocalUseExceptions ) {
   11179           0 :       popErrorHandler();
   11180             :     }
   11181             : #ifndef SED_HACKS
   11182             :     if ( bLocalUseExceptions ) {
   11183             :       CPLErr eclass = CPLGetLastErrorType();
   11184             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11185             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11186             :       }
   11187             :     }
   11188             : #endif
   11189             :   }
   11190           0 :   resultobj = SWIG_Py_Void();
   11191           0 :   {
   11192             :     /* %typemap(freearg) (const char *utf8_path) */
   11193           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11194             :   }
   11195           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; } }
   11196             :   return resultobj;
   11197           0 : fail:
   11198           0 :   {
   11199             :     /* %typemap(freearg) (const char *utf8_path) */
   11200           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11201             :   }
   11202             :   return NULL;
   11203             : }
   11204             : 
   11205             : 
   11206           0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11207           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11208             :   
   11209           0 :   if (!SWIG_Python_UnpackTuple(args, "PopFinderLocation", 0, 0, 0)) SWIG_fail;
   11210           0 :   {
   11211           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11212           0 :     if ( bLocalUseExceptions ) {
   11213           0 :       pushErrorHandler();
   11214             :     }
   11215           0 :     {
   11216           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11217           0 :       CPLPopFinderLocation();
   11218           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11219             :     }
   11220           0 :     if ( bLocalUseExceptions ) {
   11221           0 :       popErrorHandler();
   11222             :     }
   11223             : #ifndef SED_HACKS
   11224             :     if ( bLocalUseExceptions ) {
   11225             :       CPLErr eclass = CPLGetLastErrorType();
   11226             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11227             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11228             :       }
   11229             :     }
   11230             : #endif
   11231             :   }
   11232           0 :   resultobj = SWIG_Py_Void();
   11233           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; } }
   11234             :   return resultobj;
   11235           0 : fail:
   11236           0 :   return NULL;
   11237             : }
   11238             : 
   11239             : 
   11240           0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11241           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11242             :   
   11243           0 :   if (!SWIG_Python_UnpackTuple(args, "FinderClean", 0, 0, 0)) SWIG_fail;
   11244           0 :   {
   11245           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11246           0 :     if ( bLocalUseExceptions ) {
   11247           0 :       pushErrorHandler();
   11248             :     }
   11249           0 :     {
   11250           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11251           0 :       CPLFinderClean();
   11252           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11253             :     }
   11254           0 :     if ( bLocalUseExceptions ) {
   11255           0 :       popErrorHandler();
   11256             :     }
   11257             : #ifndef SED_HACKS
   11258             :     if ( bLocalUseExceptions ) {
   11259             :       CPLErr eclass = CPLGetLastErrorType();
   11260             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11261             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11262             :       }
   11263             :     }
   11264             : #endif
   11265             :   }
   11266           0 :   resultobj = SWIG_Py_Void();
   11267           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; } }
   11268             :   return resultobj;
   11269           0 : fail:
   11270           0 :   return NULL;
   11271             : }
   11272             : 
   11273             : 
   11274          47 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11275          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11276          47 :   char *arg1 = (char *) 0 ;
   11277          47 :   char *arg2 = (char *) 0 ;
   11278          47 :   int res1 ;
   11279          47 :   char *buf1 = 0 ;
   11280          47 :   int alloc1 = 0 ;
   11281          47 :   int bToFree2 = 0 ;
   11282          47 :   PyObject *swig_obj[2] ;
   11283          47 :   char *result = 0 ;
   11284             :   
   11285          47 :   if (!SWIG_Python_UnpackTuple(args, "FindFile", 2, 2, swig_obj)) SWIG_fail;
   11286          47 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11287          47 :   if (!SWIG_IsOK(res1)) {
   11288           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
   11289             :   }
   11290          47 :   arg1 = reinterpret_cast< char * >(buf1);
   11291          47 :   {
   11292             :     /* %typemap(in) (const char *utf8_path) */
   11293          47 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   11294             :     {
   11295          47 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   11296             :     }
   11297             :     else
   11298             :     {
   11299           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   11300             :       
   11301             :     }
   11302          47 :     if (arg2 == NULL)
   11303             :     {
   11304           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11305           0 :       SWIG_fail;
   11306             :     }
   11307             :   }
   11308          47 :   {
   11309          47 :     if (!arg2) {
   11310          47 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11311             :     }
   11312             :   }
   11313          47 :   {
   11314          47 :     const int bLocalUseExceptions = GetUseExceptions();
   11315          47 :     if ( bLocalUseExceptions ) {
   11316          47 :       pushErrorHandler();
   11317             :     }
   11318          47 :     {
   11319          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11320          47 :       result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
   11321          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11322             :     }
   11323          47 :     if ( bLocalUseExceptions ) {
   11324          47 :       popErrorHandler();
   11325             :     }
   11326             : #ifndef SED_HACKS
   11327             :     if ( bLocalUseExceptions ) {
   11328             :       CPLErr eclass = CPLGetLastErrorType();
   11329             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11330             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11331             :       }
   11332             :     }
   11333             : #endif
   11334             :   }
   11335          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11336          47 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11337          47 :   {
   11338             :     /* %typemap(freearg) (const char *utf8_path) */
   11339          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11340             :   }
   11341          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; } }
   11342             :   return resultobj;
   11343           0 : fail:
   11344           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11345           0 :   {
   11346             :     /* %typemap(freearg) (const char *utf8_path) */
   11347          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11348             :   }
   11349             :   return NULL;
   11350             : }
   11351             : 
   11352             : 
   11353        3287 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11354        3287 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11355        3287 :   char *arg1 = (char *) 0 ;
   11356        3287 :   int arg2 = (int) 0 ;
   11357        3287 :   int bToFree1 = 0 ;
   11358        3287 :   int val2 ;
   11359        3287 :   int ecode2 = 0 ;
   11360        3287 :   PyObject *swig_obj[2] ;
   11361        3287 :   char **result = 0 ;
   11362             :   
   11363        3287 :   if (!SWIG_Python_UnpackTuple(args, "ReadDir", 1, 2, swig_obj)) SWIG_fail;
   11364        3287 :   {
   11365             :     /* %typemap(in) (const char *utf8_path) */
   11366        3287 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11367             :     {
   11368        3265 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11369             :     }
   11370             :     else
   11371             :     {
   11372          22 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11373             :       
   11374             :     }
   11375        3287 :     if (arg1 == NULL)
   11376             :     {
   11377           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11378           0 :       SWIG_fail;
   11379             :     }
   11380             :   }
   11381        3287 :   if (swig_obj[1]) {
   11382           6 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11383           6 :     if (!SWIG_IsOK(ecode2)) {
   11384           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadDir" "', argument " "2"" of type '" "int""'");
   11385             :     } 
   11386             :     arg2 = static_cast< int >(val2);
   11387             :   }
   11388        3287 :   {
   11389        3287 :     if (!arg1) {
   11390        3287 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11391             :     }
   11392             :   }
   11393        3287 :   {
   11394        3287 :     const int bLocalUseExceptions = GetUseExceptions();
   11395        3287 :     if ( bLocalUseExceptions ) {
   11396        2535 :       pushErrorHandler();
   11397             :     }
   11398        3287 :     {
   11399        3287 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11400        3287 :       result = (char **)wrapper_VSIReadDirEx((char const *)arg1,arg2);
   11401        3287 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11402             :     }
   11403        3287 :     if ( bLocalUseExceptions ) {
   11404        2535 :       popErrorHandler();
   11405             :     }
   11406             : #ifndef SED_HACKS
   11407             :     if ( bLocalUseExceptions ) {
   11408             :       CPLErr eclass = CPLGetLastErrorType();
   11409             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11410             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11411             :       }
   11412             :     }
   11413             : #endif
   11414             :   }
   11415        3287 :   {
   11416             :     /* %typemap(out) char **CSL -> ( string ) */
   11417        3287 :     bool bErr = false;
   11418        3287 :     resultobj = CSLToList(result, &bErr);
   11419        3287 :     CSLDestroy(result);
   11420        3287 :     if( bErr ) {
   11421           0 :       SWIG_fail;
   11422             :     }
   11423             :   }
   11424        3287 :   {
   11425             :     /* %typemap(freearg) (const char *utf8_path) */
   11426        3287 :     GDALPythonFreeCStr(arg1, bToFree1);
   11427             :   }
   11428        3319 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11429             :   return resultobj;
   11430           0 : fail:
   11431           0 :   {
   11432             :     /* %typemap(freearg) (const char *utf8_path) */
   11433        3287 :     GDALPythonFreeCStr(arg1, bToFree1);
   11434             :   }
   11435             :   return NULL;
   11436             : }
   11437             : 
   11438             : 
   11439        1133 : SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11440        1133 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11441        1133 :   char *arg1 = (char *) 0 ;
   11442        1133 :   int bToFree1 = 0 ;
   11443        1133 :   PyObject *swig_obj[1] ;
   11444        1133 :   char **result = 0 ;
   11445             :   
   11446        1133 :   if (!args) SWIG_fail;
   11447        1133 :   swig_obj[0] = args;
   11448        1133 :   {
   11449             :     /* %typemap(in) (const char *utf8_path) */
   11450        1133 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11451             :     {
   11452        1068 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11453             :     }
   11454             :     else
   11455             :     {
   11456          65 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11457             :       
   11458             :     }
   11459        1133 :     if (arg1 == NULL)
   11460             :     {
   11461           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11462           0 :       SWIG_fail;
   11463             :     }
   11464             :   }
   11465        1133 :   {
   11466        1133 :     if (!arg1) {
   11467        1133 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11468             :     }
   11469             :   }
   11470        1133 :   {
   11471        1133 :     const int bLocalUseExceptions = GetUseExceptions();
   11472        1133 :     if ( bLocalUseExceptions ) {
   11473         300 :       pushErrorHandler();
   11474             :     }
   11475        1133 :     {
   11476        1133 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11477        1133 :       result = (char **)VSIReadDirRecursive((char const *)arg1);
   11478        1133 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11479             :     }
   11480        1133 :     if ( bLocalUseExceptions ) {
   11481         300 :       popErrorHandler();
   11482             :     }
   11483             : #ifndef SED_HACKS
   11484             :     if ( bLocalUseExceptions ) {
   11485             :       CPLErr eclass = CPLGetLastErrorType();
   11486             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11487             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11488             :       }
   11489             :     }
   11490             : #endif
   11491             :   }
   11492        1133 :   {
   11493             :     /* %typemap(out) char **CSL -> ( string ) */
   11494        1133 :     bool bErr = false;
   11495        1133 :     resultobj = CSLToList(result, &bErr);
   11496        1133 :     CSLDestroy(result);
   11497        1133 :     if( bErr ) {
   11498           0 :       SWIG_fail;
   11499             :     }
   11500             :   }
   11501        1133 :   {
   11502             :     /* %typemap(freearg) (const char *utf8_path) */
   11503        1133 :     GDALPythonFreeCStr(arg1, bToFree1);
   11504             :   }
   11505        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; } }
   11506             :   return resultobj;
   11507           0 : fail:
   11508           0 :   {
   11509             :     /* %typemap(freearg) (const char *utf8_path) */
   11510        1133 :     GDALPythonFreeCStr(arg1, bToFree1);
   11511             :   }
   11512             :   return NULL;
   11513             : }
   11514             : 
   11515             : 
   11516          35 : SWIGINTERN PyObject *_wrap_OpenDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11517          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11518          35 :   char *arg1 = (char *) 0 ;
   11519          35 :   int arg2 = (int) -1 ;
   11520          35 :   char **arg3 = (char **) NULL ;
   11521          35 :   int bToFree1 = 0 ;
   11522          35 :   int val2 ;
   11523          35 :   int ecode2 = 0 ;
   11524          35 :   PyObject *swig_obj[3] ;
   11525          35 :   VSIDIR *result = 0 ;
   11526             :   
   11527          35 :   if (!SWIG_Python_UnpackTuple(args, "OpenDir", 1, 3, swig_obj)) SWIG_fail;
   11528          35 :   {
   11529             :     /* %typemap(in) (const char *utf8_path) */
   11530          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11531             :     {
   11532          35 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11533             :     }
   11534             :     else
   11535             :     {
   11536           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11537             :       
   11538             :     }
   11539          35 :     if (arg1 == NULL)
   11540             :     {
   11541           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11542           0 :       SWIG_fail;
   11543             :     }
   11544             :   }
   11545          35 :   if (swig_obj[1]) {
   11546          22 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11547          22 :     if (!SWIG_IsOK(ecode2)) {
   11548           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenDir" "', argument " "2"" of type '" "int""'");
   11549             :     } 
   11550             :     arg2 = static_cast< int >(val2);
   11551             :   }
   11552          35 :   if (swig_obj[2]) {
   11553          18 :     {
   11554             :       /* %typemap(in) char **dict */
   11555          18 :       arg3 = NULL;
   11556          18 :       if ( PySequence_Check( swig_obj[2] ) ) {
   11557          18 :         int bErr = FALSE;
   11558          18 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   11559          18 :         if ( bErr )
   11560             :         {
   11561           0 :           SWIG_fail;
   11562             :         }
   11563             :       }
   11564           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   11565           0 :         int bErr = FALSE;
   11566           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   11567           0 :         if ( bErr )
   11568             :         {
   11569           0 :           SWIG_fail;
   11570             :         }
   11571             :       }
   11572             :       else {
   11573           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   11574           0 :         SWIG_fail;
   11575             :       }
   11576             :     }
   11577             :   }
   11578          35 :   {
   11579          35 :     if (!arg1) {
   11580          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11581             :     }
   11582             :   }
   11583          35 :   {
   11584          35 :     const int bLocalUseExceptions = GetUseExceptions();
   11585          35 :     if ( bLocalUseExceptions ) {
   11586           0 :       pushErrorHandler();
   11587             :     }
   11588          35 :     {
   11589          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11590          35 :       result = (VSIDIR *)wrapper_VSIOpenDir((char const *)arg1,arg2,arg3);
   11591          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11592             :     }
   11593          35 :     if ( bLocalUseExceptions ) {
   11594           0 :       popErrorHandler();
   11595             :     }
   11596             : #ifndef SED_HACKS
   11597             :     if ( bLocalUseExceptions ) {
   11598             :       CPLErr eclass = CPLGetLastErrorType();
   11599             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11600             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11601             :       }
   11602             :     }
   11603             : #endif
   11604             :   }
   11605          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSIDIR, 0 |  0 );
   11606          35 :   {
   11607             :     /* %typemap(freearg) (const char *utf8_path) */
   11608          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   11609             :   }
   11610          35 :   {
   11611             :     /* %typemap(freearg) char **dict */
   11612          35 :     CSLDestroy( arg3 );
   11613             :   }
   11614          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; } }
   11615             :   return resultobj;
   11616           0 : fail:
   11617           0 :   {
   11618             :     /* %typemap(freearg) (const char *utf8_path) */
   11619           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11620             :   }
   11621           0 :   {
   11622             :     /* %typemap(freearg) char **dict */
   11623           0 :     CSLDestroy( arg3 );
   11624             :   }
   11625             :   return NULL;
   11626             : }
   11627             : 
   11628             : 
   11629          81 : SWIGINTERN PyObject *_wrap_DirEntry_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11630          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11631          81 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11632          81 :   void *argp1 = 0 ;
   11633          81 :   int res1 = 0 ;
   11634          81 :   PyObject *swig_obj[1] ;
   11635          81 :   char *result = 0 ;
   11636             :   
   11637          81 :   if (!args) SWIG_fail;
   11638          81 :   swig_obj[0] = args;
   11639          81 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11640          81 :   if (!SWIG_IsOK(res1)) {
   11641           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_name_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11642             :   }
   11643          81 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11644          81 :   {
   11645          81 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11646          81 :     result = (char *) ((arg1)->name);
   11647          81 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11648             :   }
   11649          81 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11650          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; } }
   11651             :   return resultobj;
   11652             : fail:
   11653             :   return NULL;
   11654             : }
   11655             : 
   11656             : 
   11657          42 : SWIGINTERN PyObject *_wrap_DirEntry_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11658          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11659          42 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11660          42 :   void *argp1 = 0 ;
   11661          42 :   int res1 = 0 ;
   11662          42 :   PyObject *swig_obj[1] ;
   11663          42 :   int result;
   11664             :   
   11665          42 :   if (!args) SWIG_fail;
   11666          42 :   swig_obj[0] = args;
   11667          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11668          42 :   if (!SWIG_IsOK(res1)) {
   11669           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mode_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11670             :   }
   11671          42 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11672          42 :   {
   11673          42 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11674          42 :     result = (int) ((arg1)->mode);
   11675          42 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11676             :   }
   11677          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11678          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; } }
   11679             :   return resultobj;
   11680             : fail:
   11681             :   return NULL;
   11682             : }
   11683             : 
   11684             : 
   11685          15 : SWIGINTERN PyObject *_wrap_DirEntry_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11686          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11687          15 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11688          15 :   void *argp1 = 0 ;
   11689          15 :   int res1 = 0 ;
   11690          15 :   PyObject *swig_obj[1] ;
   11691          15 :   GIntBig result;
   11692             :   
   11693          15 :   if (!args) SWIG_fail;
   11694          15 :   swig_obj[0] = args;
   11695          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11696          15 :   if (!SWIG_IsOK(res1)) {
   11697           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_size_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11698             :   }
   11699          15 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11700          15 :   {
   11701          15 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11702          15 :     result =  ((arg1)->size);
   11703          15 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11704             :   }
   11705          15 :   {
   11706          15 :     resultobj = PyLong_FromLongLong(result);
   11707             :   }
   11708          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; } }
   11709             :   return resultobj;
   11710             : fail:
   11711             :   return NULL;
   11712             : }
   11713             : 
   11714             : 
   11715          12 : SWIGINTERN PyObject *_wrap_DirEntry_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11716          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11717          12 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11718          12 :   void *argp1 = 0 ;
   11719          12 :   int res1 = 0 ;
   11720          12 :   PyObject *swig_obj[1] ;
   11721          12 :   GIntBig result;
   11722             :   
   11723          12 :   if (!args) SWIG_fail;
   11724          12 :   swig_obj[0] = args;
   11725          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11726          12 :   if (!SWIG_IsOK(res1)) {
   11727           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtime_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11728             :   }
   11729          12 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11730          12 :   {
   11731          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11732          12 :     result =  ((arg1)->mtime);
   11733          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11734             :   }
   11735          12 :   {
   11736          12 :     resultobj = PyLong_FromLongLong(result);
   11737             :   }
   11738          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; } }
   11739             :   return resultobj;
   11740             : fail:
   11741             :   return NULL;
   11742             : }
   11743             : 
   11744             : 
   11745           2 : SWIGINTERN PyObject *_wrap_DirEntry_modeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11746           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11747           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11748           2 :   void *argp1 = 0 ;
   11749           2 :   int res1 = 0 ;
   11750           2 :   PyObject *swig_obj[1] ;
   11751           2 :   bool result;
   11752             :   
   11753           2 :   if (!args) SWIG_fail;
   11754           2 :   swig_obj[0] = args;
   11755           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11756           2 :   if (!SWIG_IsOK(res1)) {
   11757           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_modeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11758             :   }
   11759           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11760           2 :   {
   11761           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11762           2 :     result = (bool) ((arg1)->modeKnown);
   11763           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11764             :   }
   11765           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11766           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; } }
   11767             :   return resultobj;
   11768             : fail:
   11769             :   return NULL;
   11770             : }
   11771             : 
   11772             : 
   11773           2 : SWIGINTERN PyObject *_wrap_DirEntry_sizeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11774           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11775           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11776           2 :   void *argp1 = 0 ;
   11777           2 :   int res1 = 0 ;
   11778           2 :   PyObject *swig_obj[1] ;
   11779           2 :   bool result;
   11780             :   
   11781           2 :   if (!args) SWIG_fail;
   11782           2 :   swig_obj[0] = args;
   11783           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11784           2 :   if (!SWIG_IsOK(res1)) {
   11785           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_sizeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11786             :   }
   11787           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11788           2 :   {
   11789           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11790           2 :     result = (bool) ((arg1)->sizeKnown);
   11791           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11792             :   }
   11793           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11794           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; } }
   11795             :   return resultobj;
   11796             : fail:
   11797             :   return NULL;
   11798             : }
   11799             : 
   11800             : 
   11801           2 : SWIGINTERN PyObject *_wrap_DirEntry_mtimeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11802           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11803           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11804           2 :   void *argp1 = 0 ;
   11805           2 :   int res1 = 0 ;
   11806           2 :   PyObject *swig_obj[1] ;
   11807           2 :   bool result;
   11808             :   
   11809           2 :   if (!args) SWIG_fail;
   11810           2 :   swig_obj[0] = args;
   11811           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11812           2 :   if (!SWIG_IsOK(res1)) {
   11813           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtimeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11814             :   }
   11815           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11816           2 :   {
   11817           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11818           2 :     result = (bool) ((arg1)->mtimeKnown);
   11819           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11820             :   }
   11821           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11822           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; } }
   11823             :   return resultobj;
   11824             : fail:
   11825             :   return NULL;
   11826             : }
   11827             : 
   11828             : 
   11829           2 : SWIGINTERN PyObject *_wrap_DirEntry_extra_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11830           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11831           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11832           2 :   void *argp1 = 0 ;
   11833           2 :   int res1 = 0 ;
   11834           2 :   PyObject *swig_obj[1] ;
   11835           2 :   char **result = 0 ;
   11836             :   
   11837           2 :   if (!args) SWIG_fail;
   11838           2 :   swig_obj[0] = args;
   11839           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11840           2 :   if (!SWIG_IsOK(res1)) {
   11841           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_extra_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11842             :   }
   11843           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11844           2 :   {
   11845           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11846           2 :     result = (char **) ((arg1)->extra);
   11847           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11848             :   }
   11849           2 :   {
   11850             :     /* %typemap(out) char **dict */
   11851           2 :     resultobj = GetCSLStringAsPyDict(result, false);
   11852             :   }
   11853           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; } }
   11854             :   return resultobj;
   11855             : fail:
   11856             :   return NULL;
   11857             : }
   11858             : 
   11859             : 
   11860           0 : SWIGINTERN PyObject *_wrap_new_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11861           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11862           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11863           0 :   void *argp1 = 0 ;
   11864           0 :   int res1 = 0 ;
   11865           0 :   PyObject *swig_obj[1] ;
   11866           0 :   DirEntry *result = 0 ;
   11867             :   
   11868           0 :   if (!args) SWIG_fail;
   11869           0 :   swig_obj[0] = args;
   11870           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11871           0 :   if (!SWIG_IsOK(res1)) {
   11872           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirEntry" "', argument " "1"" of type '" "DirEntry const *""'"); 
   11873             :   }
   11874           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11875           0 :   {
   11876           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11877           0 :     if ( bLocalUseExceptions ) {
   11878           0 :       pushErrorHandler();
   11879             :     }
   11880           0 :     {
   11881           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11882           0 :       result = (DirEntry *)new_DirEntry((DirEntry const *)arg1);
   11883           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11884             :     }
   11885           0 :     if ( bLocalUseExceptions ) {
   11886           0 :       popErrorHandler();
   11887             :     }
   11888             : #ifndef SED_HACKS
   11889             :     if ( bLocalUseExceptions ) {
   11890             :       CPLErr eclass = CPLGetLastErrorType();
   11891             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11892             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11893             :       }
   11894             :     }
   11895             : #endif
   11896             :   }
   11897           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_NEW |  0 );
   11898           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; } }
   11899             :   return resultobj;
   11900             : fail:
   11901             :   return NULL;
   11902             : }
   11903             : 
   11904             : 
   11905          79 : SWIGINTERN PyObject *_wrap_delete_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11906          79 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11907          79 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11908          79 :   void *argp1 = 0 ;
   11909          79 :   int res1 = 0 ;
   11910          79 :   PyObject *swig_obj[1] ;
   11911             :   
   11912          79 :   if (!args) SWIG_fail;
   11913          79 :   swig_obj[0] = args;
   11914          79 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, SWIG_POINTER_DISOWN |  0 );
   11915          79 :   if (!SWIG_IsOK(res1)) {
   11916           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirEntry" "', argument " "1"" of type '" "DirEntry *""'"); 
   11917             :   }
   11918          79 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11919          79 :   {
   11920          79 :     const int bLocalUseExceptions = GetUseExceptions();
   11921          79 :     if ( bLocalUseExceptions ) {
   11922           0 :       pushErrorHandler();
   11923             :     }
   11924          79 :     {
   11925          79 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11926          79 :       delete_DirEntry(arg1);
   11927          79 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11928             :     }
   11929          79 :     if ( bLocalUseExceptions ) {
   11930           0 :       popErrorHandler();
   11931             :     }
   11932             : #ifndef SED_HACKS
   11933             :     if ( bLocalUseExceptions ) {
   11934             :       CPLErr eclass = CPLGetLastErrorType();
   11935             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11936             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11937             :       }
   11938             :     }
   11939             : #endif
   11940             :   }
   11941          79 :   resultobj = SWIG_Py_Void();
   11942          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; } }
   11943             :   return resultobj;
   11944             : fail:
   11945             :   return NULL;
   11946             : }
   11947             : 
   11948             : 
   11949           0 : SWIGINTERN PyObject *_wrap_DirEntry_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11950           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11951           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11952           0 :   void *argp1 = 0 ;
   11953           0 :   int res1 = 0 ;
   11954           0 :   PyObject *swig_obj[1] ;
   11955           0 :   bool result;
   11956             :   
   11957           0 :   if (!args) SWIG_fail;
   11958           0 :   swig_obj[0] = args;
   11959           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11960           0 :   if (!SWIG_IsOK(res1)) {
   11961           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_IsDirectory" "', argument " "1"" of type '" "DirEntry *""'"); 
   11962             :   }
   11963           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11964           0 :   {
   11965           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11966           0 :     if ( bLocalUseExceptions ) {
   11967           0 :       pushErrorHandler();
   11968             :     }
   11969           0 :     {
   11970           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11971           0 :       result = (bool)DirEntry_IsDirectory(arg1);
   11972           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11973             :     }
   11974           0 :     if ( bLocalUseExceptions ) {
   11975           0 :       popErrorHandler();
   11976             :     }
   11977             : #ifndef SED_HACKS
   11978             :     if ( bLocalUseExceptions ) {
   11979             :       CPLErr eclass = CPLGetLastErrorType();
   11980             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11981             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11982             :       }
   11983             :     }
   11984             : #endif
   11985             :   }
   11986           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11987           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; } }
   11988             :   return resultobj;
   11989             : fail:
   11990             :   return NULL;
   11991             : }
   11992             : 
   11993             : 
   11994         277 : SWIGINTERN PyObject *DirEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11995         277 :   PyObject *obj;
   11996         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   11997         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_DirEntry, SWIG_NewClientData(obj));
   11998         277 :   return SWIG_Py_Void();
   11999             : }
   12000             : 
   12001           0 : SWIGINTERN PyObject *DirEntry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12002           0 :   return SWIG_Python_InitShadowInstance(args);
   12003             : }
   12004             : 
   12005         112 : SWIGINTERN PyObject *_wrap_GetNextDirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12006         112 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12007         112 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   12008         112 :   void *argp1 = 0 ;
   12009         112 :   int res1 = 0 ;
   12010         112 :   PyObject *swig_obj[1] ;
   12011         112 :   DirEntry *result = 0 ;
   12012             :   
   12013         112 :   if (!args) SWIG_fail;
   12014         112 :   swig_obj[0] = args;
   12015         112 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   12016         112 :   if (!SWIG_IsOK(res1)) {
   12017           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetNextDirEntry" "', argument " "1"" of type '" "VSIDIR *""'"); 
   12018             :   }
   12019         112 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   12020         112 :   {
   12021         112 :     if (!arg1) {
   12022           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12023             :     }
   12024             :   }
   12025         112 :   {
   12026         112 :     const int bLocalUseExceptions = GetUseExceptions();
   12027         112 :     if ( bLocalUseExceptions ) {
   12028           0 :       pushErrorHandler();
   12029             :     }
   12030         112 :     {
   12031         112 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12032         112 :       result = (DirEntry *)wrapper_VSIGetNextDirEntry(arg1);
   12033         112 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12034             :     }
   12035         112 :     if ( bLocalUseExceptions ) {
   12036           0 :       popErrorHandler();
   12037             :     }
   12038             : #ifndef SED_HACKS
   12039             :     if ( bLocalUseExceptions ) {
   12040             :       CPLErr eclass = CPLGetLastErrorType();
   12041             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12042             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12043             :       }
   12044             :     }
   12045             : #endif
   12046             :   }
   12047         112 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_OWN |  0 );
   12048         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; } }
   12049             :   return resultobj;
   12050             : fail:
   12051             :   return NULL;
   12052             : }
   12053             : 
   12054             : 
   12055          33 : SWIGINTERN PyObject *_wrap_CloseDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12056          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12057          33 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   12058          33 :   void *argp1 = 0 ;
   12059          33 :   int res1 = 0 ;
   12060          33 :   PyObject *swig_obj[1] ;
   12061             :   
   12062          33 :   if (!args) SWIG_fail;
   12063          33 :   swig_obj[0] = args;
   12064          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   12065          33 :   if (!SWIG_IsOK(res1)) {
   12066           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CloseDir" "', argument " "1"" of type '" "VSIDIR *""'"); 
   12067             :   }
   12068          33 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   12069          33 :   {
   12070          33 :     if (!arg1) {
   12071           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12072             :     }
   12073             :   }
   12074          33 :   {
   12075          33 :     const int bLocalUseExceptions = GetUseExceptions();
   12076          33 :     if ( bLocalUseExceptions ) {
   12077           0 :       pushErrorHandler();
   12078             :     }
   12079          33 :     {
   12080          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12081          33 :       VSICloseDir(arg1);
   12082          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12083             :     }
   12084          33 :     if ( bLocalUseExceptions ) {
   12085           0 :       popErrorHandler();
   12086             :     }
   12087             : #ifndef SED_HACKS
   12088             :     if ( bLocalUseExceptions ) {
   12089             :       CPLErr eclass = CPLGetLastErrorType();
   12090             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12091             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12092             :       }
   12093             :     }
   12094             : #endif
   12095             :   }
   12096          33 :   resultobj = SWIG_Py_Void();
   12097          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; } }
   12098             :   return resultobj;
   12099             : fail:
   12100             :   return NULL;
   12101             : }
   12102             : 
   12103             : 
   12104        4211 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12105        4211 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12106        4211 :   char *arg1 = (char *) 0 ;
   12107        4211 :   char *arg2 = (char *) 0 ;
   12108        4211 :   int res1 ;
   12109        4211 :   char *buf1 = 0 ;
   12110        4211 :   int alloc1 = 0 ;
   12111        4211 :   int res2 ;
   12112        4211 :   char *buf2 = 0 ;
   12113        4211 :   int alloc2 = 0 ;
   12114        4211 :   PyObject *swig_obj[2] ;
   12115             :   
   12116        4211 :   if (!SWIG_Python_UnpackTuple(args, "SetConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12117        4211 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12118        4211 :   if (!SWIG_IsOK(res1)) {
   12119           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12120             :   }
   12121        4211 :   arg1 = reinterpret_cast< char * >(buf1);
   12122        4211 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12123        4211 :   if (!SWIG_IsOK(res2)) {
   12124           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12125             :   }
   12126        4211 :   arg2 = reinterpret_cast< char * >(buf2);
   12127        4211 :   {
   12128        4211 :     if (!arg1) {
   12129           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12130             :     }
   12131             :   }
   12132        4211 :   {
   12133        4211 :     const int bLocalUseExceptions = GetUseExceptions();
   12134        4211 :     if ( bLocalUseExceptions ) {
   12135         227 :       pushErrorHandler();
   12136             :     }
   12137        4211 :     {
   12138        4211 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12139        4211 :       CPLSetConfigOption((char const *)arg1,(char const *)arg2);
   12140        4211 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12141             :     }
   12142        4211 :     if ( bLocalUseExceptions ) {
   12143         227 :       popErrorHandler();
   12144             :     }
   12145             : #ifndef SED_HACKS
   12146             :     if ( bLocalUseExceptions ) {
   12147             :       CPLErr eclass = CPLGetLastErrorType();
   12148             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12149             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12150             :       }
   12151             :     }
   12152             : #endif
   12153             :   }
   12154        4211 :   resultobj = SWIG_Py_Void();
   12155        4211 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12156        4211 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12157        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; } }
   12158             :   return resultobj;
   12159           0 : fail:
   12160           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12161           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12162             :   return NULL;
   12163             : }
   12164             : 
   12165             : 
   12166        6124 : SWIGINTERN PyObject *_wrap_SetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12167        6124 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12168        6124 :   char *arg1 = (char *) 0 ;
   12169        6124 :   char *arg2 = (char *) 0 ;
   12170        6124 :   int res1 ;
   12171        6124 :   char *buf1 = 0 ;
   12172        6124 :   int alloc1 = 0 ;
   12173        6124 :   int res2 ;
   12174        6124 :   char *buf2 = 0 ;
   12175        6124 :   int alloc2 = 0 ;
   12176        6124 :   PyObject *swig_obj[2] ;
   12177             :   
   12178        6124 :   if (!SWIG_Python_UnpackTuple(args, "SetThreadLocalConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12179        6124 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12180        6124 :   if (!SWIG_IsOK(res1)) {
   12181           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12182             :   }
   12183        6124 :   arg1 = reinterpret_cast< char * >(buf1);
   12184        6124 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12185        6124 :   if (!SWIG_IsOK(res2)) {
   12186           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12187             :   }
   12188        6124 :   arg2 = reinterpret_cast< char * >(buf2);
   12189        6124 :   {
   12190        6124 :     if (!arg1) {
   12191           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12192             :     }
   12193             :   }
   12194        6124 :   {
   12195        6124 :     const int bLocalUseExceptions = GetUseExceptions();
   12196        6124 :     if ( bLocalUseExceptions ) {
   12197        3084 :       pushErrorHandler();
   12198             :     }
   12199        6124 :     {
   12200        6124 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12201        6124 :       CPLSetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12202        6124 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12203             :     }
   12204        6124 :     if ( bLocalUseExceptions ) {
   12205        3084 :       popErrorHandler();
   12206             :     }
   12207             : #ifndef SED_HACKS
   12208             :     if ( bLocalUseExceptions ) {
   12209             :       CPLErr eclass = CPLGetLastErrorType();
   12210             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12211             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12212             :       }
   12213             :     }
   12214             : #endif
   12215             :   }
   12216        6124 :   resultobj = SWIG_Py_Void();
   12217        6124 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12218        6124 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12219        6124 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12220             :   return resultobj;
   12221           0 : fail:
   12222           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12223           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12224             :   return NULL;
   12225             : }
   12226             : 
   12227             : 
   12228       22447 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12229       22447 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12230       22447 :   char *arg1 = (char *) 0 ;
   12231       22447 :   char *arg2 = (char *) NULL ;
   12232       22447 :   int res1 ;
   12233       22447 :   char *buf1 = 0 ;
   12234       22447 :   int alloc1 = 0 ;
   12235       22447 :   int res2 ;
   12236       22447 :   char *buf2 = 0 ;
   12237       22447 :   int alloc2 = 0 ;
   12238       22447 :   PyObject *swig_obj[2] ;
   12239       22447 :   char *result = 0 ;
   12240             :   
   12241       22447 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12242       22447 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12243       22447 :   if (!SWIG_IsOK(res1)) {
   12244           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12245             :   }
   12246       22447 :   arg1 = reinterpret_cast< char * >(buf1);
   12247       22447 :   if (swig_obj[1]) {
   12248        1019 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12249        1019 :     if (!SWIG_IsOK(res2)) {
   12250           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12251             :     }
   12252        1019 :     arg2 = reinterpret_cast< char * >(buf2);
   12253             :   }
   12254       22447 :   {
   12255       22447 :     if (!arg1) {
   12256           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12257             :     }
   12258             :   }
   12259       22447 :   {
   12260       22447 :     const int bLocalUseExceptions = GetUseExceptions();
   12261       22447 :     if ( bLocalUseExceptions ) {
   12262       21938 :       pushErrorHandler();
   12263             :     }
   12264       22447 :     {
   12265       22447 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12266       22447 :       result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
   12267       22447 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12268             :     }
   12269       22447 :     if ( bLocalUseExceptions ) {
   12270       21938 :       popErrorHandler();
   12271             :     }
   12272             : #ifndef SED_HACKS
   12273             :     if ( bLocalUseExceptions ) {
   12274             :       CPLErr eclass = CPLGetLastErrorType();
   12275             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12276             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12277             :       }
   12278             :     }
   12279             : #endif
   12280             :   }
   12281       22447 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12282       22447 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12283       22447 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12284       22447 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12285             :   return resultobj;
   12286           0 : fail:
   12287           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12288           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12289             :   return NULL;
   12290             : }
   12291             : 
   12292             : 
   12293        1923 : SWIGINTERN PyObject *_wrap_GetGlobalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12294        1923 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12295        1923 :   char *arg1 = (char *) 0 ;
   12296        1923 :   char *arg2 = (char *) NULL ;
   12297        1923 :   int res1 ;
   12298        1923 :   char *buf1 = 0 ;
   12299        1923 :   int alloc1 = 0 ;
   12300        1923 :   int res2 ;
   12301        1923 :   char *buf2 = 0 ;
   12302        1923 :   int alloc2 = 0 ;
   12303        1923 :   PyObject *swig_obj[2] ;
   12304        1923 :   char *result = 0 ;
   12305             :   
   12306        1923 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12307        1923 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12308        1923 :   if (!SWIG_IsOK(res1)) {
   12309           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetGlobalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12310             :   }
   12311        1923 :   arg1 = reinterpret_cast< char * >(buf1);
   12312        1923 :   if (swig_obj[1]) {
   12313           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12314           0 :     if (!SWIG_IsOK(res2)) {
   12315           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetGlobalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12316             :     }
   12317           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12318             :   }
   12319        1923 :   {
   12320        1923 :     if (!arg1) {
   12321           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12322             :     }
   12323             :   }
   12324        1923 :   {
   12325        1923 :     const int bLocalUseExceptions = GetUseExceptions();
   12326        1923 :     if ( bLocalUseExceptions ) {
   12327          68 :       pushErrorHandler();
   12328             :     }
   12329        1923 :     {
   12330        1923 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12331        1923 :       result = (char *)wrapper_CPLGetGlobalConfigOption((char const *)arg1,(char const *)arg2);
   12332        1923 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12333             :     }
   12334        1923 :     if ( bLocalUseExceptions ) {
   12335          68 :       popErrorHandler();
   12336             :     }
   12337             : #ifndef SED_HACKS
   12338             :     if ( bLocalUseExceptions ) {
   12339             :       CPLErr eclass = CPLGetLastErrorType();
   12340             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12341             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12342             :       }
   12343             :     }
   12344             : #endif
   12345             :   }
   12346        1923 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12347        1923 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12348        1923 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12349        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; } }
   12350             :   return resultobj;
   12351           0 : fail:
   12352           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12353           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12354             :   return NULL;
   12355             : }
   12356             : 
   12357             : 
   12358        3067 : SWIGINTERN PyObject *_wrap_GetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12359        3067 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12360        3067 :   char *arg1 = (char *) 0 ;
   12361        3067 :   char *arg2 = (char *) NULL ;
   12362        3067 :   int res1 ;
   12363        3067 :   char *buf1 = 0 ;
   12364        3067 :   int alloc1 = 0 ;
   12365        3067 :   int res2 ;
   12366        3067 :   char *buf2 = 0 ;
   12367        3067 :   int alloc2 = 0 ;
   12368        3067 :   PyObject *swig_obj[2] ;
   12369        3067 :   char *result = 0 ;
   12370             :   
   12371        3067 :   if (!SWIG_Python_UnpackTuple(args, "GetThreadLocalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12372        3067 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12373        3067 :   if (!SWIG_IsOK(res1)) {
   12374           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12375             :   }
   12376        3067 :   arg1 = reinterpret_cast< char * >(buf1);
   12377        3067 :   if (swig_obj[1]) {
   12378           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12379           0 :     if (!SWIG_IsOK(res2)) {
   12380           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12381             :     }
   12382           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12383             :   }
   12384        3067 :   {
   12385        3067 :     if (!arg1) {
   12386           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12387             :     }
   12388             :   }
   12389        3067 :   {
   12390        3067 :     const int bLocalUseExceptions = GetUseExceptions();
   12391        3067 :     if ( bLocalUseExceptions ) {
   12392        1542 :       pushErrorHandler();
   12393             :     }
   12394        3067 :     {
   12395        3067 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12396        3067 :       result = (char *)wrapper_CPLGetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12397        3067 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12398             :     }
   12399        3067 :     if ( bLocalUseExceptions ) {
   12400        1542 :       popErrorHandler();
   12401             :     }
   12402             : #ifndef SED_HACKS
   12403             :     if ( bLocalUseExceptions ) {
   12404             :       CPLErr eclass = CPLGetLastErrorType();
   12405             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12406             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12407             :       }
   12408             :     }
   12409             : #endif
   12410             :   }
   12411        3067 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12412        3067 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12413        3067 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12414        3067 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12415             :   return resultobj;
   12416           0 : fail:
   12417           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12418           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12419             :   return NULL;
   12420             : }
   12421             : 
   12422             : 
   12423           6 : SWIGINTERN PyObject *_wrap_GetConfigOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12424           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12425           6 :   char **result = 0 ;
   12426             :   
   12427           6 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOptions", 0, 0, 0)) SWIG_fail;
   12428           6 :   {
   12429           6 :     const int bLocalUseExceptions = GetUseExceptions();
   12430           6 :     if ( bLocalUseExceptions ) {
   12431           0 :       pushErrorHandler();
   12432             :     }
   12433           6 :     {
   12434           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12435           6 :       result = (char **)wrapper_GetConfigOptions();
   12436           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12437             :     }
   12438           6 :     if ( bLocalUseExceptions ) {
   12439           0 :       popErrorHandler();
   12440             :     }
   12441             : #ifndef SED_HACKS
   12442             :     if ( bLocalUseExceptions ) {
   12443             :       CPLErr eclass = CPLGetLastErrorType();
   12444             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12445             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12446             :       }
   12447             :     }
   12448             : #endif
   12449             :   }
   12450           6 :   {
   12451             :     /* %typemap(out) char **dict */
   12452           6 :     resultobj = GetCSLStringAsPyDict(result, true);
   12453             :   }
   12454           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; } }
   12455             :   return resultobj;
   12456           0 : fail:
   12457           0 :   return NULL;
   12458             : }
   12459             : 
   12460             : 
   12461          31 : SWIGINTERN PyObject *_wrap_SetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12462          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12463          31 :   char *arg1 = (char *) 0 ;
   12464          31 :   char *arg2 = (char *) 0 ;
   12465          31 :   char *arg3 = (char *) 0 ;
   12466          31 :   int res1 ;
   12467          31 :   char *buf1 = 0 ;
   12468          31 :   int alloc1 = 0 ;
   12469          31 :   int res2 ;
   12470          31 :   char *buf2 = 0 ;
   12471          31 :   int alloc2 = 0 ;
   12472          31 :   int res3 ;
   12473          31 :   char *buf3 = 0 ;
   12474          31 :   int alloc3 = 0 ;
   12475          31 :   PyObject *swig_obj[3] ;
   12476             :   
   12477          31 :   if (!SWIG_Python_UnpackTuple(args, "SetPathSpecificOption", 3, 3, swig_obj)) SWIG_fail;
   12478          31 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12479          31 :   if (!SWIG_IsOK(res1)) {
   12480           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12481             :   }
   12482          31 :   arg1 = reinterpret_cast< char * >(buf1);
   12483          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12484          31 :   if (!SWIG_IsOK(res2)) {
   12485           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12486             :   }
   12487          31 :   arg2 = reinterpret_cast< char * >(buf2);
   12488          31 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12489          31 :   if (!SWIG_IsOK(res3)) {
   12490           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12491             :   }
   12492          31 :   arg3 = reinterpret_cast< char * >(buf3);
   12493          31 :   {
   12494          31 :     if (!arg1) {
   12495           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12496             :     }
   12497             :   }
   12498          30 :   {
   12499          30 :     if (!arg2) {
   12500           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12501             :     }
   12502             :   }
   12503          29 :   {
   12504          29 :     const int bLocalUseExceptions = GetUseExceptions();
   12505          29 :     if ( bLocalUseExceptions ) {
   12506          19 :       pushErrorHandler();
   12507             :     }
   12508          29 :     {
   12509          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12510          29 :       VSISetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12511          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12512             :     }
   12513          29 :     if ( bLocalUseExceptions ) {
   12514          19 :       popErrorHandler();
   12515             :     }
   12516             : #ifndef SED_HACKS
   12517             :     if ( bLocalUseExceptions ) {
   12518             :       CPLErr eclass = CPLGetLastErrorType();
   12519             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12520             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12521             :       }
   12522             :     }
   12523             : #endif
   12524             :   }
   12525          29 :   resultobj = SWIG_Py_Void();
   12526          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12527          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12528          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12529          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; } }
   12530             :   return resultobj;
   12531           2 : fail:
   12532           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12533           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12534           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12535             :   return NULL;
   12536             : }
   12537             : 
   12538             : 
   12539          56 : SWIGINTERN PyObject *_wrap_SetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12540          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12541          56 :   char *arg1 = (char *) 0 ;
   12542          56 :   char *arg2 = (char *) 0 ;
   12543          56 :   char *arg3 = (char *) 0 ;
   12544          56 :   int res1 ;
   12545          56 :   char *buf1 = 0 ;
   12546          56 :   int alloc1 = 0 ;
   12547          56 :   int res2 ;
   12548          56 :   char *buf2 = 0 ;
   12549          56 :   int alloc2 = 0 ;
   12550          56 :   int res3 ;
   12551          56 :   char *buf3 = 0 ;
   12552          56 :   int alloc3 = 0 ;
   12553          56 :   PyObject *swig_obj[3] ;
   12554             :   
   12555          56 :   if (!SWIG_Python_UnpackTuple(args, "SetCredential", 3, 3, swig_obj)) SWIG_fail;
   12556          56 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12557          56 :   if (!SWIG_IsOK(res1)) {
   12558           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetCredential" "', argument " "1"" of type '" "char const *""'");
   12559             :   }
   12560          56 :   arg1 = reinterpret_cast< char * >(buf1);
   12561          56 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12562          56 :   if (!SWIG_IsOK(res2)) {
   12563           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetCredential" "', argument " "2"" of type '" "char const *""'");
   12564             :   }
   12565          56 :   arg2 = reinterpret_cast< char * >(buf2);
   12566          56 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12567          56 :   if (!SWIG_IsOK(res3)) {
   12568           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetCredential" "', argument " "3"" of type '" "char const *""'");
   12569             :   }
   12570          56 :   arg3 = reinterpret_cast< char * >(buf3);
   12571          56 :   {
   12572          56 :     if (!arg1) {
   12573           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12574             :     }
   12575             :   }
   12576          56 :   {
   12577          56 :     if (!arg2) {
   12578           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12579             :     }
   12580             :   }
   12581          56 :   {
   12582          56 :     const int bLocalUseExceptions = GetUseExceptions();
   12583          56 :     if ( bLocalUseExceptions ) {
   12584           0 :       pushErrorHandler();
   12585             :     }
   12586          56 :     {
   12587          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12588          56 :       wrapper_VSISetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12589          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12590             :     }
   12591          56 :     if ( bLocalUseExceptions ) {
   12592           0 :       popErrorHandler();
   12593             :     }
   12594             : #ifndef SED_HACKS
   12595             :     if ( bLocalUseExceptions ) {
   12596             :       CPLErr eclass = CPLGetLastErrorType();
   12597             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12598             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12599             :       }
   12600             :     }
   12601             : #endif
   12602             :   }
   12603          56 :   resultobj = SWIG_Py_Void();
   12604          56 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12605          56 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12606          56 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12607          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; } }
   12608             :   return resultobj;
   12609           0 : fail:
   12610           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12611           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12612           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12613             :   return NULL;
   12614             : }
   12615             : 
   12616             : 
   12617           0 : SWIGINTERN PyObject *_wrap_GetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12618           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12619           0 :   char *arg1 = (char *) 0 ;
   12620           0 :   char *arg2 = (char *) 0 ;
   12621           0 :   char *arg3 = (char *) NULL ;
   12622           0 :   int res1 ;
   12623           0 :   char *buf1 = 0 ;
   12624           0 :   int alloc1 = 0 ;
   12625           0 :   int res2 ;
   12626           0 :   char *buf2 = 0 ;
   12627           0 :   int alloc2 = 0 ;
   12628           0 :   int res3 ;
   12629           0 :   char *buf3 = 0 ;
   12630           0 :   int alloc3 = 0 ;
   12631           0 :   PyObject *swig_obj[3] ;
   12632           0 :   char *result = 0 ;
   12633             :   
   12634           0 :   if (!SWIG_Python_UnpackTuple(args, "GetCredential", 2, 3, swig_obj)) SWIG_fail;
   12635           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12636           0 :   if (!SWIG_IsOK(res1)) {
   12637           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCredential" "', argument " "1"" of type '" "char const *""'");
   12638             :   }
   12639           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12640           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12641           0 :   if (!SWIG_IsOK(res2)) {
   12642           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCredential" "', argument " "2"" of type '" "char const *""'");
   12643             :   }
   12644           0 :   arg2 = reinterpret_cast< char * >(buf2);
   12645           0 :   if (swig_obj[2]) {
   12646           0 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12647           0 :     if (!SWIG_IsOK(res3)) {
   12648           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetCredential" "', argument " "3"" of type '" "char const *""'");
   12649             :     }
   12650           0 :     arg3 = reinterpret_cast< char * >(buf3);
   12651             :   }
   12652           0 :   {
   12653           0 :     if (!arg1) {
   12654           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12655             :     }
   12656             :   }
   12657           0 :   {
   12658           0 :     if (!arg2) {
   12659           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12660             :     }
   12661             :   }
   12662           0 :   {
   12663           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12664           0 :     if ( bLocalUseExceptions ) {
   12665           0 :       pushErrorHandler();
   12666             :     }
   12667           0 :     {
   12668           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12669           0 :       result = (char *)wrapper_VSIGetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12670           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12671             :     }
   12672           0 :     if ( bLocalUseExceptions ) {
   12673           0 :       popErrorHandler();
   12674             :     }
   12675             : #ifndef SED_HACKS
   12676             :     if ( bLocalUseExceptions ) {
   12677             :       CPLErr eclass = CPLGetLastErrorType();
   12678             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12679             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12680             :       }
   12681             :     }
   12682             : #endif
   12683             :   }
   12684           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12685           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12686           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12687           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12688           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; } }
   12689             :   return resultobj;
   12690           0 : fail:
   12691           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12692           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12693           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12694             :   return NULL;
   12695             : }
   12696             : 
   12697             : 
   12698          12 : SWIGINTERN PyObject *_wrap_GetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12699          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12700          12 :   char *arg1 = (char *) 0 ;
   12701          12 :   char *arg2 = (char *) 0 ;
   12702          12 :   char *arg3 = (char *) NULL ;
   12703          12 :   int res1 ;
   12704          12 :   char *buf1 = 0 ;
   12705          12 :   int alloc1 = 0 ;
   12706          12 :   int res2 ;
   12707          12 :   char *buf2 = 0 ;
   12708          12 :   int alloc2 = 0 ;
   12709          12 :   int res3 ;
   12710          12 :   char *buf3 = 0 ;
   12711          12 :   int alloc3 = 0 ;
   12712          12 :   PyObject *swig_obj[3] ;
   12713          12 :   char *result = 0 ;
   12714             :   
   12715          12 :   if (!SWIG_Python_UnpackTuple(args, "GetPathSpecificOption", 2, 3, swig_obj)) SWIG_fail;
   12716          12 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12717          12 :   if (!SWIG_IsOK(res1)) {
   12718           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12719             :   }
   12720          12 :   arg1 = reinterpret_cast< char * >(buf1);
   12721          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12722          12 :   if (!SWIG_IsOK(res2)) {
   12723           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12724             :   }
   12725          12 :   arg2 = reinterpret_cast< char * >(buf2);
   12726          12 :   if (swig_obj[2]) {
   12727           2 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12728           2 :     if (!SWIG_IsOK(res3)) {
   12729           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12730             :     }
   12731           2 :     arg3 = reinterpret_cast< char * >(buf3);
   12732             :   }
   12733          12 :   {
   12734          12 :     if (!arg1) {
   12735           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12736             :     }
   12737             :   }
   12738          11 :   {
   12739          11 :     if (!arg2) {
   12740           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12741             :     }
   12742             :   }
   12743          10 :   {
   12744          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12745          10 :     if ( bLocalUseExceptions ) {
   12746          10 :       pushErrorHandler();
   12747             :     }
   12748          10 :     {
   12749          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12750          10 :       result = (char *)wrapper_VSIGetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12751          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12752             :     }
   12753          10 :     if ( bLocalUseExceptions ) {
   12754          10 :       popErrorHandler();
   12755             :     }
   12756             : #ifndef SED_HACKS
   12757             :     if ( bLocalUseExceptions ) {
   12758             :       CPLErr eclass = CPLGetLastErrorType();
   12759             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12760             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12761             :       }
   12762             :     }
   12763             : #endif
   12764             :   }
   12765          10 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12766          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12767          10 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12768          10 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12769          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; } }
   12770             :   return resultobj;
   12771           2 : fail:
   12772           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12773           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12774           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12775             :   return NULL;
   12776             : }
   12777             : 
   12778             : 
   12779           8 : SWIGINTERN PyObject *_wrap_ClearCredentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12780           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12781           8 :   char *arg1 = (char *) NULL ;
   12782           8 :   int res1 ;
   12783           8 :   char *buf1 = 0 ;
   12784           8 :   int alloc1 = 0 ;
   12785           8 :   PyObject *swig_obj[1] ;
   12786             :   
   12787           8 :   if (!SWIG_Python_UnpackTuple(args, "ClearCredentials", 0, 1, swig_obj)) SWIG_fail;
   12788           8 :   if (swig_obj[0]) {
   12789           8 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12790           8 :     if (!SWIG_IsOK(res1)) {
   12791           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearCredentials" "', argument " "1"" of type '" "char const *""'");
   12792             :     }
   12793           8 :     arg1 = reinterpret_cast< char * >(buf1);
   12794             :   }
   12795           8 :   {
   12796           8 :     const int bLocalUseExceptions = GetUseExceptions();
   12797           8 :     if ( bLocalUseExceptions ) {
   12798           0 :       pushErrorHandler();
   12799             :     }
   12800           8 :     {
   12801           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12802           8 :       wrapper_VSIClearCredentials((char const *)arg1);
   12803           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12804             :     }
   12805           8 :     if ( bLocalUseExceptions ) {
   12806           0 :       popErrorHandler();
   12807             :     }
   12808             : #ifndef SED_HACKS
   12809             :     if ( bLocalUseExceptions ) {
   12810             :       CPLErr eclass = CPLGetLastErrorType();
   12811             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12812             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12813             :       }
   12814             :     }
   12815             : #endif
   12816             :   }
   12817           8 :   resultobj = SWIG_Py_Void();
   12818           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12819           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; } }
   12820             :   return resultobj;
   12821           0 : fail:
   12822           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12823             :   return NULL;
   12824             : }
   12825             : 
   12826             : 
   12827          10 : SWIGINTERN PyObject *_wrap_ClearPathSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12828          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12829          10 :   char *arg1 = (char *) NULL ;
   12830          10 :   int res1 ;
   12831          10 :   char *buf1 = 0 ;
   12832          10 :   int alloc1 = 0 ;
   12833          10 :   PyObject *swig_obj[1] ;
   12834             :   
   12835          10 :   if (!SWIG_Python_UnpackTuple(args, "ClearPathSpecificOptions", 0, 1, swig_obj)) SWIG_fail;
   12836          10 :   if (swig_obj[0]) {
   12837           7 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12838           7 :     if (!SWIG_IsOK(res1)) {
   12839           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearPathSpecificOptions" "', argument " "1"" of type '" "char const *""'");
   12840             :     }
   12841           7 :     arg1 = reinterpret_cast< char * >(buf1);
   12842             :   }
   12843          10 :   {
   12844          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12845          10 :     if ( bLocalUseExceptions ) {
   12846           5 :       pushErrorHandler();
   12847             :     }
   12848          10 :     {
   12849          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12850          10 :       wrapper_VSIClearPathSpecificOptions((char const *)arg1);
   12851          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12852             :     }
   12853          10 :     if ( bLocalUseExceptions ) {
   12854           5 :       popErrorHandler();
   12855             :     }
   12856             : #ifndef SED_HACKS
   12857             :     if ( bLocalUseExceptions ) {
   12858             :       CPLErr eclass = CPLGetLastErrorType();
   12859             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12860             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12861             :       }
   12862             :     }
   12863             : #endif
   12864             :   }
   12865          10 :   resultobj = SWIG_Py_Void();
   12866          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12867          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; } }
   12868             :   return resultobj;
   12869           0 : fail:
   12870           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12871             :   return NULL;
   12872             : }
   12873             : 
   12874             : 
   12875           0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12876           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12877           0 :   int arg1 ;
   12878           0 :   GByte *arg2 = (GByte *) 0 ;
   12879           0 :   int alloc1 = 0 ;
   12880           0 :   bool viewIsValid1 = false ;
   12881           0 :   Py_buffer view1 ;
   12882           0 :   PyObject *swig_obj[1] ;
   12883           0 :   retStringAndCPLFree *result = 0 ;
   12884             :   
   12885           0 :   if (!args) SWIG_fail;
   12886           0 :   swig_obj[0] = args;
   12887           0 :   {
   12888             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   12889           0 :     char* ptr = NULL;
   12890           0 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   12891           0 :       SWIG_fail;
   12892             :     }
   12893           0 :     arg2 = (GByte *)ptr;
   12894             :   }
   12895           0 :   {
   12896           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12897           0 :     if ( bLocalUseExceptions ) {
   12898           0 :       pushErrorHandler();
   12899             :     }
   12900           0 :     {
   12901           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12902           0 :       result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
   12903           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12904             :     }
   12905           0 :     if ( bLocalUseExceptions ) {
   12906           0 :       popErrorHandler();
   12907             :     }
   12908             : #ifndef SED_HACKS
   12909             :     if ( bLocalUseExceptions ) {
   12910             :       CPLErr eclass = CPLGetLastErrorType();
   12911             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12912             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12913             :       }
   12914             :     }
   12915             : #endif
   12916             :   }
   12917           0 :   {
   12918             :     /* %typemap(out) (retStringAndCPLFree*) */
   12919           0 :     Py_XDECREF(resultobj);
   12920           0 :     if(result)
   12921             :     {
   12922           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12923           0 :       CPLFree(result);
   12924             :     }
   12925             :     else
   12926             :     {
   12927           0 :       resultobj = Py_None;
   12928           0 :       Py_INCREF(resultobj);
   12929             :     }
   12930             :   }
   12931           0 :   {
   12932             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12933           0 :     if( viewIsValid1 ) {
   12934           0 :       PyBuffer_Release(&view1);
   12935             :     }
   12936           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12937           0 :       delete[] arg2;
   12938             :     }
   12939             :   }
   12940           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; } }
   12941             :   return resultobj;
   12942           0 : fail:
   12943           0 :   {
   12944             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12945           0 :     if( viewIsValid1 ) {
   12946           0 :       PyBuffer_Release(&view1);
   12947             :     }
   12948           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12949             :       delete[] arg2;
   12950             :     }
   12951             :   }
   12952             :   return NULL;
   12953             : }
   12954             : 
   12955             : 
   12956           0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12957           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12958           0 :   char *arg1 = (char *) 0 ;
   12959           0 :   int *arg2 = (int *) 0 ;
   12960           0 :   int res1 ;
   12961           0 :   char *buf1 = 0 ;
   12962           0 :   int alloc1 = 0 ;
   12963           0 :   void *argp2 = 0 ;
   12964           0 :   int res2 = 0 ;
   12965           0 :   PyObject *swig_obj[2] ;
   12966           0 :   GByte *result = 0 ;
   12967             :   
   12968           0 :   if (!SWIG_Python_UnpackTuple(args, "CPLHexToBinary", 2, 2, swig_obj)) SWIG_fail;
   12969           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12970           0 :   if (!SWIG_IsOK(res1)) {
   12971           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
   12972             :   }
   12973           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12974           0 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
   12975           0 :   if (!SWIG_IsOK(res2)) {
   12976           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
   12977             :   }
   12978           0 :   arg2 = reinterpret_cast< int * >(argp2);
   12979           0 :   {
   12980           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12981           0 :     if ( bLocalUseExceptions ) {
   12982           0 :       pushErrorHandler();
   12983             :     }
   12984           0 :     {
   12985           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12986           0 :       result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
   12987           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12988             :     }
   12989           0 :     if ( bLocalUseExceptions ) {
   12990           0 :       popErrorHandler();
   12991             :     }
   12992             : #ifndef SED_HACKS
   12993             :     if ( bLocalUseExceptions ) {
   12994             :       CPLErr eclass = CPLGetLastErrorType();
   12995             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12996             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12997             :       }
   12998             :     }
   12999             : #endif
   13000             :   }
   13001           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
   13002           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13003           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; } }
   13004             :   return resultobj;
   13005           0 : fail:
   13006           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13007             :   return NULL;
   13008             : }
   13009             : 
   13010             : 
   13011        3596 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13012        3596 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13013        3596 :   char *arg1 = (char *) 0 ;
   13014        3596 :   GIntBig arg2 ;
   13015        3596 :   char *arg3 = (char *) 0 ;
   13016        3596 :   int bToFree1 = 0 ;
   13017        3596 :   int alloc2 = 0 ;
   13018        3596 :   bool viewIsValid2 = false ;
   13019        3596 :   Py_buffer view2 ;
   13020        3596 :   PyObject *swig_obj[2] ;
   13021        3596 :   VSI_RETVAL result;
   13022             :   
   13023        3596 :   if (!SWIG_Python_UnpackTuple(args, "FileFromMemBuffer", 2, 2, swig_obj)) SWIG_fail;
   13024        3596 :   {
   13025             :     /* %typemap(in) (const char *utf8_path) */
   13026        3596 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13027             :     {
   13028        1769 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13029             :     }
   13030             :     else
   13031             :     {
   13032        1827 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13033             :       
   13034             :     }
   13035        3596 :     if (arg1 == NULL)
   13036             :     {
   13037           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13038           0 :       SWIG_fail;
   13039             :     }
   13040             :   }
   13041        3596 :   {
   13042             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   13043        3596 :     char* ptr = NULL;
   13044        3596 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   13045           0 :       SWIG_fail;
   13046             :     }
   13047        3596 :     arg3 = (char *)ptr;
   13048             :   }
   13049        3596 :   {
   13050        3596 :     if (!arg1) {
   13051        3596 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13052             :     }
   13053             :   }
   13054        3596 :   {
   13055        3596 :     const int bLocalUseExceptions = GetUseExceptions();
   13056        3596 :     if ( bLocalUseExceptions ) {
   13057        1267 :       pushErrorHandler();
   13058             :     }
   13059        3596 :     {
   13060        3596 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13061        3596 :       result = wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(char const *)arg3);
   13062        3596 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13063             :     }
   13064        3596 :     if ( bLocalUseExceptions ) {
   13065        1267 :       popErrorHandler();
   13066             :     }
   13067             : #ifndef SED_HACKS
   13068             :     if ( bLocalUseExceptions ) {
   13069             :       CPLErr eclass = CPLGetLastErrorType();
   13070             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13071             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13072             :       }
   13073             :     }
   13074             : #endif
   13075             :   }
   13076        3596 :   {
   13077             :     /* %typemap(out) VSI_RETVAL */
   13078        3597 :     if ( result != 0 && GetUseExceptions()) {
   13079           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13080           0 :       if( pszMessage[0] != '\0' )
   13081           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13082             :       else
   13083           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13084           0 :       SWIG_fail;
   13085             :     }
   13086             :   }
   13087        3596 :   {
   13088             :     /* %typemap(freearg) (const char *utf8_path) */
   13089        3596 :     GDALPythonFreeCStr(arg1, bToFree1);
   13090             :   }
   13091        3596 :   {
   13092             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   13093        3596 :     if( viewIsValid2 ) {
   13094        1251 :       PyBuffer_Release(&view2);
   13095             :     }
   13096        2345 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   13097        2345 :       delete[] arg3;
   13098             :     }
   13099             :   }
   13100        3596 :   {
   13101             :     /* %typemap(ret) VSI_RETVAL */
   13102        3596 :     resultobj = PyInt_FromLong( result );
   13103             :   }
   13104        3596 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13105             :   return resultobj;
   13106           0 : fail:
   13107           0 :   {
   13108             :     /* %typemap(freearg) (const char *utf8_path) */
   13109           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13110             :   }
   13111           0 :   {
   13112             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   13113           0 :     if( viewIsValid2 ) {
   13114           0 :       PyBuffer_Release(&view2);
   13115             :     }
   13116        3596 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   13117           0 :       delete[] arg3;
   13118             :     }
   13119             :   }
   13120             :   return NULL;
   13121             : }
   13122             : 
   13123             : 
   13124        7688 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13125        7688 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13126        7688 :   char *arg1 = (char *) 0 ;
   13127        7688 :   int bToFree1 = 0 ;
   13128        7688 :   PyObject *swig_obj[1] ;
   13129        7688 :   VSI_RETVAL result;
   13130             :   
   13131        7688 :   if (!args) SWIG_fail;
   13132        7688 :   swig_obj[0] = args;
   13133        7688 :   {
   13134             :     /* %typemap(in) (const char *utf8_path) */
   13135        7688 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13136             :     {
   13137        6836 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13138             :     }
   13139             :     else
   13140             :     {
   13141         852 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13142             :       
   13143             :     }
   13144        7688 :     if (arg1 == NULL)
   13145             :     {
   13146           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13147           0 :       SWIG_fail;
   13148             :     }
   13149             :   }
   13150        7688 :   {
   13151        7688 :     if (!arg1) {
   13152        7688 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13153             :     }
   13154             :   }
   13155        7688 :   {
   13156        7688 :     const int bLocalUseExceptions = GetUseExceptions();
   13157        7688 :     if ( bLocalUseExceptions ) {
   13158        1440 :       pushErrorHandler();
   13159             :     }
   13160        7688 :     {
   13161        7688 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13162        7688 :       result = VSIUnlink((char const *)arg1);
   13163        7688 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13164             :     }
   13165        7688 :     if ( bLocalUseExceptions ) {
   13166        1440 :       popErrorHandler();
   13167             :     }
   13168             : #ifndef SED_HACKS
   13169             :     if ( bLocalUseExceptions ) {
   13170             :       CPLErr eclass = CPLGetLastErrorType();
   13171             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13172             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13173             :       }
   13174             :     }
   13175             : #endif
   13176             :   }
   13177        7688 :   {
   13178             :     /* %typemap(out) VSI_RETVAL */
   13179        8247 :     if ( result != 0 && GetUseExceptions()) {
   13180          27 :       const char* pszMessage = CPLGetLastErrorMsg();
   13181          27 :       if( pszMessage[0] != '\0' )
   13182           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13183             :       else
   13184          27 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13185          27 :       SWIG_fail;
   13186             :     }
   13187             :   }
   13188        7661 :   {
   13189             :     /* %typemap(freearg) (const char *utf8_path) */
   13190        7661 :     GDALPythonFreeCStr(arg1, bToFree1);
   13191             :   }
   13192        7661 :   {
   13193             :     /* %typemap(ret) VSI_RETVAL */
   13194        7661 :     resultobj = PyInt_FromLong( result );
   13195             :   }
   13196        7661 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13197             :   return resultobj;
   13198          27 : fail:
   13199          27 :   {
   13200             :     /* %typemap(freearg) (const char *utf8_path) */
   13201        7715 :     GDALPythonFreeCStr(arg1, bToFree1);
   13202             :   }
   13203             :   return NULL;
   13204             : }
   13205             : 
   13206             : 
   13207          11 : SWIGINTERN PyObject *_wrap_UnlinkBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13208          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13209          11 :   char **arg1 = (char **) 0 ;
   13210          11 :   PyObject *swig_obj[1] ;
   13211          11 :   bool result;
   13212             :   
   13213          11 :   if (!args) SWIG_fail;
   13214          11 :   swig_obj[0] = args;
   13215          11 :   {
   13216             :     /* %typemap(in) char **dict */
   13217          11 :     arg1 = NULL;
   13218          11 :     if ( PySequence_Check( swig_obj[0] ) ) {
   13219          11 :       int bErr = FALSE;
   13220          11 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   13221          11 :       if ( bErr )
   13222             :       {
   13223           0 :         SWIG_fail;
   13224             :       }
   13225             :     }
   13226           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   13227           0 :       int bErr = FALSE;
   13228           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   13229           0 :       if ( bErr )
   13230             :       {
   13231           0 :         SWIG_fail;
   13232             :       }
   13233             :     }
   13234             :     else {
   13235           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13236           0 :       SWIG_fail;
   13237             :     }
   13238             :   }
   13239          11 :   {
   13240          11 :     const int bLocalUseExceptions = GetUseExceptions();
   13241          11 :     if ( bLocalUseExceptions ) {
   13242           0 :       pushErrorHandler();
   13243             :     }
   13244          11 :     {
   13245          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13246          11 :       result = (bool)wrapper_VSIUnlinkBatch(arg1);
   13247          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13248             :     }
   13249          11 :     if ( bLocalUseExceptions ) {
   13250           0 :       popErrorHandler();
   13251             :     }
   13252             : #ifndef SED_HACKS
   13253             :     if ( bLocalUseExceptions ) {
   13254             :       CPLErr eclass = CPLGetLastErrorType();
   13255             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13256             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13257             :       }
   13258             :     }
   13259             : #endif
   13260             :   }
   13261          11 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   13262          11 :   {
   13263             :     /* %typemap(freearg) char **dict */
   13264          11 :     CSLDestroy( arg1 );
   13265             :   }
   13266          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; } }
   13267             :   return resultobj;
   13268           0 : fail:
   13269           0 :   {
   13270             :     /* %typemap(freearg) char **dict */
   13271           0 :     CSLDestroy( arg1 );
   13272             :   }
   13273             :   return NULL;
   13274             : }
   13275             : 
   13276             : 
   13277           0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13278           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13279           0 :   int result;
   13280             :   
   13281           0 :   if (!SWIG_Python_UnpackTuple(args, "HasThreadSupport", 0, 0, 0)) SWIG_fail;
   13282           0 :   {
   13283           0 :     const int bLocalUseExceptions = GetUseExceptions();
   13284           0 :     if ( bLocalUseExceptions ) {
   13285           0 :       pushErrorHandler();
   13286             :     }
   13287           0 :     {
   13288           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13289           0 :       result = (int)wrapper_HasThreadSupport();
   13290           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13291             :     }
   13292           0 :     if ( bLocalUseExceptions ) {
   13293           0 :       popErrorHandler();
   13294             :     }
   13295             : #ifndef SED_HACKS
   13296             :     if ( bLocalUseExceptions ) {
   13297             :       CPLErr eclass = CPLGetLastErrorType();
   13298             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13299             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13300             :       }
   13301             :     }
   13302             : #endif
   13303             :   }
   13304           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13305           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; } }
   13306             :   return resultobj;
   13307           0 : fail:
   13308           0 :   return NULL;
   13309             : }
   13310             : 
   13311             : 
   13312           2 : SWIGINTERN PyObject *_wrap_GetCurrentThreadCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13313           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13314           2 :   int result;
   13315             :   
   13316           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCurrentThreadCount", 0, 0, 0)) SWIG_fail;
   13317           2 :   {
   13318           2 :     const int bLocalUseExceptions = GetUseExceptions();
   13319           2 :     if ( bLocalUseExceptions ) {
   13320           2 :       pushErrorHandler();
   13321             :     }
   13322           2 :     {
   13323           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13324           2 :       result = (int)CPLGetCurrentThreadCount();
   13325           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13326             :     }
   13327           2 :     if ( bLocalUseExceptions ) {
   13328           2 :       popErrorHandler();
   13329             :     }
   13330             : #ifndef SED_HACKS
   13331             :     if ( bLocalUseExceptions ) {
   13332             :       CPLErr eclass = CPLGetLastErrorType();
   13333             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13334             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13335             :       }
   13336             :     }
   13337             : #endif
   13338             :   }
   13339           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13340           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; } }
   13341             :   return resultobj;
   13342           0 : fail:
   13343           0 :   return NULL;
   13344             : }
   13345             : 
   13346             : 
   13347        5163 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13348        5163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13349        5163 :   char *arg1 = (char *) 0 ;
   13350        5163 :   int arg2 ;
   13351        5163 :   int bToFree1 = 0 ;
   13352        5163 :   int val2 ;
   13353        5163 :   int ecode2 = 0 ;
   13354        5163 :   PyObject *swig_obj[2] ;
   13355        5163 :   VSI_RETVAL result;
   13356             :   
   13357        5163 :   if (!SWIG_Python_UnpackTuple(args, "Mkdir", 2, 2, swig_obj)) SWIG_fail;
   13358        5163 :   {
   13359             :     /* %typemap(in) (const char *utf8_path) */
   13360        5163 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13361             :     {
   13362        4871 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13363             :     }
   13364             :     else
   13365             :     {
   13366         292 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13367             :       
   13368             :     }
   13369        5163 :     if (arg1 == NULL)
   13370             :     {
   13371           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13372           0 :       SWIG_fail;
   13373             :     }
   13374             :   }
   13375        5163 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13376        5163 :   if (!SWIG_IsOK(ecode2)) {
   13377           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
   13378             :   } 
   13379        5163 :   arg2 = static_cast< int >(val2);
   13380        5163 :   {
   13381        5163 :     if (!arg1) {
   13382        5163 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13383             :     }
   13384             :   }
   13385        5163 :   {
   13386        5163 :     const int bLocalUseExceptions = GetUseExceptions();
   13387        5163 :     if ( bLocalUseExceptions ) {
   13388        1809 :       pushErrorHandler();
   13389             :     }
   13390        5163 :     {
   13391        5163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13392        5163 :       result = VSIMkdir((char const *)arg1,arg2);
   13393        5163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13394             :     }
   13395        5163 :     if ( bLocalUseExceptions ) {
   13396        1809 :       popErrorHandler();
   13397             :     }
   13398             : #ifndef SED_HACKS
   13399             :     if ( bLocalUseExceptions ) {
   13400             :       CPLErr eclass = CPLGetLastErrorType();
   13401             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13402             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13403             :       }
   13404             :     }
   13405             : #endif
   13406             :   }
   13407        5163 :   {
   13408             :     /* %typemap(out) VSI_RETVAL */
   13409        5210 :     if ( result != 0 && GetUseExceptions()) {
   13410           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13411           0 :       if( pszMessage[0] != '\0' )
   13412           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13413             :       else
   13414           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13415           0 :       SWIG_fail;
   13416             :     }
   13417             :   }
   13418        5163 :   {
   13419             :     /* %typemap(freearg) (const char *utf8_path) */
   13420        5163 :     GDALPythonFreeCStr(arg1, bToFree1);
   13421             :   }
   13422        5163 :   {
   13423             :     /* %typemap(ret) VSI_RETVAL */
   13424        5163 :     resultobj = PyInt_FromLong( result );
   13425             :   }
   13426        5163 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13427             :   return resultobj;
   13428           0 : fail:
   13429           0 :   {
   13430             :     /* %typemap(freearg) (const char *utf8_path) */
   13431        5163 :     GDALPythonFreeCStr(arg1, bToFree1);
   13432             :   }
   13433             :   return NULL;
   13434             : }
   13435             : 
   13436             : 
   13437          35 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13438          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13439          35 :   char *arg1 = (char *) 0 ;
   13440          35 :   int bToFree1 = 0 ;
   13441          35 :   PyObject *swig_obj[1] ;
   13442          35 :   VSI_RETVAL result;
   13443             :   
   13444          35 :   if (!args) SWIG_fail;
   13445          35 :   swig_obj[0] = args;
   13446          35 :   {
   13447             :     /* %typemap(in) (const char *utf8_path) */
   13448          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13449             :     {
   13450          31 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13451             :     }
   13452             :     else
   13453             :     {
   13454           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13455             :       
   13456             :     }
   13457          35 :     if (arg1 == NULL)
   13458             :     {
   13459           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13460           0 :       SWIG_fail;
   13461             :     }
   13462             :   }
   13463          35 :   {
   13464          35 :     if (!arg1) {
   13465          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13466             :     }
   13467             :   }
   13468          35 :   {
   13469          35 :     const int bLocalUseExceptions = GetUseExceptions();
   13470          35 :     if ( bLocalUseExceptions ) {
   13471           2 :       pushErrorHandler();
   13472             :     }
   13473          35 :     {
   13474          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13475          35 :       result = VSIRmdir((char const *)arg1);
   13476          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13477             :     }
   13478          35 :     if ( bLocalUseExceptions ) {
   13479           2 :       popErrorHandler();
   13480             :     }
   13481             : #ifndef SED_HACKS
   13482             :     if ( bLocalUseExceptions ) {
   13483             :       CPLErr eclass = CPLGetLastErrorType();
   13484             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13485             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13486             :       }
   13487             :     }
   13488             : #endif
   13489             :   }
   13490          35 :   {
   13491             :     /* %typemap(out) VSI_RETVAL */
   13492          52 :     if ( result != 0 && GetUseExceptions()) {
   13493           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13494           0 :       if( pszMessage[0] != '\0' )
   13495           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13496             :       else
   13497           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13498           0 :       SWIG_fail;
   13499             :     }
   13500             :   }
   13501          35 :   {
   13502             :     /* %typemap(freearg) (const char *utf8_path) */
   13503          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   13504             :   }
   13505          35 :   {
   13506             :     /* %typemap(ret) VSI_RETVAL */
   13507          35 :     resultobj = PyInt_FromLong( result );
   13508             :   }
   13509          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; } }
   13510             :   return resultobj;
   13511           0 : fail:
   13512           0 :   {
   13513             :     /* %typemap(freearg) (const char *utf8_path) */
   13514          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   13515             :   }
   13516             :   return NULL;
   13517             : }
   13518             : 
   13519             : 
   13520          10 : SWIGINTERN PyObject *_wrap_MkdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13521          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13522          10 :   char *arg1 = (char *) 0 ;
   13523          10 :   int arg2 ;
   13524          10 :   int bToFree1 = 0 ;
   13525          10 :   int val2 ;
   13526          10 :   int ecode2 = 0 ;
   13527          10 :   PyObject *swig_obj[2] ;
   13528          10 :   VSI_RETVAL result;
   13529             :   
   13530          10 :   if (!SWIG_Python_UnpackTuple(args, "MkdirRecursive", 2, 2, swig_obj)) SWIG_fail;
   13531          10 :   {
   13532             :     /* %typemap(in) (const char *utf8_path) */
   13533          10 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13534             :     {
   13535          10 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13536             :     }
   13537             :     else
   13538             :     {
   13539           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13540             :       
   13541             :     }
   13542          10 :     if (arg1 == NULL)
   13543             :     {
   13544           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13545           0 :       SWIG_fail;
   13546             :     }
   13547             :   }
   13548          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13549          10 :   if (!SWIG_IsOK(ecode2)) {
   13550           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MkdirRecursive" "', argument " "2"" of type '" "int""'");
   13551             :   } 
   13552          10 :   arg2 = static_cast< int >(val2);
   13553          10 :   {
   13554          10 :     if (!arg1) {
   13555          10 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13556             :     }
   13557             :   }
   13558          10 :   {
   13559          10 :     const int bLocalUseExceptions = GetUseExceptions();
   13560          10 :     if ( bLocalUseExceptions ) {
   13561           8 :       pushErrorHandler();
   13562             :     }
   13563          10 :     {
   13564          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13565          10 :       result = VSIMkdirRecursive((char const *)arg1,arg2);
   13566          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13567             :     }
   13568          10 :     if ( bLocalUseExceptions ) {
   13569           8 :       popErrorHandler();
   13570             :     }
   13571             : #ifndef SED_HACKS
   13572             :     if ( bLocalUseExceptions ) {
   13573             :       CPLErr eclass = CPLGetLastErrorType();
   13574             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13575             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13576             :       }
   13577             :     }
   13578             : #endif
   13579             :   }
   13580          10 :   {
   13581             :     /* %typemap(out) VSI_RETVAL */
   13582          10 :     if ( result != 0 && GetUseExceptions()) {
   13583           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13584           0 :       if( pszMessage[0] != '\0' )
   13585           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13586             :       else
   13587           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13588           0 :       SWIG_fail;
   13589             :     }
   13590             :   }
   13591          10 :   {
   13592             :     /* %typemap(freearg) (const char *utf8_path) */
   13593          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13594             :   }
   13595          10 :   {
   13596             :     /* %typemap(ret) VSI_RETVAL */
   13597          10 :     resultobj = PyInt_FromLong( result );
   13598             :   }
   13599          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; } }
   13600             :   return resultobj;
   13601           0 : fail:
   13602           0 :   {
   13603             :     /* %typemap(freearg) (const char *utf8_path) */
   13604          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13605             :   }
   13606             :   return NULL;
   13607             : }
   13608             : 
   13609             : 
   13610        4818 : SWIGINTERN PyObject *_wrap_RmdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13611        4818 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13612        4818 :   char *arg1 = (char *) 0 ;
   13613        4818 :   int bToFree1 = 0 ;
   13614        4818 :   PyObject *swig_obj[1] ;
   13615        4818 :   VSI_RETVAL result;
   13616             :   
   13617        4818 :   if (!args) SWIG_fail;
   13618        4818 :   swig_obj[0] = args;
   13619        4818 :   {
   13620             :     /* %typemap(in) (const char *utf8_path) */
   13621        4818 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13622             :     {
   13623        4811 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13624             :     }
   13625             :     else
   13626             :     {
   13627           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13628             :       
   13629             :     }
   13630        4818 :     if (arg1 == NULL)
   13631             :     {
   13632           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13633           0 :       SWIG_fail;
   13634             :     }
   13635             :   }
   13636        4818 :   {
   13637        4818 :     if (!arg1) {
   13638        4818 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13639             :     }
   13640             :   }
   13641        4818 :   {
   13642        4818 :     const int bLocalUseExceptions = GetUseExceptions();
   13643        4818 :     if ( bLocalUseExceptions ) {
   13644        1763 :       pushErrorHandler();
   13645             :     }
   13646        4818 :     {
   13647        4818 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13648        4818 :       result = VSIRmdirRecursive((char const *)arg1);
   13649        4818 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13650             :     }
   13651        4818 :     if ( bLocalUseExceptions ) {
   13652        1763 :       popErrorHandler();
   13653             :     }
   13654             : #ifndef SED_HACKS
   13655             :     if ( bLocalUseExceptions ) {
   13656             :       CPLErr eclass = CPLGetLastErrorType();
   13657             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13658             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13659             :       }
   13660             :     }
   13661             : #endif
   13662             :   }
   13663        4818 :   {
   13664             :     /* %typemap(out) VSI_RETVAL */
   13665        4829 :     if ( result != 0 && GetUseExceptions()) {
   13666           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13667           0 :       if( pszMessage[0] != '\0' )
   13668           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13669             :       else
   13670           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13671           0 :       SWIG_fail;
   13672             :     }
   13673             :   }
   13674        4818 :   {
   13675             :     /* %typemap(freearg) (const char *utf8_path) */
   13676        4818 :     GDALPythonFreeCStr(arg1, bToFree1);
   13677             :   }
   13678        4818 :   {
   13679             :     /* %typemap(ret) VSI_RETVAL */
   13680        4818 :     resultobj = PyInt_FromLong( result );
   13681             :   }
   13682        4818 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13683             :   return resultobj;
   13684           0 : fail:
   13685           0 :   {
   13686             :     /* %typemap(freearg) (const char *utf8_path) */
   13687        4818 :     GDALPythonFreeCStr(arg1, bToFree1);
   13688             :   }
   13689             :   return NULL;
   13690             : }
   13691             : 
   13692             : 
   13693          14 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13694          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13695          14 :   char *arg1 = (char *) 0 ;
   13696          14 :   char *arg2 = (char *) 0 ;
   13697          14 :   int bToFree1 = 0 ;
   13698          14 :   int bToFree2 = 0 ;
   13699          14 :   PyObject *swig_obj[2] ;
   13700          14 :   VSI_RETVAL result;
   13701             :   
   13702          14 :   if (!SWIG_Python_UnpackTuple(args, "Rename", 2, 2, swig_obj)) SWIG_fail;
   13703          14 :   {
   13704             :     /* %typemap(in) (const char *utf8_path) */
   13705          14 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13706             :     {
   13707          12 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13708             :     }
   13709             :     else
   13710             :     {
   13711           2 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13712             :       
   13713             :     }
   13714          14 :     if (arg1 == NULL)
   13715             :     {
   13716           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13717           0 :       SWIG_fail;
   13718             :     }
   13719             :   }
   13720          14 :   {
   13721             :     /* %typemap(in) (const char *utf8_path) */
   13722          14 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   13723             :     {
   13724          12 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   13725             :     }
   13726             :     else
   13727             :     {
   13728           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   13729             :       
   13730             :     }
   13731          14 :     if (arg2 == NULL)
   13732             :     {
   13733           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13734           0 :       SWIG_fail;
   13735             :     }
   13736             :   }
   13737          14 :   {
   13738          14 :     if (!arg1) {
   13739          14 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13740             :     }
   13741             :   }
   13742          14 :   {
   13743          14 :     if (!arg2) {
   13744          14 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13745             :     }
   13746             :   }
   13747          14 :   {
   13748          14 :     const int bLocalUseExceptions = GetUseExceptions();
   13749          14 :     if ( bLocalUseExceptions ) {
   13750           2 :       pushErrorHandler();
   13751             :     }
   13752          14 :     {
   13753          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13754          14 :       result = VSIRename((char const *)arg1,(char const *)arg2);
   13755          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13756             :     }
   13757          14 :     if ( bLocalUseExceptions ) {
   13758           2 :       popErrorHandler();
   13759             :     }
   13760             : #ifndef SED_HACKS
   13761             :     if ( bLocalUseExceptions ) {
   13762             :       CPLErr eclass = CPLGetLastErrorType();
   13763             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13764             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13765             :       }
   13766             :     }
   13767             : #endif
   13768             :   }
   13769          14 :   {
   13770             :     /* %typemap(out) VSI_RETVAL */
   13771          16 :     if ( result != 0 && GetUseExceptions()) {
   13772           1 :       const char* pszMessage = CPLGetLastErrorMsg();
   13773           1 :       if( pszMessage[0] != '\0' )
   13774           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13775             :       else
   13776           1 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13777           1 :       SWIG_fail;
   13778             :     }
   13779             :   }
   13780          13 :   {
   13781             :     /* %typemap(freearg) (const char *utf8_path) */
   13782          13 :     GDALPythonFreeCStr(arg1, bToFree1);
   13783             :   }
   13784          13 :   {
   13785             :     /* %typemap(freearg) (const char *utf8_path) */
   13786          13 :     GDALPythonFreeCStr(arg2, bToFree2);
   13787             :   }
   13788          13 :   {
   13789             :     /* %typemap(ret) VSI_RETVAL */
   13790          13 :     resultobj = PyInt_FromLong( result );
   13791             :   }
   13792          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; } }
   13793             :   return resultobj;
   13794           1 : fail:
   13795           1 :   {
   13796             :     /* %typemap(freearg) (const char *utf8_path) */
   13797           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   13798             :   }
   13799           1 :   {
   13800             :     /* %typemap(freearg) (const char *utf8_path) */
   13801          15 :     GDALPythonFreeCStr(arg2, bToFree2);
   13802             :   }
   13803             :   return NULL;
   13804             : }
   13805             : 
   13806             : 
   13807           7 : SWIGINTERN PyObject *_wrap_Move(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13808           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13809           7 :   char *arg1 = (char *) 0 ;
   13810           7 :   char *arg2 = (char *) 0 ;
   13811           7 :   char **arg3 = (char **) NULL ;
   13812           7 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   13813           7 :   void *arg5 = (void *) NULL ;
   13814           7 :   int bToFree1 = 0 ;
   13815           7 :   int bToFree2 = 0 ;
   13816           7 :   PyObject * obj0 = 0 ;
   13817           7 :   PyObject * obj1 = 0 ;
   13818           7 :   PyObject * obj2 = 0 ;
   13819           7 :   PyObject * obj3 = 0 ;
   13820           7 :   PyObject * obj4 = 0 ;
   13821           7 :   char * kwnames[] = {
   13822             :     (char *)"old_path",  (char *)"new_path",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   13823             :   };
   13824           7 :   VSI_RETVAL result;
   13825             :   
   13826             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   13827           7 :   PyProgressData *psProgressInfo;
   13828           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   13829           7 :   psProgressInfo->nLastReported = -1;
   13830           7 :   psProgressInfo->psPyCallback = NULL;
   13831           7 :   psProgressInfo->psPyCallbackData = NULL;
   13832           7 :   arg5 = psProgressInfo;
   13833           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Move", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   13834           7 :   {
   13835             :     /* %typemap(in) (const char *utf8_path) */
   13836           7 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   13837             :     {
   13838           0 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   13839             :     }
   13840             :     else
   13841             :     {
   13842           7 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   13843             :       
   13844             :     }
   13845           7 :     if (arg1 == NULL)
   13846             :     {
   13847           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13848           0 :       SWIG_fail;
   13849             :     }
   13850             :   }
   13851           7 :   {
   13852             :     /* %typemap(in) (const char *utf8_path) */
   13853           7 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   13854             :     {
   13855           0 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   13856             :     }
   13857             :     else
   13858             :     {
   13859           7 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   13860             :       
   13861             :     }
   13862           7 :     if (arg2 == NULL)
   13863             :     {
   13864           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13865           0 :       SWIG_fail;
   13866             :     }
   13867             :   }
   13868           7 :   if (obj2) {
   13869           0 :     {
   13870             :       /* %typemap(in) char **dict */
   13871           0 :       arg3 = NULL;
   13872           0 :       if ( PySequence_Check( obj2 ) ) {
   13873           0 :         int bErr = FALSE;
   13874           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   13875           0 :         if ( bErr )
   13876             :         {
   13877           0 :           SWIG_fail;
   13878             :         }
   13879             :       }
   13880           0 :       else if ( PyMapping_Check( obj2 ) ) {
   13881           0 :         int bErr = FALSE;
   13882           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   13883           0 :         if ( bErr )
   13884             :         {
   13885           0 :           SWIG_fail;
   13886             :         }
   13887             :       }
   13888             :       else {
   13889           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13890           0 :         SWIG_fail;
   13891             :       }
   13892             :     }
   13893             :   }
   13894           7 :   if (obj3) {
   13895           4 :     {
   13896             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13897             :       /* callback_func typemap */
   13898             :       
   13899             :       /* In some cases 0 is passed instead of None. */
   13900             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   13901           4 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   13902             :       {
   13903           0 :         if( PyLong_AsLong(obj3) == 0 )
   13904             :         {
   13905           0 :           obj3 = Py_None;
   13906             :         }
   13907             :       }
   13908             :       
   13909           4 :       if (obj3 && obj3 != Py_None ) {
   13910           4 :         void* cbfunction = NULL;
   13911           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   13912             :             (void**)&cbfunction,
   13913             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   13914             :             SWIG_POINTER_EXCEPTION | 0 ));
   13915             :         
   13916           4 :         if ( cbfunction == GDALTermProgress ) {
   13917             :           arg4 = GDALTermProgress;
   13918             :         } else {
   13919           4 :           if (!PyCallable_Check(obj3)) {
   13920           0 :             PyErr_SetString( PyExc_RuntimeError,
   13921             :               "Object given is not a Python function" );
   13922           0 :             SWIG_fail;
   13923             :           }
   13924           4 :           psProgressInfo->psPyCallback = obj3;
   13925           4 :           arg4 = PyProgressProxy;
   13926             :         }
   13927             :         
   13928             :       }
   13929             :       
   13930             :     }
   13931             :   }
   13932           7 :   if (obj4) {
   13933           0 :     {
   13934             :       /* %typemap(in) ( void* callback_data=NULL)  */
   13935           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   13936             :     }
   13937             :   }
   13938           7 :   {
   13939           7 :     if (!arg1) {
   13940           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13941             :     }
   13942             :   }
   13943           7 :   {
   13944           7 :     if (!arg2) {
   13945           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13946             :     }
   13947             :   }
   13948           7 :   {
   13949           7 :     const int bLocalUseExceptions = GetUseExceptions();
   13950           7 :     if ( bLocalUseExceptions ) {
   13951           0 :       pushErrorHandler();
   13952             :     }
   13953           7 :     {
   13954           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13955           7 :       result = wrapper_VSIMove((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   13956           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13957             :     }
   13958           7 :     if ( bLocalUseExceptions ) {
   13959           0 :       popErrorHandler();
   13960             :     }
   13961             : #ifndef SED_HACKS
   13962             :     if ( bLocalUseExceptions ) {
   13963             :       CPLErr eclass = CPLGetLastErrorType();
   13964             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13965             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13966             :       }
   13967             :     }
   13968             : #endif
   13969             :   }
   13970           7 :   {
   13971             :     /* %typemap(out) VSI_RETVAL */
   13972           8 :     if ( result != 0 && GetUseExceptions()) {
   13973           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13974           0 :       if( pszMessage[0] != '\0' )
   13975           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13976             :       else
   13977           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13978           0 :       SWIG_fail;
   13979             :     }
   13980             :   }
   13981           7 :   {
   13982             :     /* %typemap(freearg) (const char *utf8_path) */
   13983           7 :     GDALPythonFreeCStr(arg1, bToFree1);
   13984             :   }
   13985           7 :   {
   13986             :     /* %typemap(freearg) (const char *utf8_path) */
   13987           7 :     GDALPythonFreeCStr(arg2, bToFree2);
   13988             :   }
   13989           7 :   {
   13990             :     /* %typemap(freearg) char **dict */
   13991           7 :     CSLDestroy( arg3 );
   13992             :   }
   13993           7 :   {
   13994             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13995             :     
   13996           7 :     CPLFree(psProgressInfo);
   13997             :     
   13998             :   }
   13999           7 :   {
   14000             :     /* %typemap(ret) VSI_RETVAL */
   14001           7 :     resultobj = PyInt_FromLong( result );
   14002             :   }
   14003           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; } }
   14004             :   return resultobj;
   14005           0 : fail:
   14006           0 :   {
   14007             :     /* %typemap(freearg) (const char *utf8_path) */
   14008           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14009             :   }
   14010           0 :   {
   14011             :     /* %typemap(freearg) (const char *utf8_path) */
   14012           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14013             :   }
   14014           0 :   {
   14015             :     /* %typemap(freearg) char **dict */
   14016           0 :     CSLDestroy( arg3 );
   14017             :   }
   14018           0 :   {
   14019             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14020             :     
   14021           0 :     CPLFree(psProgressInfo);
   14022             :     
   14023             :   }
   14024             :   return NULL;
   14025             : }
   14026             : 
   14027             : 
   14028          42 : SWIGINTERN PyObject *_wrap_Sync(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14029          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14030          42 :   char *arg1 = (char *) 0 ;
   14031          42 :   char *arg2 = (char *) 0 ;
   14032          42 :   char **arg3 = (char **) NULL ;
   14033          42 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   14034          42 :   void *arg5 = (void *) NULL ;
   14035          42 :   int bToFree1 = 0 ;
   14036          42 :   int bToFree2 = 0 ;
   14037          42 :   PyObject * obj0 = 0 ;
   14038          42 :   PyObject * obj1 = 0 ;
   14039          42 :   PyObject * obj2 = 0 ;
   14040          42 :   PyObject * obj3 = 0 ;
   14041          42 :   PyObject * obj4 = 0 ;
   14042          42 :   char * kwnames[] = {
   14043             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   14044             :   };
   14045          42 :   bool result;
   14046             :   
   14047             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14048          42 :   PyProgressData *psProgressInfo;
   14049          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14050          42 :   psProgressInfo->nLastReported = -1;
   14051          42 :   psProgressInfo->psPyCallback = NULL;
   14052          42 :   psProgressInfo->psPyCallbackData = NULL;
   14053          42 :   arg5 = psProgressInfo;
   14054          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Sync", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   14055          42 :   {
   14056             :     /* %typemap(in) (const char *utf8_path) */
   14057          42 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   14058             :     {
   14059          30 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   14060             :     }
   14061             :     else
   14062             :     {
   14063          12 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   14064             :       
   14065             :     }
   14066          42 :     if (arg1 == NULL)
   14067             :     {
   14068           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14069           0 :       SWIG_fail;
   14070             :     }
   14071             :   }
   14072          42 :   {
   14073             :     /* %typemap(in) (const char *utf8_path) */
   14074          42 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   14075             :     {
   14076          31 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   14077             :     }
   14078             :     else
   14079             :     {
   14080          11 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   14081             :       
   14082             :     }
   14083          42 :     if (arg2 == NULL)
   14084             :     {
   14085           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14086           0 :       SWIG_fail;
   14087             :     }
   14088             :   }
   14089          42 :   if (obj2) {
   14090          26 :     {
   14091             :       /* %typemap(in) char **dict */
   14092          26 :       arg3 = NULL;
   14093          26 :       if ( PySequence_Check( obj2 ) ) {
   14094          26 :         int bErr = FALSE;
   14095          26 :         arg3 = CSLFromPySequence(obj2, &bErr);
   14096          26 :         if ( bErr )
   14097             :         {
   14098           0 :           SWIG_fail;
   14099             :         }
   14100             :       }
   14101           0 :       else if ( PyMapping_Check( obj2 ) ) {
   14102           0 :         int bErr = FALSE;
   14103           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   14104           0 :         if ( bErr )
   14105             :         {
   14106           0 :           SWIG_fail;
   14107             :         }
   14108             :       }
   14109             :       else {
   14110           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14111           0 :         SWIG_fail;
   14112             :       }
   14113             :     }
   14114             :   }
   14115          42 :   if (obj3) {
   14116           7 :     {
   14117             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14118             :       /* callback_func typemap */
   14119             :       
   14120             :       /* In some cases 0 is passed instead of None. */
   14121             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14122           7 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   14123             :       {
   14124           0 :         if( PyLong_AsLong(obj3) == 0 )
   14125             :         {
   14126           0 :           obj3 = Py_None;
   14127             :         }
   14128             :       }
   14129             :       
   14130           7 :       if (obj3 && obj3 != Py_None ) {
   14131           7 :         void* cbfunction = NULL;
   14132           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   14133             :             (void**)&cbfunction,
   14134             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14135             :             SWIG_POINTER_EXCEPTION | 0 ));
   14136             :         
   14137           7 :         if ( cbfunction == GDALTermProgress ) {
   14138             :           arg4 = GDALTermProgress;
   14139             :         } else {
   14140           7 :           if (!PyCallable_Check(obj3)) {
   14141           0 :             PyErr_SetString( PyExc_RuntimeError,
   14142             :               "Object given is not a Python function" );
   14143           0 :             SWIG_fail;
   14144             :           }
   14145           7 :           psProgressInfo->psPyCallback = obj3;
   14146           7 :           arg4 = PyProgressProxy;
   14147             :         }
   14148             :         
   14149             :       }
   14150             :       
   14151             :     }
   14152             :   }
   14153          42 :   if (obj4) {
   14154           6 :     {
   14155             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14156           6 :       psProgressInfo->psPyCallbackData = obj4 ;
   14157             :     }
   14158             :   }
   14159          42 :   {
   14160          42 :     if (!arg1) {
   14161          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14162             :     }
   14163             :   }
   14164          42 :   {
   14165          42 :     if (!arg2) {
   14166          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14167             :     }
   14168             :   }
   14169          42 :   {
   14170          42 :     const int bLocalUseExceptions = GetUseExceptions();
   14171          42 :     if ( bLocalUseExceptions ) {
   14172           1 :       pushErrorHandler();
   14173             :     }
   14174          42 :     {
   14175          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14176          42 :       result = (bool)wrapper_VSISync((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   14177          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14178             :     }
   14179          42 :     if ( bLocalUseExceptions ) {
   14180           1 :       popErrorHandler();
   14181             :     }
   14182             : #ifndef SED_HACKS
   14183             :     if ( bLocalUseExceptions ) {
   14184             :       CPLErr eclass = CPLGetLastErrorType();
   14185             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14186             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14187             :       }
   14188             :     }
   14189             : #endif
   14190             :   }
   14191          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14192          42 :   {
   14193             :     /* %typemap(freearg) (const char *utf8_path) */
   14194          42 :     GDALPythonFreeCStr(arg1, bToFree1);
   14195             :   }
   14196          42 :   {
   14197             :     /* %typemap(freearg) (const char *utf8_path) */
   14198          42 :     GDALPythonFreeCStr(arg2, bToFree2);
   14199             :   }
   14200          42 :   {
   14201             :     /* %typemap(freearg) char **dict */
   14202          42 :     CSLDestroy( arg3 );
   14203             :   }
   14204          42 :   {
   14205             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14206             :     
   14207          42 :     CPLFree(psProgressInfo);
   14208             :     
   14209             :   }
   14210          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; } }
   14211             :   return resultobj;
   14212           0 : fail:
   14213           0 :   {
   14214             :     /* %typemap(freearg) (const char *utf8_path) */
   14215           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14216             :   }
   14217           0 :   {
   14218             :     /* %typemap(freearg) (const char *utf8_path) */
   14219           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14220             :   }
   14221           0 :   {
   14222             :     /* %typemap(freearg) char **dict */
   14223           0 :     CSLDestroy( arg3 );
   14224             :   }
   14225           0 :   {
   14226             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14227             :     
   14228           0 :     CPLFree(psProgressInfo);
   14229             :     
   14230             :   }
   14231             :   return NULL;
   14232             : }
   14233             : 
   14234             : 
   14235           1 : SWIGINTERN PyObject *_wrap_AbortPendingUploads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14236           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14237           1 :   char *arg1 = (char *) 0 ;
   14238           1 :   int bToFree1 = 0 ;
   14239           1 :   PyObject *swig_obj[1] ;
   14240           1 :   bool result;
   14241             :   
   14242           1 :   if (!args) SWIG_fail;
   14243           1 :   swig_obj[0] = args;
   14244           1 :   {
   14245             :     /* %typemap(in) (const char *utf8_path) */
   14246           1 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14247             :     {
   14248           1 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14249             :     }
   14250             :     else
   14251             :     {
   14252           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14253             :       
   14254             :     }
   14255           1 :     if (arg1 == NULL)
   14256             :     {
   14257           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14258           0 :       SWIG_fail;
   14259             :     }
   14260             :   }
   14261           1 :   {
   14262           1 :     if (!arg1) {
   14263           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14264             :     }
   14265             :   }
   14266           1 :   {
   14267           1 :     const int bLocalUseExceptions = GetUseExceptions();
   14268           1 :     if ( bLocalUseExceptions ) {
   14269           0 :       pushErrorHandler();
   14270             :     }
   14271           1 :     {
   14272           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14273           1 :       result = (bool)VSIAbortPendingUploads((char const *)arg1);
   14274           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14275             :     }
   14276           1 :     if ( bLocalUseExceptions ) {
   14277           0 :       popErrorHandler();
   14278             :     }
   14279             : #ifndef SED_HACKS
   14280             :     if ( bLocalUseExceptions ) {
   14281             :       CPLErr eclass = CPLGetLastErrorType();
   14282             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14283             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14284             :       }
   14285             :     }
   14286             : #endif
   14287             :   }
   14288           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14289           1 :   {
   14290             :     /* %typemap(freearg) (const char *utf8_path) */
   14291           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14292             :   }
   14293           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; } }
   14294             :   return resultobj;
   14295           0 : fail:
   14296           0 :   {
   14297             :     /* %typemap(freearg) (const char *utf8_path) */
   14298           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14299             :   }
   14300             :   return NULL;
   14301             : }
   14302             : 
   14303             : 
   14304          29 : SWIGINTERN PyObject *_wrap_CopyFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14305          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14306          29 :   char *arg1 = (char *) 0 ;
   14307          29 :   char *arg2 = (char *) 0 ;
   14308          29 :   VSILFILE *arg3 = (VSILFILE *) NULL ;
   14309          29 :   GIntBig arg4 = (GIntBig) -1 ;
   14310          29 :   char **arg5 = (char **) NULL ;
   14311          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   14312          29 :   void *arg7 = (void *) NULL ;
   14313          29 :   int bToFree1 = 0 ;
   14314          29 :   int bToFree2 = 0 ;
   14315          29 :   void *argp3 = 0 ;
   14316          29 :   int res3 = 0 ;
   14317          29 :   PyObject * obj0 = 0 ;
   14318          29 :   PyObject * obj1 = 0 ;
   14319          29 :   PyObject * obj2 = 0 ;
   14320          29 :   PyObject * obj3 = 0 ;
   14321          29 :   PyObject * obj4 = 0 ;
   14322          29 :   PyObject * obj5 = 0 ;
   14323          29 :   PyObject * obj6 = 0 ;
   14324          29 :   char * kwnames[] = {
   14325             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"fpSource",  (char *)"nSourceSize",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   14326             :   };
   14327          29 :   int result;
   14328             :   
   14329             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14330          29 :   PyProgressData *psProgressInfo;
   14331          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14332          29 :   psProgressInfo->nLastReported = -1;
   14333          29 :   psProgressInfo->psPyCallback = NULL;
   14334          29 :   psProgressInfo->psPyCallbackData = NULL;
   14335          29 :   arg7 = psProgressInfo;
   14336          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOO:CopyFile", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   14337          29 :   {
   14338             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14339          29 :     if( obj0 == Py_None )
   14340             :     {
   14341             :       arg1 = NULL;
   14342             :     }
   14343             :     else
   14344             :     {
   14345          25 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   14346          25 :       if (arg1 == NULL)
   14347             :       {
   14348           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14349           0 :         SWIG_fail;
   14350             :       }
   14351             :     }
   14352             :   }
   14353          29 :   {
   14354             :     /* %typemap(in) (const char *utf8_path) */
   14355          29 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   14356             :     {
   14357          18 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   14358             :     }
   14359             :     else
   14360             :     {
   14361          11 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   14362             :       
   14363             :     }
   14364          29 :     if (arg2 == NULL)
   14365             :     {
   14366           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14367           0 :       SWIG_fail;
   14368             :     }
   14369             :   }
   14370          29 :   if (obj2) {
   14371           3 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14372           3 :     if (!SWIG_IsOK(res3)) {
   14373           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFile" "', argument " "3"" of type '" "VSILFILE *""'"); 
   14374             :     }
   14375           3 :     arg3 = reinterpret_cast< VSILFILE * >(argp3);
   14376             :   }
   14377          29 :   if (obj3) {
   14378           0 :     {
   14379           0 :       arg4 = (GIntBig)PyLong_AsLongLong(obj3);
   14380             :     }
   14381             :   }
   14382          29 :   if (obj4) {
   14383           1 :     {
   14384             :       /* %typemap(in) char **dict */
   14385           1 :       arg5 = NULL;
   14386           1 :       if ( PySequence_Check( obj4 ) ) {
   14387           1 :         int bErr = FALSE;
   14388           1 :         arg5 = CSLFromPySequence(obj4, &bErr);
   14389           1 :         if ( bErr )
   14390             :         {
   14391           0 :           SWIG_fail;
   14392             :         }
   14393             :       }
   14394           0 :       else if ( PyMapping_Check( obj4 ) ) {
   14395           0 :         int bErr = FALSE;
   14396           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   14397           0 :         if ( bErr )
   14398             :         {
   14399           0 :           SWIG_fail;
   14400             :         }
   14401             :       }
   14402             :       else {
   14403           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14404           0 :         SWIG_fail;
   14405             :       }
   14406             :     }
   14407             :   }
   14408          29 :   if (obj5) {
   14409           4 :     {
   14410             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14411             :       /* callback_func typemap */
   14412             :       
   14413             :       /* In some cases 0 is passed instead of None. */
   14414             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14415           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   14416             :       {
   14417           0 :         if( PyLong_AsLong(obj5) == 0 )
   14418             :         {
   14419           0 :           obj5 = Py_None;
   14420             :         }
   14421             :       }
   14422             :       
   14423           4 :       if (obj5 && obj5 != Py_None ) {
   14424           4 :         void* cbfunction = NULL;
   14425           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   14426             :             (void**)&cbfunction,
   14427             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14428             :             SWIG_POINTER_EXCEPTION | 0 ));
   14429             :         
   14430           4 :         if ( cbfunction == GDALTermProgress ) {
   14431             :           arg6 = GDALTermProgress;
   14432             :         } else {
   14433           4 :           if (!PyCallable_Check(obj5)) {
   14434           0 :             PyErr_SetString( PyExc_RuntimeError,
   14435             :               "Object given is not a Python function" );
   14436           0 :             SWIG_fail;
   14437             :           }
   14438           4 :           psProgressInfo->psPyCallback = obj5;
   14439           4 :           arg6 = PyProgressProxy;
   14440             :         }
   14441             :         
   14442             :       }
   14443             :       
   14444             :     }
   14445             :   }
   14446          29 :   if (obj6) {
   14447           4 :     {
   14448             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14449           4 :       psProgressInfo->psPyCallbackData = obj6 ;
   14450             :     }
   14451             :   }
   14452          29 :   {
   14453          29 :     if (!arg2) {
   14454          29 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14455             :     }
   14456             :   }
   14457          29 :   {
   14458          29 :     const int bLocalUseExceptions = GetUseExceptions();
   14459          29 :     if ( bLocalUseExceptions ) {
   14460          11 :       pushErrorHandler();
   14461             :     }
   14462          29 :     {
   14463          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14464          29 :       result = (int)wrapper_VSICopyFile((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   14465          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14466             :     }
   14467          29 :     if ( bLocalUseExceptions ) {
   14468          11 :       popErrorHandler();
   14469             :     }
   14470             : #ifndef SED_HACKS
   14471             :     if ( bLocalUseExceptions ) {
   14472             :       CPLErr eclass = CPLGetLastErrorType();
   14473             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14474             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14475             :       }
   14476             :     }
   14477             : #endif
   14478             :   }
   14479          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14480          29 :   {
   14481             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14482          29 :     if( arg1 != NULL )
   14483          25 :     GDALPythonFreeCStr(arg1, bToFree1);
   14484             :   }
   14485          29 :   {
   14486             :     /* %typemap(freearg) (const char *utf8_path) */
   14487          29 :     GDALPythonFreeCStr(arg2, bToFree2);
   14488             :   }
   14489          29 :   {
   14490             :     /* %typemap(freearg) char **dict */
   14491          29 :     CSLDestroy( arg5 );
   14492             :   }
   14493          29 :   {
   14494             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14495             :     
   14496          29 :     CPLFree(psProgressInfo);
   14497             :     
   14498             :   }
   14499          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; } }
   14500             :   return resultobj;
   14501           0 : fail:
   14502           0 :   {
   14503             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14504           0 :     if( arg1 != NULL )
   14505           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14506             :   }
   14507           0 :   {
   14508             :     /* %typemap(freearg) (const char *utf8_path) */
   14509           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14510             :   }
   14511           0 :   {
   14512             :     /* %typemap(freearg) char **dict */
   14513           0 :     CSLDestroy( arg5 );
   14514             :   }
   14515           0 :   {
   14516             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14517             :     
   14518           0 :     CPLFree(psProgressInfo);
   14519             :     
   14520             :   }
   14521             :   return NULL;
   14522             : }
   14523             : 
   14524             : 
   14525          20 : SWIGINTERN PyObject *_wrap_CopyFileRestartable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14526          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14527          20 :   char *arg1 = (char *) 0 ;
   14528          20 :   char *arg2 = (char *) 0 ;
   14529          20 :   char *arg3 = (char *) 0 ;
   14530          20 :   int *arg4 = (int *) 0 ;
   14531          20 :   char **arg5 = (char **) 0 ;
   14532          20 :   char **arg6 = (char **) NULL ;
   14533          20 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   14534          20 :   void *arg8 = (void *) NULL ;
   14535          20 :   int bToFree1 = 0 ;
   14536          20 :   int bToFree2 = 0 ;
   14537          20 :   int res3 ;
   14538          20 :   char *buf3 = 0 ;
   14539          20 :   int alloc3 = 0 ;
   14540          20 :   int nRetCode4 = 0 ;
   14541          20 :   char *pszOutputPayload4 = 0 ;
   14542          20 :   PyObject *swig_obj[6] ;
   14543             :   
   14544             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14545          20 :   PyProgressData *psProgressInfo;
   14546          20 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14547          20 :   psProgressInfo->nLastReported = -1;
   14548          20 :   psProgressInfo->psPyCallback = NULL;
   14549          20 :   psProgressInfo->psPyCallbackData = NULL;
   14550          20 :   arg8 = psProgressInfo;
   14551          20 :   {
   14552             :     /* %typemap(in) (int* pnRetCode, char** ppszOutputPayload) */
   14553          20 :     arg4 = &nRetCode4;
   14554          20 :     arg5 = &pszOutputPayload4;
   14555             :   }
   14556          20 :   if (!SWIG_Python_UnpackTuple(args, "CopyFileRestartable", 3, 6, swig_obj)) SWIG_fail;
   14557          20 :   {
   14558             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14559          20 :     if( swig_obj[0] == Py_None )
   14560             :     {
   14561             :       arg1 = NULL;
   14562             :     }
   14563             :     else
   14564             :     {
   14565          20 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14566          20 :       if (arg1 == NULL)
   14567             :       {
   14568           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14569           0 :         SWIG_fail;
   14570             :       }
   14571             :     }
   14572             :   }
   14573          20 :   {
   14574             :     /* %typemap(in) (const char *utf8_path) */
   14575          20 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14576             :     {
   14577          20 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14578             :     }
   14579             :     else
   14580             :     {
   14581           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14582             :       
   14583             :     }
   14584          20 :     if (arg2 == NULL)
   14585             :     {
   14586           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14587           0 :       SWIG_fail;
   14588             :     }
   14589             :   }
   14590          20 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   14591          20 :   if (!SWIG_IsOK(res3)) {
   14592           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFileRestartable" "', argument " "3"" of type '" "char const *""'");
   14593             :   }
   14594          20 :   arg3 = reinterpret_cast< char * >(buf3);
   14595          20 :   if (swig_obj[3]) {
   14596          18 :     {
   14597             :       /* %typemap(in) char **dict */
   14598          18 :       arg6 = NULL;
   14599          18 :       if ( PySequence_Check( swig_obj[3] ) ) {
   14600          18 :         int bErr = FALSE;
   14601          18 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   14602          18 :         if ( bErr )
   14603             :         {
   14604           0 :           SWIG_fail;
   14605             :         }
   14606             :       }
   14607           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   14608           0 :         int bErr = FALSE;
   14609           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   14610           0 :         if ( bErr )
   14611             :         {
   14612           0 :           SWIG_fail;
   14613             :         }
   14614             :       }
   14615             :       else {
   14616           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14617           0 :         SWIG_fail;
   14618             :       }
   14619             :     }
   14620             :   }
   14621          20 :   if (swig_obj[4]) {
   14622           2 :     {
   14623             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14624             :       /* callback_func typemap */
   14625             :       
   14626             :       /* In some cases 0 is passed instead of None. */
   14627             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14628           2 :       if ( PyLong_Check(swig_obj[4]) || PyInt_Check(swig_obj[4]) )
   14629             :       {
   14630           0 :         if( PyLong_AsLong(swig_obj[4]) == 0 )
   14631             :         {
   14632           0 :           swig_obj[4] = Py_None;
   14633             :         }
   14634             :       }
   14635             :       
   14636           2 :       if (swig_obj[4] && swig_obj[4] != Py_None ) {
   14637           2 :         void* cbfunction = NULL;
   14638           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[4],
   14639             :             (void**)&cbfunction,
   14640             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14641             :             SWIG_POINTER_EXCEPTION | 0 ));
   14642             :         
   14643           2 :         if ( cbfunction == GDALTermProgress ) {
   14644             :           arg7 = GDALTermProgress;
   14645             :         } else {
   14646           2 :           if (!PyCallable_Check(swig_obj[4])) {
   14647           0 :             PyErr_SetString( PyExc_RuntimeError,
   14648             :               "Object given is not a Python function" );
   14649           0 :             SWIG_fail;
   14650             :           }
   14651           2 :           psProgressInfo->psPyCallback = swig_obj[4];
   14652           2 :           arg7 = PyProgressProxy;
   14653             :         }
   14654             :         
   14655             :       }
   14656             :       
   14657             :     }
   14658             :   }
   14659          20 :   if (swig_obj[5]) {
   14660           0 :     {
   14661             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14662           0 :       psProgressInfo->psPyCallbackData = swig_obj[5] ;
   14663             :     }
   14664             :   }
   14665          20 :   {
   14666          20 :     if (!arg2) {
   14667          20 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14668             :     }
   14669             :   }
   14670          20 :   {
   14671          20 :     const int bLocalUseExceptions = GetUseExceptions();
   14672          20 :     if ( bLocalUseExceptions ) {
   14673           0 :       pushErrorHandler();
   14674             :     }
   14675          20 :     {
   14676          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14677          20 :       CopyFileRestartable((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8);
   14678          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14679             :     }
   14680          20 :     if ( bLocalUseExceptions ) {
   14681           0 :       popErrorHandler();
   14682             :     }
   14683             : #ifndef SED_HACKS
   14684             :     if ( bLocalUseExceptions ) {
   14685             :       CPLErr eclass = CPLGetLastErrorType();
   14686             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14687             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14688             :       }
   14689             :     }
   14690             : #endif
   14691             :   }
   14692          20 :   resultobj = SWIG_Py_Void();
   14693          20 :   {
   14694             :     /* %typemap(argout) (int* pnRetCode, char** ppszOutputPayload)  */
   14695          20 :     PyObject *r = PyTuple_New( 2 );
   14696          20 :     PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   14697          20 :     if( *arg5 )
   14698             :     {
   14699           2 :       PyTuple_SetItem( r, 1, GDALPythonObjectFromCStr(*arg5) );
   14700           2 :       VSIFree(*arg5);
   14701             :     }
   14702             :     else
   14703             :     {
   14704          18 :       Py_INCREF(Py_None);
   14705          18 :       PyTuple_SetItem( r, 1, Py_None );
   14706             :     }
   14707             : #if SWIG_VERSION >= 0x040300
   14708             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   14709             : #else
   14710          20 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   14711             : #endif
   14712             :   }
   14713          20 :   {
   14714             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14715          20 :     if( arg1 != NULL )
   14716          20 :     GDALPythonFreeCStr(arg1, bToFree1);
   14717             :   }
   14718          20 :   {
   14719             :     /* %typemap(freearg) (const char *utf8_path) */
   14720          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   14721             :   }
   14722          20 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14723          20 :   {
   14724             :     /* %typemap(freearg) char **dict */
   14725          20 :     CSLDestroy( arg6 );
   14726             :   }
   14727          20 :   {
   14728             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14729             :     
   14730          20 :     CPLFree(psProgressInfo);
   14731             :     
   14732             :   }
   14733          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; } }
   14734             :   return resultobj;
   14735           0 : fail:
   14736           0 :   {
   14737             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14738           0 :     if( arg1 != NULL )
   14739           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14740             :   }
   14741           0 :   {
   14742             :     /* %typemap(freearg) (const char *utf8_path) */
   14743           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14744             :   }
   14745           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14746           0 :   {
   14747             :     /* %typemap(freearg) char **dict */
   14748           0 :     CSLDestroy( arg6 );
   14749             :   }
   14750           0 :   {
   14751             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14752             :     
   14753           0 :     CPLFree(psProgressInfo);
   14754             :     
   14755             :   }
   14756             :   return NULL;
   14757             : }
   14758             : 
   14759             : 
   14760           0 : SWIGINTERN PyObject *_wrap_MoveFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14761           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14762           0 :   char *arg1 = (char *) 0 ;
   14763           0 :   char *arg2 = (char *) 0 ;
   14764           0 :   int bToFree1 = 0 ;
   14765           0 :   int bToFree2 = 0 ;
   14766           0 :   PyObject *swig_obj[2] ;
   14767           0 :   int result;
   14768             :   
   14769           0 :   if (!SWIG_Python_UnpackTuple(args, "MoveFile", 2, 2, swig_obj)) SWIG_fail;
   14770           0 :   {
   14771             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14772           0 :     if( swig_obj[0] == Py_None )
   14773             :     {
   14774             :       arg1 = NULL;
   14775             :     }
   14776             :     else
   14777             :     {
   14778           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14779           0 :       if (arg1 == NULL)
   14780             :       {
   14781           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14782           0 :         SWIG_fail;
   14783             :       }
   14784             :     }
   14785             :   }
   14786           0 :   {
   14787             :     /* %typemap(in) (const char *utf8_path) */
   14788           0 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14789             :     {
   14790           0 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14791             :     }
   14792             :     else
   14793             :     {
   14794           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14795             :       
   14796             :     }
   14797           0 :     if (arg2 == NULL)
   14798             :     {
   14799           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14800           0 :       SWIG_fail;
   14801             :     }
   14802             :   }
   14803           0 :   {
   14804           0 :     if (!arg2) {
   14805           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14806             :     }
   14807             :   }
   14808           0 :   {
   14809           0 :     const int bLocalUseExceptions = GetUseExceptions();
   14810           0 :     if ( bLocalUseExceptions ) {
   14811           0 :       pushErrorHandler();
   14812             :     }
   14813           0 :     {
   14814           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14815           0 :       result = (int)wrapper_MoveFile((char const *)arg1,(char const *)arg2);
   14816           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14817             :     }
   14818           0 :     if ( bLocalUseExceptions ) {
   14819           0 :       popErrorHandler();
   14820             :     }
   14821             : #ifndef SED_HACKS
   14822             :     if ( bLocalUseExceptions ) {
   14823             :       CPLErr eclass = CPLGetLastErrorType();
   14824             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14825             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14826             :       }
   14827             :     }
   14828             : #endif
   14829             :   }
   14830           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14831           0 :   {
   14832             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14833           0 :     if( arg1 != NULL )
   14834           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14835             :   }
   14836           0 :   {
   14837             :     /* %typemap(freearg) (const char *utf8_path) */
   14838           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14839             :   }
   14840           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; } }
   14841             :   return resultobj;
   14842           0 : fail:
   14843           0 :   {
   14844             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14845           0 :     if( arg1 != NULL )
   14846           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14847             :   }
   14848           0 :   {
   14849             :     /* %typemap(freearg) (const char *utf8_path) */
   14850           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14851             :   }
   14852             :   return NULL;
   14853             : }
   14854             : 
   14855             : 
   14856           9 : SWIGINTERN PyObject *_wrap_GetActualURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14857           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14858           9 :   char *arg1 = (char *) 0 ;
   14859           9 :   int bToFree1 = 0 ;
   14860           9 :   PyObject *swig_obj[1] ;
   14861           9 :   char *result = 0 ;
   14862             :   
   14863           9 :   if (!args) SWIG_fail;
   14864           9 :   swig_obj[0] = args;
   14865           9 :   {
   14866             :     /* %typemap(in) (const char *utf8_path) */
   14867           9 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14868             :     {
   14869           9 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14870             :     }
   14871             :     else
   14872             :     {
   14873           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14874             :       
   14875             :     }
   14876           9 :     if (arg1 == NULL)
   14877             :     {
   14878           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14879           0 :       SWIG_fail;
   14880             :     }
   14881             :   }
   14882           9 :   {
   14883           9 :     if (!arg1) {
   14884           9 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14885             :     }
   14886             :   }
   14887           9 :   {
   14888           9 :     const int bLocalUseExceptions = GetUseExceptions();
   14889           9 :     if ( bLocalUseExceptions ) {
   14890           2 :       pushErrorHandler();
   14891             :     }
   14892           9 :     {
   14893           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14894           9 :       result = (char *)VSIGetActualURL((char const *)arg1);
   14895           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14896             :     }
   14897           9 :     if ( bLocalUseExceptions ) {
   14898           2 :       popErrorHandler();
   14899             :     }
   14900             : #ifndef SED_HACKS
   14901             :     if ( bLocalUseExceptions ) {
   14902             :       CPLErr eclass = CPLGetLastErrorType();
   14903             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14904             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14905             :       }
   14906             :     }
   14907             : #endif
   14908             :   }
   14909           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   14910           9 :   {
   14911             :     /* %typemap(freearg) (const char *utf8_path) */
   14912           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14913             :   }
   14914           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; } }
   14915             :   return resultobj;
   14916           0 : fail:
   14917           0 :   {
   14918             :     /* %typemap(freearg) (const char *utf8_path) */
   14919           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14920             :   }
   14921             :   return NULL;
   14922             : }
   14923             : 
   14924             : 
   14925          23 : SWIGINTERN PyObject *_wrap_GetSignedURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14926          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14927          23 :   char *arg1 = (char *) 0 ;
   14928          23 :   char **arg2 = (char **) NULL ;
   14929          23 :   int bToFree1 = 0 ;
   14930          23 :   PyObject *swig_obj[2] ;
   14931          23 :   retStringAndCPLFree *result = 0 ;
   14932             :   
   14933          23 :   if (!SWIG_Python_UnpackTuple(args, "GetSignedURL", 1, 2, swig_obj)) SWIG_fail;
   14934          23 :   {
   14935             :     /* %typemap(in) (const char *utf8_path) */
   14936          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14937             :     {
   14938          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14939             :     }
   14940             :     else
   14941             :     {
   14942           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14943             :       
   14944             :     }
   14945          23 :     if (arg1 == NULL)
   14946             :     {
   14947           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14948           0 :       SWIG_fail;
   14949             :     }
   14950             :   }
   14951          23 :   if (swig_obj[1]) {
   14952           7 :     {
   14953             :       /* %typemap(in) char **dict */
   14954           7 :       arg2 = NULL;
   14955           7 :       if ( PySequence_Check( swig_obj[1] ) ) {
   14956           7 :         int bErr = FALSE;
   14957           7 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   14958           7 :         if ( bErr )
   14959             :         {
   14960           0 :           SWIG_fail;
   14961             :         }
   14962             :       }
   14963           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   14964           0 :         int bErr = FALSE;
   14965           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   14966           0 :         if ( bErr )
   14967             :         {
   14968           0 :           SWIG_fail;
   14969             :         }
   14970             :       }
   14971             :       else {
   14972           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14973           0 :         SWIG_fail;
   14974             :       }
   14975             :     }
   14976             :   }
   14977          23 :   {
   14978          23 :     if (!arg1) {
   14979          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14980             :     }
   14981             :   }
   14982          23 :   {
   14983          23 :     const int bLocalUseExceptions = GetUseExceptions();
   14984          23 :     if ( bLocalUseExceptions ) {
   14985           4 :       pushErrorHandler();
   14986             :     }
   14987          23 :     {
   14988          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14989          23 :       result = (retStringAndCPLFree *)wrapper_VSIGetSignedURL((char const *)arg1,arg2);
   14990          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14991             :     }
   14992          23 :     if ( bLocalUseExceptions ) {
   14993           4 :       popErrorHandler();
   14994             :     }
   14995             : #ifndef SED_HACKS
   14996             :     if ( bLocalUseExceptions ) {
   14997             :       CPLErr eclass = CPLGetLastErrorType();
   14998             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14999             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15000             :       }
   15001             :     }
   15002             : #endif
   15003             :   }
   15004          23 :   {
   15005             :     /* %typemap(out) (retStringAndCPLFree*) */
   15006          23 :     Py_XDECREF(resultobj);
   15007          23 :     if(result)
   15008             :     {
   15009          14 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   15010          14 :       CPLFree(result);
   15011             :     }
   15012             :     else
   15013             :     {
   15014           9 :       resultobj = Py_None;
   15015           9 :       Py_INCREF(resultobj);
   15016             :     }
   15017             :   }
   15018          23 :   {
   15019             :     /* %typemap(freearg) (const char *utf8_path) */
   15020          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   15021             :   }
   15022          23 :   {
   15023             :     /* %typemap(freearg) char **dict */
   15024          23 :     CSLDestroy( arg2 );
   15025             :   }
   15026          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; } }
   15027             :   return resultobj;
   15028           0 : fail:
   15029           0 :   {
   15030             :     /* %typemap(freearg) (const char *utf8_path) */
   15031           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15032             :   }
   15033           0 :   {
   15034             :     /* %typemap(freearg) char **dict */
   15035           0 :     CSLDestroy( arg2 );
   15036             :   }
   15037             :   return NULL;
   15038             : }
   15039             : 
   15040             : 
   15041           2 : SWIGINTERN PyObject *_wrap_GetFileSystemsPrefixes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15042           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15043           2 :   char **result = 0 ;
   15044             :   
   15045           2 :   if (!SWIG_Python_UnpackTuple(args, "GetFileSystemsPrefixes", 0, 0, 0)) SWIG_fail;
   15046           2 :   {
   15047           2 :     const int bLocalUseExceptions = GetUseExceptions();
   15048           2 :     if ( bLocalUseExceptions ) {
   15049           0 :       pushErrorHandler();
   15050             :     }
   15051           2 :     {
   15052           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15053           2 :       result = (char **)VSIGetFileSystemsPrefixes();
   15054           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15055             :     }
   15056           2 :     if ( bLocalUseExceptions ) {
   15057           0 :       popErrorHandler();
   15058             :     }
   15059             : #ifndef SED_HACKS
   15060             :     if ( bLocalUseExceptions ) {
   15061             :       CPLErr eclass = CPLGetLastErrorType();
   15062             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15063             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15064             :       }
   15065             :     }
   15066             : #endif
   15067             :   }
   15068           2 :   {
   15069             :     /* %typemap(out) char **CSL -> ( string ) */
   15070           2 :     bool bErr = false;
   15071           2 :     resultobj = CSLToList(result, &bErr);
   15072           2 :     CSLDestroy(result);
   15073           2 :     if( bErr ) {
   15074           0 :       SWIG_fail;
   15075             :     }
   15076             :   }
   15077           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; } }
   15078             :   return resultobj;
   15079             : fail:
   15080             :   return NULL;
   15081             : }
   15082             : 
   15083             : 
   15084          30 : SWIGINTERN PyObject *_wrap_GetFileSystemOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15085          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15086          30 :   char *arg1 = (char *) 0 ;
   15087          30 :   int bToFree1 = 0 ;
   15088          30 :   PyObject *swig_obj[1] ;
   15089          30 :   char *result = 0 ;
   15090             :   
   15091          30 :   if (!args) SWIG_fail;
   15092          30 :   swig_obj[0] = args;
   15093          30 :   {
   15094             :     /* %typemap(in) (const char *utf8_path) */
   15095          30 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15096             :     {
   15097          30 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15098             :     }
   15099             :     else
   15100             :     {
   15101           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15102             :       
   15103             :     }
   15104          30 :     if (arg1 == NULL)
   15105             :     {
   15106           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15107           0 :       SWIG_fail;
   15108             :     }
   15109             :   }
   15110          30 :   {
   15111          30 :     if (!arg1) {
   15112          30 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15113             :     }
   15114             :   }
   15115          30 :   {
   15116          30 :     const int bLocalUseExceptions = GetUseExceptions();
   15117          30 :     if ( bLocalUseExceptions ) {
   15118           0 :       pushErrorHandler();
   15119             :     }
   15120          30 :     {
   15121          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15122          30 :       result = (char *)VSIGetFileSystemOptions((char const *)arg1);
   15123          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15124             :     }
   15125          30 :     if ( bLocalUseExceptions ) {
   15126           0 :       popErrorHandler();
   15127             :     }
   15128             : #ifndef SED_HACKS
   15129             :     if ( bLocalUseExceptions ) {
   15130             :       CPLErr eclass = CPLGetLastErrorType();
   15131             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15132             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15133             :       }
   15134             :     }
   15135             : #endif
   15136             :   }
   15137          30 :   resultobj = SWIG_FromCharPtr((const char *)result);
   15138          30 :   {
   15139             :     /* %typemap(freearg) (const char *utf8_path) */
   15140          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   15141             :   }
   15142          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; } }
   15143             :   return resultobj;
   15144           0 : fail:
   15145           0 :   {
   15146             :     /* %typemap(freearg) (const char *utf8_path) */
   15147          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   15148             :   }
   15149             :   return NULL;
   15150             : }
   15151             : 
   15152             : 
   15153         277 : SWIGINTERN PyObject *VSILFILE_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15154         277 :   PyObject *obj;
   15155         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15156         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_VSILFILE, SWIG_NewClientData(obj));
   15157         277 :   return SWIG_Py_Void();
   15158             : }
   15159             : 
   15160         647 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15161         647 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15162         647 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15163         647 :   void *argp1 = 0 ;
   15164         647 :   int res1 = 0 ;
   15165         647 :   PyObject *swig_obj[1] ;
   15166         647 :   int result;
   15167             :   
   15168         647 :   if (!args) SWIG_fail;
   15169         647 :   swig_obj[0] = args;
   15170         647 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15171         647 :   if (!SWIG_IsOK(res1)) {
   15172           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15173             :   }
   15174         647 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15175         647 :   {
   15176         647 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15177         647 :     result = (int) ((arg1)->mode);
   15178         647 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15179             :   }
   15180         647 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15181         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; } }
   15182             :   return resultobj;
   15183             : fail:
   15184             :   return NULL;
   15185             : }
   15186             : 
   15187             : 
   15188        1568 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15189        1568 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15190        1568 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15191        1568 :   void *argp1 = 0 ;
   15192        1568 :   int res1 = 0 ;
   15193        1568 :   PyObject *swig_obj[1] ;
   15194        1568 :   GIntBig result;
   15195             :   
   15196        1568 :   if (!args) SWIG_fail;
   15197        1568 :   swig_obj[0] = args;
   15198        1568 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15199        1568 :   if (!SWIG_IsOK(res1)) {
   15200           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15201             :   }
   15202        1568 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15203        1568 :   {
   15204        1568 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15205        1568 :     result =  ((arg1)->size);
   15206        1568 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15207             :   }
   15208        1568 :   {
   15209        1568 :     resultobj = PyLong_FromLongLong(result);
   15210             :   }
   15211        1568 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15212             :   return resultobj;
   15213             : fail:
   15214             :   return NULL;
   15215             : }
   15216             : 
   15217             : 
   15218         124 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15219         124 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15220         124 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15221         124 :   void *argp1 = 0 ;
   15222         124 :   int res1 = 0 ;
   15223         124 :   PyObject *swig_obj[1] ;
   15224         124 :   GIntBig result;
   15225             :   
   15226         124 :   if (!args) SWIG_fail;
   15227         124 :   swig_obj[0] = args;
   15228         124 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15229         124 :   if (!SWIG_IsOK(res1)) {
   15230           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15231             :   }
   15232         124 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15233         124 :   {
   15234         124 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15235         124 :     result =  ((arg1)->mtime);
   15236         124 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15237             :   }
   15238         124 :   {
   15239         124 :     resultobj = PyLong_FromLongLong(result);
   15240             :   }
   15241         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; } }
   15242             :   return resultobj;
   15243             : fail:
   15244             :   return NULL;
   15245             : }
   15246             : 
   15247             : 
   15248           0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15249           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15250           0 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15251           0 :   void *argp1 = 0 ;
   15252           0 :   int res1 = 0 ;
   15253           0 :   PyObject *swig_obj[1] ;
   15254           0 :   StatBuf *result = 0 ;
   15255             :   
   15256           0 :   if (!args) SWIG_fail;
   15257           0 :   swig_obj[0] = args;
   15258           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15259           0 :   if (!SWIG_IsOK(res1)) {
   15260           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15261             :   }
   15262           0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15263           0 :   {
   15264           0 :     const int bLocalUseExceptions = GetUseExceptions();
   15265           0 :     if ( bLocalUseExceptions ) {
   15266           0 :       pushErrorHandler();
   15267             :     }
   15268           0 :     {
   15269           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15270           0 :       result = (StatBuf *)new_StatBuf(arg1);
   15271           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15272             :     }
   15273           0 :     if ( bLocalUseExceptions ) {
   15274           0 :       popErrorHandler();
   15275             :     }
   15276             : #ifndef SED_HACKS
   15277             :     if ( bLocalUseExceptions ) {
   15278             :       CPLErr eclass = CPLGetLastErrorType();
   15279             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15280             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15281             :       }
   15282             :     }
   15283             : #endif
   15284             :   }
   15285           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
   15286           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; } }
   15287             :   return resultobj;
   15288             : fail:
   15289             :   return NULL;
   15290             : }
   15291             : 
   15292             : 
   15293        4846 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15294        4846 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15295        4846 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15296        4846 :   void *argp1 = 0 ;
   15297        4846 :   int res1 = 0 ;
   15298        4846 :   PyObject *swig_obj[1] ;
   15299             :   
   15300        4846 :   if (!args) SWIG_fail;
   15301        4846 :   swig_obj[0] = args;
   15302        4846 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
   15303        4846 :   if (!SWIG_IsOK(res1)) {
   15304           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15305             :   }
   15306        4846 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15307        4846 :   {
   15308        4846 :     const int bLocalUseExceptions = GetUseExceptions();
   15309        4846 :     if ( bLocalUseExceptions ) {
   15310        3297 :       pushErrorHandler();
   15311             :     }
   15312        4846 :     {
   15313        4846 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15314        4846 :       delete_StatBuf(arg1);
   15315        4846 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15316             :     }
   15317        4846 :     if ( bLocalUseExceptions ) {
   15318        3297 :       popErrorHandler();
   15319             :     }
   15320             : #ifndef SED_HACKS
   15321             :     if ( bLocalUseExceptions ) {
   15322             :       CPLErr eclass = CPLGetLastErrorType();
   15323             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15324             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15325             :       }
   15326             :     }
   15327             : #endif
   15328             :   }
   15329        4846 :   resultobj = SWIG_Py_Void();
   15330        4846 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15331             :   return resultobj;
   15332             : fail:
   15333             :   return NULL;
   15334             : }
   15335             : 
   15336             : 
   15337        2529 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15338        2529 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15339        2529 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15340        2529 :   void *argp1 = 0 ;
   15341        2529 :   int res1 = 0 ;
   15342        2529 :   PyObject *swig_obj[1] ;
   15343        2529 :   int result;
   15344             :   
   15345        2529 :   if (!args) SWIG_fail;
   15346        2529 :   swig_obj[0] = args;
   15347        2529 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15348        2529 :   if (!SWIG_IsOK(res1)) {
   15349           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
   15350             :   }
   15351        2529 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15352        2529 :   {
   15353        2529 :     const int bLocalUseExceptions = GetUseExceptions();
   15354        2529 :     if ( bLocalUseExceptions ) {
   15355        2524 :       pushErrorHandler();
   15356             :     }
   15357        2529 :     {
   15358        2529 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15359        2529 :       result = (int)StatBuf_IsDirectory(arg1);
   15360        2529 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15361             :     }
   15362        2529 :     if ( bLocalUseExceptions ) {
   15363        2524 :       popErrorHandler();
   15364             :     }
   15365             : #ifndef SED_HACKS
   15366             :     if ( bLocalUseExceptions ) {
   15367             :       CPLErr eclass = CPLGetLastErrorType();
   15368             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15369             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15370             :       }
   15371             :     }
   15372             : #endif
   15373             :   }
   15374        2529 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15375        2529 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15376             :   return resultobj;
   15377             : fail:
   15378             :   return NULL;
   15379             : }
   15380             : 
   15381             : 
   15382         277 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15383         277 :   PyObject *obj;
   15384         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15385         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
   15386         277 :   return SWIG_Py_Void();
   15387             : }
   15388             : 
   15389           0 : SWIGINTERN PyObject *StatBuf_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15390           0 :   return SWIG_Python_InitShadowInstance(args);
   15391             : }
   15392             : 
   15393        6370 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15394        6370 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15395        6370 :   char *arg1 = (char *) 0 ;
   15396        6370 :   StatBuf *arg2 = (StatBuf *) 0 ;
   15397        6370 :   int arg3 = (int) 0 ;
   15398        6370 :   int bToFree1 = 0 ;
   15399        6370 :   StatBuf sStatBuf2 ;
   15400        6370 :   int val3 ;
   15401        6370 :   int ecode3 = 0 ;
   15402        6370 :   PyObject *swig_obj[2] ;
   15403        6370 :   int result;
   15404             :   
   15405        6370 :   {
   15406             :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
   15407        6370 :     arg2 = &sStatBuf2;
   15408             :   }
   15409        6370 :   if (!SWIG_Python_UnpackTuple(args, "VSIStatL", 1, 2, swig_obj)) SWIG_fail;
   15410        6370 :   {
   15411             :     /* %typemap(in) (const char *utf8_path) */
   15412        6370 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15413             :     {
   15414        5462 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15415             :     }
   15416             :     else
   15417             :     {
   15418         908 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15419             :       
   15420             :     }
   15421        6370 :     if (arg1 == NULL)
   15422             :     {
   15423           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15424           0 :       SWIG_fail;
   15425             :     }
   15426             :   }
   15427        6370 :   if (swig_obj[1]) {
   15428        2558 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   15429        2558 :     if (!SWIG_IsOK(ecode3)) {
   15430           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
   15431             :     } 
   15432             :     arg3 = static_cast< int >(val3);
   15433             :   }
   15434        6370 :   {
   15435        6370 :     if (!arg1) {
   15436        6370 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15437             :     }
   15438             :   }
   15439        6370 :   {
   15440        6370 :     const int bLocalUseExceptions = GetUseExceptions();
   15441        6370 :     if ( bLocalUseExceptions ) {
   15442        3722 :       pushErrorHandler();
   15443             :     }
   15444        6370 :     {
   15445        6370 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15446        6370 :       result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
   15447        6370 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15448             :     }
   15449        6370 :     if ( bLocalUseExceptions ) {
   15450        3722 :       popErrorHandler();
   15451             :     }
   15452             : #ifndef SED_HACKS
   15453             :     if ( bLocalUseExceptions ) {
   15454             :       CPLErr eclass = CPLGetLastErrorType();
   15455             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15456             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15457             :       }
   15458             :     }
   15459             : #endif
   15460             :   }
   15461        6370 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15462        6370 :   {
   15463             :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
   15464        6370 :     Py_DECREF(resultobj);
   15465        6370 :     if (result == 0)
   15466        4846 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
   15467             :     else
   15468             :     {
   15469        1524 :       resultobj = Py_None;
   15470        1524 :       Py_INCREF(resultobj);
   15471             :     }
   15472             :   }
   15473        6370 :   {
   15474             :     /* %typemap(freearg) (const char *utf8_path) */
   15475        6370 :     GDALPythonFreeCStr(arg1, bToFree1);
   15476             :   }
   15477        6602 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15478             :   return resultobj;
   15479           0 : fail:
   15480           0 :   {
   15481             :     /* %typemap(freearg) (const char *utf8_path) */
   15482        6370 :     GDALPythonFreeCStr(arg1, bToFree1);
   15483             :   }
   15484             :   return NULL;
   15485             : }
   15486             : 
   15487             : 
   15488          35 : SWIGINTERN PyObject *_wrap_GetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15489          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15490          35 :   char *arg1 = (char *) 0 ;
   15491          35 :   char *arg2 = (char *) 0 ;
   15492          35 :   char **arg3 = (char **) NULL ;
   15493          35 :   int bToFree1 = 0 ;
   15494          35 :   int res2 ;
   15495          35 :   char *buf2 = 0 ;
   15496          35 :   int alloc2 = 0 ;
   15497          35 :   PyObject *swig_obj[3] ;
   15498          35 :   char **result = 0 ;
   15499             :   
   15500          35 :   if (!SWIG_Python_UnpackTuple(args, "GetFileMetadata", 2, 3, swig_obj)) SWIG_fail;
   15501          35 :   {
   15502             :     /* %typemap(in) (const char *utf8_path) */
   15503          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15504             :     {
   15505          35 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15506             :     }
   15507             :     else
   15508             :     {
   15509           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15510             :       
   15511             :     }
   15512          35 :     if (arg1 == NULL)
   15513             :     {
   15514           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15515           0 :       SWIG_fail;
   15516             :     }
   15517             :   }
   15518          35 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15519          35 :   if (!SWIG_IsOK(res2)) {
   15520           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetFileMetadata" "', argument " "2"" of type '" "char const *""'");
   15521             :   }
   15522          35 :   arg2 = reinterpret_cast< char * >(buf2);
   15523          35 :   if (swig_obj[2]) {
   15524           0 :     {
   15525             :       /* %typemap(in) char **dict */
   15526           0 :       arg3 = NULL;
   15527           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   15528           0 :         int bErr = FALSE;
   15529           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   15530           0 :         if ( bErr )
   15531             :         {
   15532           0 :           SWIG_fail;
   15533             :         }
   15534             :       }
   15535           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   15536           0 :         int bErr = FALSE;
   15537           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   15538           0 :         if ( bErr )
   15539             :         {
   15540           0 :           SWIG_fail;
   15541             :         }
   15542             :       }
   15543             :       else {
   15544           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15545           0 :         SWIG_fail;
   15546             :       }
   15547             :     }
   15548             :   }
   15549          35 :   {
   15550          35 :     if (!arg1) {
   15551          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15552             :     }
   15553             :   }
   15554          35 :   {
   15555          35 :     const int bLocalUseExceptions = GetUseExceptions();
   15556          35 :     if ( bLocalUseExceptions ) {
   15557          16 :       pushErrorHandler();
   15558             :     }
   15559          35 :     {
   15560          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15561          35 :       result = (char **)VSIGetFileMetadata((char const *)arg1,(char const *)arg2,arg3);
   15562          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15563             :     }
   15564          35 :     if ( bLocalUseExceptions ) {
   15565          16 :       popErrorHandler();
   15566             :     }
   15567             : #ifndef SED_HACKS
   15568             :     if ( bLocalUseExceptions ) {
   15569             :       CPLErr eclass = CPLGetLastErrorType();
   15570             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15571             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15572             :       }
   15573             :     }
   15574             : #endif
   15575             :   }
   15576          35 :   {
   15577             :     /* %typemap(out) char **dict */
   15578          35 :     resultobj = GetCSLStringAsPyDict(result, true);
   15579             :   }
   15580          35 :   {
   15581             :     /* %typemap(freearg) (const char *utf8_path) */
   15582          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   15583             :   }
   15584          35 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15585          35 :   {
   15586             :     /* %typemap(freearg) char **dict */
   15587          35 :     CSLDestroy( arg3 );
   15588             :   }
   15589          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; } }
   15590             :   return resultobj;
   15591           0 : fail:
   15592           0 :   {
   15593             :     /* %typemap(freearg) (const char *utf8_path) */
   15594           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15595             :   }
   15596           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15597           0 :   {
   15598             :     /* %typemap(freearg) char **dict */
   15599           0 :     CSLDestroy( arg3 );
   15600             :   }
   15601             :   return NULL;
   15602             : }
   15603             : 
   15604             : 
   15605          17 : SWIGINTERN PyObject *_wrap_SetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15606          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15607          17 :   char *arg1 = (char *) 0 ;
   15608          17 :   char **arg2 = (char **) 0 ;
   15609          17 :   char *arg3 = (char *) 0 ;
   15610          17 :   char **arg4 = (char **) NULL ;
   15611          17 :   int bToFree1 = 0 ;
   15612          17 :   int res3 ;
   15613          17 :   char *buf3 = 0 ;
   15614          17 :   int alloc3 = 0 ;
   15615          17 :   PyObject *swig_obj[4] ;
   15616          17 :   bool result;
   15617             :   
   15618          17 :   if (!SWIG_Python_UnpackTuple(args, "SetFileMetadata", 3, 4, swig_obj)) SWIG_fail;
   15619          17 :   {
   15620             :     /* %typemap(in) (const char *utf8_path) */
   15621          17 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15622             :     {
   15623          17 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15624             :     }
   15625             :     else
   15626             :     {
   15627           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15628             :       
   15629             :     }
   15630          17 :     if (arg1 == NULL)
   15631             :     {
   15632           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15633           0 :       SWIG_fail;
   15634             :     }
   15635             :   }
   15636          17 :   {
   15637             :     /* %typemap(in) char **dict */
   15638          17 :     arg2 = NULL;
   15639          17 :     if ( PySequence_Check( swig_obj[1] ) ) {
   15640           0 :       int bErr = FALSE;
   15641           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   15642           0 :       if ( bErr )
   15643             :       {
   15644           0 :         SWIG_fail;
   15645             :       }
   15646             :     }
   15647          17 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   15648          17 :       int bErr = FALSE;
   15649          17 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   15650          17 :       if ( bErr )
   15651             :       {
   15652           0 :         SWIG_fail;
   15653             :       }
   15654             :     }
   15655             :     else {
   15656           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15657           0 :       SWIG_fail;
   15658             :     }
   15659             :   }
   15660          17 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   15661          17 :   if (!SWIG_IsOK(res3)) {
   15662           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetFileMetadata" "', argument " "3"" of type '" "char const *""'");
   15663             :   }
   15664          17 :   arg3 = reinterpret_cast< char * >(buf3);
   15665          17 :   if (swig_obj[3]) {
   15666           1 :     {
   15667             :       /* %typemap(in) char **dict */
   15668           1 :       arg4 = NULL;
   15669           1 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15670           1 :         int bErr = FALSE;
   15671           1 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15672           1 :         if ( bErr )
   15673             :         {
   15674           0 :           SWIG_fail;
   15675             :         }
   15676             :       }
   15677           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15678           0 :         int bErr = FALSE;
   15679           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15680           0 :         if ( bErr )
   15681             :         {
   15682           0 :           SWIG_fail;
   15683             :         }
   15684             :       }
   15685             :       else {
   15686           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15687           0 :         SWIG_fail;
   15688             :       }
   15689             :     }
   15690             :   }
   15691          17 :   {
   15692          17 :     if (!arg1) {
   15693          17 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15694             :     }
   15695             :   }
   15696          17 :   {
   15697          17 :     const int bLocalUseExceptions = GetUseExceptions();
   15698          17 :     if ( bLocalUseExceptions ) {
   15699           0 :       pushErrorHandler();
   15700             :     }
   15701          17 :     {
   15702          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15703          17 :       result = (bool)VSISetFileMetadata((char const *)arg1,arg2,(char const *)arg3,arg4);
   15704          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15705             :     }
   15706          17 :     if ( bLocalUseExceptions ) {
   15707           0 :       popErrorHandler();
   15708             :     }
   15709             : #ifndef SED_HACKS
   15710             :     if ( bLocalUseExceptions ) {
   15711             :       CPLErr eclass = CPLGetLastErrorType();
   15712             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15713             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15714             :       }
   15715             :     }
   15716             : #endif
   15717             :   }
   15718          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15719          17 :   {
   15720             :     /* %typemap(freearg) (const char *utf8_path) */
   15721          17 :     GDALPythonFreeCStr(arg1, bToFree1);
   15722             :   }
   15723          17 :   {
   15724             :     /* %typemap(freearg) char **dict */
   15725          17 :     CSLDestroy( arg2 );
   15726             :   }
   15727          17 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15728          17 :   {
   15729             :     /* %typemap(freearg) char **dict */
   15730          17 :     CSLDestroy( arg4 );
   15731             :   }
   15732          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; } }
   15733             :   return resultobj;
   15734           0 : fail:
   15735           0 :   {
   15736             :     /* %typemap(freearg) (const char *utf8_path) */
   15737           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15738             :   }
   15739           0 :   {
   15740             :     /* %typemap(freearg) char **dict */
   15741           0 :     CSLDestroy( arg2 );
   15742             :   }
   15743           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15744           0 :   {
   15745             :     /* %typemap(freearg) char **dict */
   15746           0 :     CSLDestroy( arg4 );
   15747             :   }
   15748             :   return NULL;
   15749             : }
   15750             : 
   15751             : 
   15752        4593 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15753        4593 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15754        4593 :   char *arg1 = (char *) 0 ;
   15755        4593 :   char *arg2 = (char *) 0 ;
   15756        4593 :   int bToFree1 = 0 ;
   15757        4593 :   int res2 ;
   15758        4593 :   char *buf2 = 0 ;
   15759        4593 :   int alloc2 = 0 ;
   15760        4593 :   PyObject *swig_obj[2] ;
   15761        4593 :   VSILFILE *result = 0 ;
   15762             :   
   15763        4593 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenL", 2, 2, swig_obj)) SWIG_fail;
   15764        4593 :   {
   15765             :     /* %typemap(in) (const char *utf8_path) */
   15766        4593 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15767             :     {
   15768        3925 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15769             :     }
   15770             :     else
   15771             :     {
   15772         668 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15773             :       
   15774             :     }
   15775        4593 :     if (arg1 == NULL)
   15776             :     {
   15777           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15778           0 :       SWIG_fail;
   15779             :     }
   15780             :   }
   15781        4593 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15782        4593 :   if (!SWIG_IsOK(res2)) {
   15783           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
   15784             :   }
   15785        4593 :   arg2 = reinterpret_cast< char * >(buf2);
   15786        4593 :   {
   15787        4593 :     if (!arg1) {
   15788        4593 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15789             :     }
   15790             :   }
   15791        4593 :   {
   15792        4593 :     const int bLocalUseExceptions = GetUseExceptions();
   15793        4593 :     if ( bLocalUseExceptions ) {
   15794         903 :       pushErrorHandler();
   15795             :     }
   15796        4593 :     {
   15797        4593 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15798        4593 :       result = (VSILFILE *)wrapper_VSIFOpenL((char const *)arg1,(char const *)arg2);
   15799        4593 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15800             :     }
   15801        4593 :     if ( bLocalUseExceptions ) {
   15802         903 :       popErrorHandler();
   15803             :     }
   15804             : #ifndef SED_HACKS
   15805             :     if ( bLocalUseExceptions ) {
   15806             :       CPLErr eclass = CPLGetLastErrorType();
   15807             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15808             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15809             :       }
   15810             :     }
   15811             : #endif
   15812             :   }
   15813        4593 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15814        4593 :   {
   15815             :     /* %typemap(freearg) (const char *utf8_path) */
   15816        4593 :     GDALPythonFreeCStr(arg1, bToFree1);
   15817             :   }
   15818        4593 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15819        4649 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15820             :   return resultobj;
   15821           0 : fail:
   15822           0 :   {
   15823             :     /* %typemap(freearg) (const char *utf8_path) */
   15824           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15825             :   }
   15826           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15827             :   return NULL;
   15828             : }
   15829             : 
   15830             : 
   15831         427 : SWIGINTERN PyObject *_wrap_VSIFOpenExL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15832         427 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15833         427 :   char *arg1 = (char *) 0 ;
   15834         427 :   char *arg2 = (char *) 0 ;
   15835         427 :   int arg3 = (int) FALSE ;
   15836         427 :   char **arg4 = (char **) NULL ;
   15837         427 :   int bToFree1 = 0 ;
   15838         427 :   int res2 ;
   15839         427 :   char *buf2 = 0 ;
   15840         427 :   int alloc2 = 0 ;
   15841         427 :   int val3 ;
   15842         427 :   int ecode3 = 0 ;
   15843         427 :   PyObject *swig_obj[4] ;
   15844         427 :   VSILFILE *result = 0 ;
   15845             :   
   15846         427 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenExL", 2, 4, swig_obj)) SWIG_fail;
   15847         427 :   {
   15848             :     /* %typemap(in) (const char *utf8_path) */
   15849         427 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15850             :     {
   15851         255 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15852             :     }
   15853             :     else
   15854             :     {
   15855         172 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15856             :       
   15857             :     }
   15858         427 :     if (arg1 == NULL)
   15859             :     {
   15860           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15861           0 :       SWIG_fail;
   15862             :     }
   15863             :   }
   15864         427 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15865         427 :   if (!SWIG_IsOK(res2)) {
   15866           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenExL" "', argument " "2"" of type '" "char const *""'");
   15867             :   }
   15868         427 :   arg2 = reinterpret_cast< char * >(buf2);
   15869         427 :   if (swig_obj[2]) {
   15870         427 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   15871         427 :     if (!SWIG_IsOK(ecode3)) {
   15872           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFOpenExL" "', argument " "3"" of type '" "int""'");
   15873             :     } 
   15874             :     arg3 = static_cast< int >(val3);
   15875             :   }
   15876         427 :   if (swig_obj[3]) {
   15877         245 :     {
   15878             :       /* %typemap(in) char **dict */
   15879         245 :       arg4 = NULL;
   15880         245 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15881          21 :         int bErr = FALSE;
   15882          21 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15883          21 :         if ( bErr )
   15884             :         {
   15885           0 :           SWIG_fail;
   15886             :         }
   15887             :       }
   15888         224 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15889         224 :         int bErr = FALSE;
   15890         224 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15891         224 :         if ( bErr )
   15892             :         {
   15893           0 :           SWIG_fail;
   15894             :         }
   15895             :       }
   15896             :       else {
   15897           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15898           0 :         SWIG_fail;
   15899             :       }
   15900             :     }
   15901             :   }
   15902         427 :   {
   15903         427 :     if (!arg1) {
   15904         427 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15905             :     }
   15906             :   }
   15907         427 :   {
   15908         427 :     const int bLocalUseExceptions = GetUseExceptions();
   15909         427 :     if ( bLocalUseExceptions ) {
   15910         225 :       pushErrorHandler();
   15911             :     }
   15912         427 :     {
   15913         427 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15914         427 :       result = (VSILFILE *)wrapper_VSIFOpenExL((char const *)arg1,(char const *)arg2,arg3,arg4);
   15915         427 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15916             :     }
   15917         427 :     if ( bLocalUseExceptions ) {
   15918         225 :       popErrorHandler();
   15919             :     }
   15920             : #ifndef SED_HACKS
   15921             :     if ( bLocalUseExceptions ) {
   15922             :       CPLErr eclass = CPLGetLastErrorType();
   15923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15925             :       }
   15926             :     }
   15927             : #endif
   15928             :   }
   15929         427 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15930         427 :   {
   15931             :     /* %typemap(freearg) (const char *utf8_path) */
   15932         427 :     GDALPythonFreeCStr(arg1, bToFree1);
   15933             :   }
   15934         427 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15935         427 :   {
   15936             :     /* %typemap(freearg) char **dict */
   15937         427 :     CSLDestroy( arg4 );
   15938             :   }
   15939         429 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15940             :   return resultobj;
   15941           0 : fail:
   15942           0 :   {
   15943             :     /* %typemap(freearg) (const char *utf8_path) */
   15944           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15945             :   }
   15946           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15947           0 :   {
   15948             :     /* %typemap(freearg) char **dict */
   15949           0 :     CSLDestroy( arg4 );
   15950             :   }
   15951             :   return NULL;
   15952             : }
   15953             : 
   15954             : 
   15955          40 : SWIGINTERN PyObject *_wrap_VSIFEofL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15956          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15957          40 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15958          40 :   void *argp1 = 0 ;
   15959          40 :   int res1 = 0 ;
   15960          40 :   PyObject *swig_obj[1] ;
   15961          40 :   int result;
   15962             :   
   15963          40 :   if (!args) SWIG_fail;
   15964          40 :   swig_obj[0] = args;
   15965          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15966          40 :   if (!SWIG_IsOK(res1)) {
   15967           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFEofL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15968             :   }
   15969          40 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15970          40 :   {
   15971          40 :     if (!arg1) {
   15972           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15973             :     }
   15974             :   }
   15975          40 :   {
   15976          40 :     const int bLocalUseExceptions = GetUseExceptions();
   15977          40 :     if ( bLocalUseExceptions ) {
   15978          11 :       pushErrorHandler();
   15979             :     }
   15980          40 :     {
   15981          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15982          40 :       result = (int)VSIFEofL(arg1);
   15983          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15984             :     }
   15985          40 :     if ( bLocalUseExceptions ) {
   15986          11 :       popErrorHandler();
   15987             :     }
   15988             : #ifndef SED_HACKS
   15989             :     if ( bLocalUseExceptions ) {
   15990             :       CPLErr eclass = CPLGetLastErrorType();
   15991             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15992             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15993             :       }
   15994             :     }
   15995             : #endif
   15996             :   }
   15997          40 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15998          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; } }
   15999             :   return resultobj;
   16000             : fail:
   16001             :   return NULL;
   16002             : }
   16003             : 
   16004             : 
   16005        1653 : SWIGINTERN PyObject *_wrap_VSIFErrorL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16006        1653 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16007        1653 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16008        1653 :   void *argp1 = 0 ;
   16009        1653 :   int res1 = 0 ;
   16010        1653 :   PyObject *swig_obj[1] ;
   16011        1653 :   int result;
   16012             :   
   16013        1653 :   if (!args) SWIG_fail;
   16014        1653 :   swig_obj[0] = args;
   16015        1653 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16016        1653 :   if (!SWIG_IsOK(res1)) {
   16017           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFErrorL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16018             :   }
   16019        1653 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16020        1653 :   {
   16021        1653 :     if (!arg1) {
   16022           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16023             :     }
   16024             :   }
   16025        1653 :   {
   16026        1653 :     const int bLocalUseExceptions = GetUseExceptions();
   16027        1653 :     if ( bLocalUseExceptions ) {
   16028          10 :       pushErrorHandler();
   16029             :     }
   16030        1653 :     {
   16031        1653 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16032        1653 :       result = (int)VSIFErrorL(arg1);
   16033        1653 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16034             :     }
   16035        1653 :     if ( bLocalUseExceptions ) {
   16036          10 :       popErrorHandler();
   16037             :     }
   16038             : #ifndef SED_HACKS
   16039             :     if ( bLocalUseExceptions ) {
   16040             :       CPLErr eclass = CPLGetLastErrorType();
   16041             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16042             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16043             :       }
   16044             :     }
   16045             : #endif
   16046             :   }
   16047        1653 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16048        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; } }
   16049             :   return resultobj;
   16050             : fail:
   16051             :   return NULL;
   16052             : }
   16053             : 
   16054             : 
   16055           5 : SWIGINTERN PyObject *_wrap_VSIFClearErrL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16056           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16057           5 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16058           5 :   void *argp1 = 0 ;
   16059           5 :   int res1 = 0 ;
   16060           5 :   PyObject *swig_obj[1] ;
   16061             :   
   16062           5 :   if (!args) SWIG_fail;
   16063           5 :   swig_obj[0] = args;
   16064           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16065           5 :   if (!SWIG_IsOK(res1)) {
   16066           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFClearErrL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16067             :   }
   16068           5 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16069           5 :   {
   16070           5 :     if (!arg1) {
   16071           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16072             :     }
   16073             :   }
   16074           5 :   {
   16075           5 :     const int bLocalUseExceptions = GetUseExceptions();
   16076           5 :     if ( bLocalUseExceptions ) {
   16077           1 :       pushErrorHandler();
   16078             :     }
   16079           5 :     {
   16080           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16081           5 :       VSIFClearErrL(arg1);
   16082           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16083             :     }
   16084           5 :     if ( bLocalUseExceptions ) {
   16085           1 :       popErrorHandler();
   16086             :     }
   16087             : #ifndef SED_HACKS
   16088             :     if ( bLocalUseExceptions ) {
   16089             :       CPLErr eclass = CPLGetLastErrorType();
   16090             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16091             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16092             :       }
   16093             :     }
   16094             : #endif
   16095             :   }
   16096           5 :   resultobj = SWIG_Py_Void();
   16097           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; } }
   16098             :   return resultobj;
   16099             : fail:
   16100             :   return NULL;
   16101             : }
   16102             : 
   16103             : 
   16104           3 : SWIGINTERN PyObject *_wrap_VSIFFlushL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16105           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16106           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16107           3 :   void *argp1 = 0 ;
   16108           3 :   int res1 = 0 ;
   16109           3 :   PyObject *swig_obj[1] ;
   16110           3 :   int result;
   16111             :   
   16112           3 :   if (!args) SWIG_fail;
   16113           3 :   swig_obj[0] = args;
   16114           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16115           3 :   if (!SWIG_IsOK(res1)) {
   16116           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFFlushL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16117             :   }
   16118           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16119           3 :   {
   16120           3 :     if (!arg1) {
   16121           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16122             :     }
   16123             :   }
   16124           3 :   {
   16125           3 :     const int bLocalUseExceptions = GetUseExceptions();
   16126           3 :     if ( bLocalUseExceptions ) {
   16127           0 :       pushErrorHandler();
   16128             :     }
   16129           3 :     {
   16130           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16131           3 :       result = (int)VSIFFlushL(arg1);
   16132           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16133             :     }
   16134           3 :     if ( bLocalUseExceptions ) {
   16135           0 :       popErrorHandler();
   16136             :     }
   16137             : #ifndef SED_HACKS
   16138             :     if ( bLocalUseExceptions ) {
   16139             :       CPLErr eclass = CPLGetLastErrorType();
   16140             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16141             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16142             :       }
   16143             :     }
   16144             : #endif
   16145             :   }
   16146           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16147           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; } }
   16148             :   return resultobj;
   16149             : fail:
   16150             :   return NULL;
   16151             : }
   16152             : 
   16153             : 
   16154        4700 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16155        4700 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16156        4700 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16157        4700 :   void *argp1 = 0 ;
   16158        4700 :   int res1 = 0 ;
   16159        4700 :   PyObject *swig_obj[1] ;
   16160        4700 :   VSI_RETVAL result;
   16161             :   
   16162        4700 :   if (!args) SWIG_fail;
   16163        4700 :   swig_obj[0] = args;
   16164        4700 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16165        4700 :   if (!SWIG_IsOK(res1)) {
   16166           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16167             :   }
   16168        4700 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16169        4700 :   {
   16170        4700 :     if (!arg1) {
   16171           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16172             :     }
   16173             :   }
   16174        4700 :   {
   16175        4700 :     const int bLocalUseExceptions = GetUseExceptions();
   16176        4700 :     if ( bLocalUseExceptions ) {
   16177        1052 :       pushErrorHandler();
   16178             :     }
   16179        4700 :     {
   16180        4700 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16181        4700 :       result = VSIFCloseL(arg1);
   16182        4700 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16183             :     }
   16184        4700 :     if ( bLocalUseExceptions ) {
   16185        1052 :       popErrorHandler();
   16186             :     }
   16187             : #ifndef SED_HACKS
   16188             :     if ( bLocalUseExceptions ) {
   16189             :       CPLErr eclass = CPLGetLastErrorType();
   16190             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16191             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16192             :       }
   16193             :     }
   16194             : #endif
   16195             :   }
   16196        4700 :   {
   16197             :     /* %typemap(out) VSI_RETVAL */
   16198        4779 :     if ( result != 0 && GetUseExceptions()) {
   16199           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   16200           0 :       if( pszMessage[0] != '\0' )
   16201           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   16202             :       else
   16203           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   16204           0 :       SWIG_fail;
   16205             :     }
   16206             :   }
   16207        4700 :   {
   16208             :     /* %typemap(ret) VSI_RETVAL */
   16209        4700 :     resultobj = PyInt_FromLong( result );
   16210             :   }
   16211        4700 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16212             :   return resultobj;
   16213             : fail:
   16214             :   return NULL;
   16215             : }
   16216             : 
   16217             : 
   16218       65964 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16219       65964 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16220       65964 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16221       65964 :   GIntBig arg2 ;
   16222       65964 :   int arg3 ;
   16223       65964 :   void *argp1 = 0 ;
   16224       65964 :   int res1 = 0 ;
   16225       65964 :   int val3 ;
   16226       65964 :   int ecode3 = 0 ;
   16227       65964 :   PyObject *swig_obj[3] ;
   16228       65964 :   int result;
   16229             :   
   16230       65964 :   if (!SWIG_Python_UnpackTuple(args, "VSIFSeekL", 3, 3, swig_obj)) SWIG_fail;
   16231       65964 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16232       65964 :   if (!SWIG_IsOK(res1)) {
   16233           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16234             :   }
   16235       65964 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16236       65964 :   {
   16237       65964 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16238             :   }
   16239       65964 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   16240       65964 :   if (!SWIG_IsOK(ecode3)) {
   16241           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
   16242             :   } 
   16243       65964 :   arg3 = static_cast< int >(val3);
   16244       65964 :   {
   16245       65964 :     if (!arg1) {
   16246           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16247             :     }
   16248             :   }
   16249       65964 :   {
   16250       65964 :     const int bLocalUseExceptions = GetUseExceptions();
   16251       65964 :     if ( bLocalUseExceptions ) {
   16252        2737 :       pushErrorHandler();
   16253             :     }
   16254       65964 :     {
   16255       65964 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16256       65964 :       result = (int)wrapper_VSIFSeekL(arg1,arg2,arg3);
   16257       65964 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16258             :     }
   16259       65964 :     if ( bLocalUseExceptions ) {
   16260        2737 :       popErrorHandler();
   16261             :     }
   16262             : #ifndef SED_HACKS
   16263             :     if ( bLocalUseExceptions ) {
   16264             :       CPLErr eclass = CPLGetLastErrorType();
   16265             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16266             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16267             :       }
   16268             :     }
   16269             : #endif
   16270             :   }
   16271       65964 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16272       65964 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16273             :   return resultobj;
   16274             : fail:
   16275             :   return NULL;
   16276             : }
   16277             : 
   16278             : 
   16279         895 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16280         895 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16281         895 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16282         895 :   void *argp1 = 0 ;
   16283         895 :   int res1 = 0 ;
   16284         895 :   PyObject *swig_obj[1] ;
   16285         895 :   GIntBig result;
   16286             :   
   16287         895 :   if (!args) SWIG_fail;
   16288         895 :   swig_obj[0] = args;
   16289         895 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16290         895 :   if (!SWIG_IsOK(res1)) {
   16291           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16292             :   }
   16293         895 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16294         895 :   {
   16295         895 :     if (!arg1) {
   16296           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16297             :     }
   16298             :   }
   16299         895 :   {
   16300         895 :     const int bLocalUseExceptions = GetUseExceptions();
   16301         895 :     if ( bLocalUseExceptions ) {
   16302         666 :       pushErrorHandler();
   16303             :     }
   16304         895 :     {
   16305         895 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16306         895 :       result = VSIFTellL(arg1);
   16307         895 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16308             :     }
   16309         895 :     if ( bLocalUseExceptions ) {
   16310         666 :       popErrorHandler();
   16311             :     }
   16312             : #ifndef SED_HACKS
   16313             :     if ( bLocalUseExceptions ) {
   16314             :       CPLErr eclass = CPLGetLastErrorType();
   16315             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16316             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16317             :       }
   16318             :     }
   16319             : #endif
   16320             :   }
   16321         895 :   {
   16322         895 :     resultobj = PyLong_FromLongLong(result);
   16323             :   }
   16324         895 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16325             :   return resultobj;
   16326             : fail:
   16327             :   return NULL;
   16328             : }
   16329             : 
   16330             : 
   16331          37 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16332          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16333          37 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16334          37 :   GIntBig arg2 ;
   16335          37 :   void *argp1 = 0 ;
   16336          37 :   int res1 = 0 ;
   16337          37 :   PyObject *swig_obj[2] ;
   16338          37 :   int result;
   16339             :   
   16340          37 :   if (!SWIG_Python_UnpackTuple(args, "VSIFTruncateL", 2, 2, swig_obj)) SWIG_fail;
   16341          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16342          37 :   if (!SWIG_IsOK(res1)) {
   16343           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16344             :   }
   16345          37 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16346          37 :   {
   16347          37 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16348             :   }
   16349          37 :   {
   16350          37 :     if (!arg1) {
   16351           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16352             :     }
   16353             :   }
   16354          37 :   {
   16355          37 :     const int bLocalUseExceptions = GetUseExceptions();
   16356          37 :     if ( bLocalUseExceptions ) {
   16357          16 :       pushErrorHandler();
   16358             :     }
   16359          37 :     {
   16360          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16361          37 :       result = (int)VSIFTruncateL(arg1,arg2);
   16362          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16363             :     }
   16364          37 :     if ( bLocalUseExceptions ) {
   16365          16 :       popErrorHandler();
   16366             :     }
   16367             : #ifndef SED_HACKS
   16368             :     if ( bLocalUseExceptions ) {
   16369             :       CPLErr eclass = CPLGetLastErrorType();
   16370             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16371             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16372             :       }
   16373             :     }
   16374             : #endif
   16375             :   }
   16376          37 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16377          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; } }
   16378             :   return resultobj;
   16379             : fail:
   16380             :   return NULL;
   16381             : }
   16382             : 
   16383             : 
   16384           2 : SWIGINTERN PyObject *_wrap_VSISupportsSparseFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16385           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16386           2 :   char *arg1 = (char *) 0 ;
   16387           2 :   int bToFree1 = 0 ;
   16388           2 :   PyObject *swig_obj[1] ;
   16389           2 :   int result;
   16390             :   
   16391           2 :   if (!args) SWIG_fail;
   16392           2 :   swig_obj[0] = args;
   16393           2 :   {
   16394             :     /* %typemap(in) (const char *utf8_path) */
   16395           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16396             :     {
   16397           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16398             :     }
   16399             :     else
   16400             :     {
   16401           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16402             :       
   16403             :     }
   16404           2 :     if (arg1 == NULL)
   16405             :     {
   16406           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16407           0 :       SWIG_fail;
   16408             :     }
   16409             :   }
   16410           2 :   {
   16411           2 :     if (!arg1) {
   16412           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16413             :     }
   16414             :   }
   16415           2 :   {
   16416           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16417           2 :     if ( bLocalUseExceptions ) {
   16418           0 :       pushErrorHandler();
   16419             :     }
   16420           2 :     {
   16421           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16422           2 :       result = (int)VSISupportsSparseFiles((char const *)arg1);
   16423           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16424             :     }
   16425           2 :     if ( bLocalUseExceptions ) {
   16426           0 :       popErrorHandler();
   16427             :     }
   16428             : #ifndef SED_HACKS
   16429             :     if ( bLocalUseExceptions ) {
   16430             :       CPLErr eclass = CPLGetLastErrorType();
   16431             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16432             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16433             :       }
   16434             :     }
   16435             : #endif
   16436             :   }
   16437           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16438           2 :   {
   16439             :     /* %typemap(freearg) (const char *utf8_path) */
   16440           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16441             :   }
   16442           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; } }
   16443             :   return resultobj;
   16444           0 : fail:
   16445           0 :   {
   16446             :     /* %typemap(freearg) (const char *utf8_path) */
   16447           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16448             :   }
   16449             :   return NULL;
   16450             : }
   16451             : 
   16452             : 
   16453           3 : SWIGINTERN PyObject *_wrap_VSIFGetRangeStatusL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16454           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16455           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16456           3 :   GIntBig arg2 ;
   16457           3 :   GIntBig arg3 ;
   16458           3 :   void *argp1 = 0 ;
   16459           3 :   int res1 = 0 ;
   16460           3 :   PyObject *swig_obj[3] ;
   16461           3 :   int result;
   16462             :   
   16463           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIFGetRangeStatusL", 3, 3, swig_obj)) SWIG_fail;
   16464           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16465           3 :   if (!SWIG_IsOK(res1)) {
   16466           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFGetRangeStatusL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16467             :   }
   16468           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16469           3 :   {
   16470           3 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16471             :   }
   16472           3 :   {
   16473           3 :     arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
   16474             :   }
   16475           3 :   {
   16476           3 :     if (!arg1) {
   16477           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16478             :     }
   16479             :   }
   16480           3 :   {
   16481           3 :     const int bLocalUseExceptions = GetUseExceptions();
   16482           3 :     if ( bLocalUseExceptions ) {
   16483           0 :       pushErrorHandler();
   16484             :     }
   16485           3 :     {
   16486           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16487           3 :       result = (int)VSIFGetRangeStatusL(arg1,arg2,arg3);
   16488           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16489             :     }
   16490           3 :     if ( bLocalUseExceptions ) {
   16491           0 :       popErrorHandler();
   16492             :     }
   16493             : #ifndef SED_HACKS
   16494             :     if ( bLocalUseExceptions ) {
   16495             :       CPLErr eclass = CPLGetLastErrorType();
   16496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16498             :       }
   16499             :     }
   16500             : #endif
   16501             :   }
   16502           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16503           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; } }
   16504             :   return resultobj;
   16505             : fail:
   16506             :   return NULL;
   16507             : }
   16508             : 
   16509             : 
   16510      346835 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16511      346835 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16512      346835 :   int arg1 ;
   16513      346835 :   char *arg2 = (char *) 0 ;
   16514      346835 :   int arg3 ;
   16515      346835 :   int arg4 ;
   16516      346835 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
   16517      346835 :   int alloc1 = 0 ;
   16518      346835 :   bool viewIsValid1 = false ;
   16519      346835 :   Py_buffer view1 ;
   16520      346835 :   int val3 ;
   16521      346835 :   int ecode3 = 0 ;
   16522      346835 :   int val4 ;
   16523      346835 :   int ecode4 = 0 ;
   16524      346835 :   void *argp5 = 0 ;
   16525      346835 :   int res5 = 0 ;
   16526      346835 :   PyObject *swig_obj[4] ;
   16527      346835 :   int result;
   16528             :   
   16529      346835 :   if (!SWIG_Python_UnpackTuple(args, "VSIFWriteL", 4, 4, swig_obj)) SWIG_fail;
   16530      346835 :   {
   16531             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   16532      346835 :     char* ptr = NULL;
   16533      346835 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   16534           0 :       SWIG_fail;
   16535             :     }
   16536      346835 :     arg2 = (char *)ptr;
   16537             :   }
   16538      346835 :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   16539      346835 :   if (!SWIG_IsOK(ecode3)) {
   16540           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
   16541             :   } 
   16542      346835 :   arg3 = static_cast< int >(val3);
   16543      346835 :   ecode4 = SWIG_AsVal_int(swig_obj[2], &val4);
   16544      346835 :   if (!SWIG_IsOK(ecode4)) {
   16545           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
   16546             :   } 
   16547      346835 :   arg4 = static_cast< int >(val4);
   16548      346835 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16549      346835 :   if (!SWIG_IsOK(res5)) {
   16550           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
   16551             :   }
   16552      346835 :   arg5 = reinterpret_cast< VSILFILE * >(argp5);
   16553      346835 :   {
   16554      346835 :     if (!arg5) {
   16555           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16556             :     }
   16557             :   }
   16558      346835 :   {
   16559      346835 :     const int bLocalUseExceptions = GetUseExceptions();
   16560      346835 :     if ( bLocalUseExceptions ) {
   16561      105893 :       pushErrorHandler();
   16562             :     }
   16563      346835 :     {
   16564      346835 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16565      346835 :       result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
   16566      346835 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16567             :     }
   16568      346835 :     if ( bLocalUseExceptions ) {
   16569      105893 :       popErrorHandler();
   16570             :     }
   16571             : #ifndef SED_HACKS
   16572             :     if ( bLocalUseExceptions ) {
   16573             :       CPLErr eclass = CPLGetLastErrorType();
   16574             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16575             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16576             :       }
   16577             :     }
   16578             : #endif
   16579             :   }
   16580      346835 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16581      346835 :   {
   16582             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16583      346835 :     if( viewIsValid1 ) {
   16584        6553 :       PyBuffer_Release(&view1);
   16585             :     }
   16586      340282 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16587      340282 :       delete[] arg2;
   16588             :     }
   16589             :   }
   16590      346835 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16591             :   return resultobj;
   16592           0 : fail:
   16593           0 :   {
   16594             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16595           0 :     if( viewIsValid1 ) {
   16596           0 :       PyBuffer_Release(&view1);
   16597             :     }
   16598      346835 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16599           0 :       delete[] arg2;
   16600             :     }
   16601             :   }
   16602             :   return NULL;
   16603             : }
   16604             : 
   16605             : 
   16606         213 : SWIGINTERN PyObject *_wrap_CPLReadLineL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16607         213 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16608         213 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16609         213 :   void *argp1 = 0 ;
   16610         213 :   int res1 = 0 ;
   16611         213 :   PyObject *swig_obj[1] ;
   16612         213 :   char *result = 0 ;
   16613             :   
   16614         213 :   if (!args) SWIG_fail;
   16615         213 :   swig_obj[0] = args;
   16616         213 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16617         213 :   if (!SWIG_IsOK(res1)) {
   16618           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLReadLineL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16619             :   }
   16620         213 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16621         213 :   {
   16622         213 :     if (!arg1) {
   16623           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16624             :     }
   16625             :   }
   16626         213 :   {
   16627         213 :     const int bLocalUseExceptions = GetUseExceptions();
   16628         213 :     if ( bLocalUseExceptions ) {
   16629          41 :       pushErrorHandler();
   16630             :     }
   16631         213 :     {
   16632         213 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16633         213 :       result = (char *)CPLReadLineL(arg1);
   16634         213 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16635             :     }
   16636         213 :     if ( bLocalUseExceptions ) {
   16637          41 :       popErrorHandler();
   16638             :     }
   16639             : #ifndef SED_HACKS
   16640             :     if ( bLocalUseExceptions ) {
   16641             :       CPLErr eclass = CPLGetLastErrorType();
   16642             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16643             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16644             :       }
   16645             :     }
   16646             : #endif
   16647             :   }
   16648         213 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16649         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; } }
   16650             :   return resultobj;
   16651             : fail:
   16652             :   return NULL;
   16653             : }
   16654             : 
   16655             : 
   16656         338 : SWIGINTERN PyObject *_wrap_VSICurlClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16657         338 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16658             :   
   16659         338 :   if (!SWIG_Python_UnpackTuple(args, "VSICurlClearCache", 0, 0, 0)) SWIG_fail;
   16660         338 :   {
   16661         338 :     const int bLocalUseExceptions = GetUseExceptions();
   16662         338 :     if ( bLocalUseExceptions ) {
   16663         114 :       pushErrorHandler();
   16664             :     }
   16665         338 :     {
   16666         338 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16667         338 :       VSICurlClearCache();
   16668         338 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16669             :     }
   16670         338 :     if ( bLocalUseExceptions ) {
   16671         114 :       popErrorHandler();
   16672             :     }
   16673             : #ifndef SED_HACKS
   16674             :     if ( bLocalUseExceptions ) {
   16675             :       CPLErr eclass = CPLGetLastErrorType();
   16676             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16677             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16678             :       }
   16679             :     }
   16680             : #endif
   16681             :   }
   16682         338 :   resultobj = SWIG_Py_Void();
   16683         338 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16684             :   return resultobj;
   16685           0 : fail:
   16686           0 :   return NULL;
   16687             : }
   16688             : 
   16689             : 
   16690           2 : SWIGINTERN PyObject *_wrap_VSICurlPartialClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16691           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16692           2 :   char *arg1 = (char *) 0 ;
   16693           2 :   int bToFree1 = 0 ;
   16694           2 :   PyObject *swig_obj[1] ;
   16695             :   
   16696           2 :   if (!args) SWIG_fail;
   16697           2 :   swig_obj[0] = args;
   16698           2 :   {
   16699             :     /* %typemap(in) (const char *utf8_path) */
   16700           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16701             :     {
   16702           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16703             :     }
   16704             :     else
   16705             :     {
   16706           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16707             :       
   16708             :     }
   16709           2 :     if (arg1 == NULL)
   16710             :     {
   16711           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16712           0 :       SWIG_fail;
   16713             :     }
   16714             :   }
   16715           2 :   {
   16716           2 :     if (!arg1) {
   16717           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16718             :     }
   16719             :   }
   16720           2 :   {
   16721           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16722           2 :     if ( bLocalUseExceptions ) {
   16723           0 :       pushErrorHandler();
   16724             :     }
   16725           2 :     {
   16726           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16727           2 :       VSICurlPartialClearCache((char const *)arg1);
   16728           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16729             :     }
   16730           2 :     if ( bLocalUseExceptions ) {
   16731           0 :       popErrorHandler();
   16732             :     }
   16733             : #ifndef SED_HACKS
   16734             :     if ( bLocalUseExceptions ) {
   16735             :       CPLErr eclass = CPLGetLastErrorType();
   16736             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16737             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16738             :       }
   16739             :     }
   16740             : #endif
   16741             :   }
   16742           2 :   resultobj = SWIG_Py_Void();
   16743           2 :   {
   16744             :     /* %typemap(freearg) (const char *utf8_path) */
   16745           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16746             :   }
   16747           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; } }
   16748             :   return resultobj;
   16749           0 : fail:
   16750           0 :   {
   16751             :     /* %typemap(freearg) (const char *utf8_path) */
   16752           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16753             :   }
   16754             :   return NULL;
   16755             : }
   16756             : 
   16757             : 
   16758           2 : SWIGINTERN PyObject *_wrap_NetworkStatsReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16759           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16760             :   
   16761           2 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsReset", 0, 0, 0)) SWIG_fail;
   16762           2 :   {
   16763           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16764           2 :     if ( bLocalUseExceptions ) {
   16765           0 :       pushErrorHandler();
   16766             :     }
   16767           2 :     {
   16768           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16769           2 :       VSINetworkStatsReset();
   16770           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16771             :     }
   16772           2 :     if ( bLocalUseExceptions ) {
   16773           0 :       popErrorHandler();
   16774             :     }
   16775             : #ifndef SED_HACKS
   16776             :     if ( bLocalUseExceptions ) {
   16777             :       CPLErr eclass = CPLGetLastErrorType();
   16778             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16779             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16780             :       }
   16781             :     }
   16782             : #endif
   16783             :   }
   16784           2 :   resultobj = SWIG_Py_Void();
   16785           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; } }
   16786             :   return resultobj;
   16787           0 : fail:
   16788           0 :   return NULL;
   16789             : }
   16790             : 
   16791             : 
   16792           1 : SWIGINTERN PyObject *_wrap_NetworkStatsGetAsSerializedJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16793           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16794           1 :   char **arg1 = (char **) NULL ;
   16795           1 :   PyObject *swig_obj[1] ;
   16796           1 :   retStringAndCPLFree *result = 0 ;
   16797             :   
   16798           1 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsGetAsSerializedJSON", 0, 1, swig_obj)) SWIG_fail;
   16799           1 :   if (swig_obj[0]) {
   16800           0 :     {
   16801             :       /* %typemap(in) char **dict */
   16802           0 :       arg1 = NULL;
   16803           0 :       if ( PySequence_Check( swig_obj[0] ) ) {
   16804           0 :         int bErr = FALSE;
   16805           0 :         arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   16806           0 :         if ( bErr )
   16807             :         {
   16808           0 :           SWIG_fail;
   16809             :         }
   16810             :       }
   16811           0 :       else if ( PyMapping_Check( swig_obj[0] ) ) {
   16812           0 :         int bErr = FALSE;
   16813           0 :         arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   16814           0 :         if ( bErr )
   16815             :         {
   16816           0 :           SWIG_fail;
   16817             :         }
   16818             :       }
   16819             :       else {
   16820           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16821           0 :         SWIG_fail;
   16822             :       }
   16823             :     }
   16824             :   }
   16825           1 :   {
   16826           1 :     const int bLocalUseExceptions = GetUseExceptions();
   16827           1 :     if ( bLocalUseExceptions ) {
   16828           0 :       pushErrorHandler();
   16829             :     }
   16830           1 :     {
   16831           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16832           1 :       result = (retStringAndCPLFree *)VSINetworkStatsGetAsSerializedJSON(arg1);
   16833           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16834             :     }
   16835           1 :     if ( bLocalUseExceptions ) {
   16836           0 :       popErrorHandler();
   16837             :     }
   16838             : #ifndef SED_HACKS
   16839             :     if ( bLocalUseExceptions ) {
   16840             :       CPLErr eclass = CPLGetLastErrorType();
   16841             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16842             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16843             :       }
   16844             :     }
   16845             : #endif
   16846             :   }
   16847           1 :   {
   16848             :     /* %typemap(out) (retStringAndCPLFree*) */
   16849           1 :     Py_XDECREF(resultobj);
   16850           1 :     if(result)
   16851             :     {
   16852           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   16853           1 :       CPLFree(result);
   16854             :     }
   16855             :     else
   16856             :     {
   16857           0 :       resultobj = Py_None;
   16858           0 :       Py_INCREF(resultobj);
   16859             :     }
   16860             :   }
   16861           1 :   {
   16862             :     /* %typemap(freearg) char **dict */
   16863           1 :     CSLDestroy( arg1 );
   16864             :   }
   16865           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; } }
   16866             :   return resultobj;
   16867           0 : fail:
   16868           0 :   {
   16869             :     /* %typemap(freearg) char **dict */
   16870           0 :     CSLDestroy( arg1 );
   16871             :   }
   16872             :   return NULL;
   16873             : }
   16874             : 
   16875             : 
   16876         921 : SWIGINTERN PyObject *_wrap_ParseCommandLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16877         921 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16878         921 :   char *arg1 = (char *) 0 ;
   16879         921 :   int bToFree1 = 0 ;
   16880         921 :   PyObject *swig_obj[1] ;
   16881         921 :   char **result = 0 ;
   16882             :   
   16883         921 :   if (!args) SWIG_fail;
   16884         921 :   swig_obj[0] = args;
   16885         921 :   {
   16886             :     /* %typemap(in) (const char *utf8_path) */
   16887         921 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16888             :     {
   16889         921 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16890             :     }
   16891             :     else
   16892             :     {
   16893           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16894             :       
   16895             :     }
   16896         921 :     if (arg1 == NULL)
   16897             :     {
   16898           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16899           0 :       SWIG_fail;
   16900             :     }
   16901             :   }
   16902         921 :   {
   16903         921 :     if (!arg1) {
   16904         921 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16905             :     }
   16906             :   }
   16907         921 :   {
   16908         921 :     const int bLocalUseExceptions = GetUseExceptions();
   16909         921 :     if ( bLocalUseExceptions ) {
   16910         799 :       pushErrorHandler();
   16911             :     }
   16912         921 :     {
   16913         921 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16914         921 :       result = (char **)CSLParseCommandLine((char const *)arg1);
   16915         921 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16916             :     }
   16917         921 :     if ( bLocalUseExceptions ) {
   16918         799 :       popErrorHandler();
   16919             :     }
   16920             : #ifndef SED_HACKS
   16921             :     if ( bLocalUseExceptions ) {
   16922             :       CPLErr eclass = CPLGetLastErrorType();
   16923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16925             :       }
   16926             :     }
   16927             : #endif
   16928             :   }
   16929         921 :   {
   16930             :     /* %typemap(out) char **CSL -> ( string ) */
   16931         921 :     bool bErr = false;
   16932         921 :     resultobj = CSLToList(result, &bErr);
   16933         921 :     CSLDestroy(result);
   16934         921 :     if( bErr ) {
   16935           0 :       SWIG_fail;
   16936             :     }
   16937             :   }
   16938         921 :   {
   16939             :     /* %typemap(freearg) (const char *utf8_path) */
   16940         921 :     GDALPythonFreeCStr(arg1, bToFree1);
   16941             :   }
   16942         921 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16943             :   return resultobj;
   16944           0 : fail:
   16945           0 :   {
   16946             :     /* %typemap(freearg) (const char *utf8_path) */
   16947         921 :     GDALPythonFreeCStr(arg1, bToFree1);
   16948             :   }
   16949             :   return NULL;
   16950             : }
   16951             : 
   16952             : 
   16953          50 : SWIGINTERN PyObject *_wrap_GetNumCPUs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16954          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16955          50 :   int result;
   16956             :   
   16957          50 :   if (!SWIG_Python_UnpackTuple(args, "GetNumCPUs", 0, 0, 0)) SWIG_fail;
   16958          50 :   {
   16959          50 :     const int bLocalUseExceptions = GetUseExceptions();
   16960          50 :     if ( bLocalUseExceptions ) {
   16961          42 :       pushErrorHandler();
   16962             :     }
   16963          50 :     {
   16964          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16965          50 :       result = (int)CPLGetNumCPUs();
   16966          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16967             :     }
   16968          50 :     if ( bLocalUseExceptions ) {
   16969          42 :       popErrorHandler();
   16970             :     }
   16971             : #ifndef SED_HACKS
   16972             :     if ( bLocalUseExceptions ) {
   16973             :       CPLErr eclass = CPLGetLastErrorType();
   16974             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16975             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16976             :       }
   16977             :     }
   16978             : #endif
   16979             :   }
   16980          50 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16981          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; } }
   16982             :   return resultobj;
   16983           0 : fail:
   16984           0 :   return NULL;
   16985             : }
   16986             : 
   16987             : 
   16988           2 : SWIGINTERN PyObject *_wrap_GetUsablePhysicalRAM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16989           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16990           2 :   GIntBig result;
   16991             :   
   16992           2 :   if (!SWIG_Python_UnpackTuple(args, "GetUsablePhysicalRAM", 0, 0, 0)) SWIG_fail;
   16993           2 :   {
   16994           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16995           2 :     if ( bLocalUseExceptions ) {
   16996           1 :       pushErrorHandler();
   16997             :     }
   16998           2 :     {
   16999           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17000           2 :       result = CPLGetUsablePhysicalRAM();
   17001           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17002             :     }
   17003           2 :     if ( bLocalUseExceptions ) {
   17004           1 :       popErrorHandler();
   17005             :     }
   17006             : #ifndef SED_HACKS
   17007             :     if ( bLocalUseExceptions ) {
   17008             :       CPLErr eclass = CPLGetLastErrorType();
   17009             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17010             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17011             :       }
   17012             :     }
   17013             : #endif
   17014             :   }
   17015           2 :   {
   17016           2 :     resultobj = PyLong_FromLongLong(result);
   17017             :   }
   17018           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; } }
   17019             :   return resultobj;
   17020           0 : fail:
   17021           0 :   return NULL;
   17022             : }
   17023             : 
   17024             : 
   17025           8 : SWIGINTERN PyObject *_wrap_MultipartUploadGetCapabilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17026           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17027           8 :   char *arg1 = (char *) 0 ;
   17028           8 :   int *arg2 = (int *) 0 ;
   17029           8 :   int *arg3 = (int *) 0 ;
   17030           8 :   int *arg4 = (int *) 0 ;
   17031           8 :   int *arg5 = (int *) 0 ;
   17032           8 :   size_t *arg6 = (size_t *) 0 ;
   17033           8 :   size_t *arg7 = (size_t *) 0 ;
   17034           8 :   int *arg8 = (int *) 0 ;
   17035           8 :   int res1 ;
   17036           8 :   char *buf1 = 0 ;
   17037           8 :   int alloc1 = 0 ;
   17038           8 :   int nRetCode2 = 0 ;
   17039           8 :   int bNonSequentialUploadSupported2 = 0 ;
   17040           8 :   int bParallelUploadSupported2 = 0 ;
   17041           8 :   int bSupportsAbort2 = 0 ;
   17042           8 :   size_t nMinPartSize2 = 0 ;
   17043           8 :   size_t nMaxPartSize2 = 0 ;
   17044           8 :   int nMaxPartCount2 = 0 ;
   17045           8 :   PyObject *swig_obj[1] ;
   17046             :   
   17047           8 :   {
   17048           8 :     arg2 = &nRetCode2;
   17049           8 :     arg3 = &bNonSequentialUploadSupported2;
   17050           8 :     arg4 = &bParallelUploadSupported2;
   17051           8 :     arg5 = &bSupportsAbort2;
   17052           8 :     arg6 = &nMinPartSize2;
   17053           8 :     arg7 = &nMaxPartSize2;
   17054           8 :     arg8 = &nMaxPartCount2;
   17055             :   }
   17056           8 :   if (!args) SWIG_fail;
   17057           8 :   swig_obj[0] = args;
   17058           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17059           8 :   if (!SWIG_IsOK(res1)) {
   17060           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadGetCapabilities" "', argument " "1"" of type '" "char const *""'");
   17061             :   }
   17062           8 :   arg1 = reinterpret_cast< char * >(buf1);
   17063           8 :   {
   17064           8 :     if (!arg1) {
   17065           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17066             :     }
   17067             :   }
   17068           7 :   {
   17069           7 :     const int bLocalUseExceptions = GetUseExceptions();
   17070           7 :     if ( bLocalUseExceptions ) {
   17071           2 :       pushErrorHandler();
   17072             :     }
   17073           7 :     {
   17074           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17075           7 :       MultipartUploadGetCapabilities((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   17076           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17077             :     }
   17078           7 :     if ( bLocalUseExceptions ) {
   17079           2 :       popErrorHandler();
   17080             :     }
   17081             : #ifndef SED_HACKS
   17082             :     if ( bLocalUseExceptions ) {
   17083             :       CPLErr eclass = CPLGetLastErrorType();
   17084             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17085             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17086             :       }
   17087             :     }
   17088             : #endif
   17089             :   }
   17090           7 :   resultobj = SWIG_Py_Void();
   17091           7 :   {
   17092           7 :     if( *arg2 == 0 )
   17093             :     {
   17094           2 :       Py_DECREF(resultobj);
   17095           2 :       resultobj = Py_None;
   17096           2 :       Py_INCREF(Py_None);
   17097             :     }
   17098             :     else
   17099             :     {
   17100           5 :       PyObject *r = PyTuple_New( 6 );
   17101           5 :       PyTuple_SetItem( r, 0, PyBool_FromLong(*arg3) );
   17102           5 :       PyTuple_SetItem( r, 1, PyBool_FromLong(*arg4) );
   17103           5 :       PyTuple_SetItem( r, 2, PyBool_FromLong(*arg5) );
   17104           5 :       PyTuple_SetItem( r, 3, PyLong_FromUnsignedLongLong(*arg6) );
   17105           5 :       PyTuple_SetItem( r, 4, PyLong_FromUnsignedLongLong(*arg7) );
   17106           5 :       PyTuple_SetItem( r, 5, PyLong_FromUnsignedLongLong(*arg8) );
   17107             : #if SWIG_VERSION >= 0x040300
   17108             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   17109             : #else
   17110           5 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   17111             : #endif
   17112             :     }
   17113             :   }
   17114           7 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17115          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; } }
   17116             :   return resultobj;
   17117           1 : fail:
   17118           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17119             :   return NULL;
   17120             : }
   17121             : 
   17122             : 
   17123           5 : SWIGINTERN PyObject *_wrap_MultipartUploadStart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17124           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17125           5 :   char *arg1 = (char *) 0 ;
   17126           5 :   char **arg2 = (char **) NULL ;
   17127           5 :   int res1 ;
   17128           5 :   char *buf1 = 0 ;
   17129           5 :   int alloc1 = 0 ;
   17130           5 :   PyObject *swig_obj[2] ;
   17131           5 :   retStringAndCPLFree *result = 0 ;
   17132             :   
   17133           5 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadStart", 1, 2, swig_obj)) SWIG_fail;
   17134           5 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17135           5 :   if (!SWIG_IsOK(res1)) {
   17136           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadStart" "', argument " "1"" of type '" "char const *""'");
   17137             :   }
   17138           5 :   arg1 = reinterpret_cast< char * >(buf1);
   17139           5 :   if (swig_obj[1]) {
   17140           0 :     {
   17141             :       /* %typemap(in) char **dict */
   17142           0 :       arg2 = NULL;
   17143           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   17144           0 :         int bErr = FALSE;
   17145           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17146           0 :         if ( bErr )
   17147             :         {
   17148           0 :           SWIG_fail;
   17149             :         }
   17150             :       }
   17151           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   17152           0 :         int bErr = FALSE;
   17153           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17154           0 :         if ( bErr )
   17155             :         {
   17156           0 :           SWIG_fail;
   17157             :         }
   17158             :       }
   17159             :       else {
   17160           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17161           0 :         SWIG_fail;
   17162             :       }
   17163             :     }
   17164             :   }
   17165           5 :   {
   17166           5 :     if (!arg1) {
   17167           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17168             :     }
   17169             :   }
   17170           4 :   {
   17171           4 :     const int bLocalUseExceptions = GetUseExceptions();
   17172           4 :     if ( bLocalUseExceptions ) {
   17173           1 :       pushErrorHandler();
   17174             :     }
   17175           4 :     {
   17176           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17177           4 :       result = (retStringAndCPLFree *)MultipartUploadStart((char const *)arg1,arg2);
   17178           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17179             :     }
   17180           4 :     if ( bLocalUseExceptions ) {
   17181           1 :       popErrorHandler();
   17182             :     }
   17183             : #ifndef SED_HACKS
   17184             :     if ( bLocalUseExceptions ) {
   17185             :       CPLErr eclass = CPLGetLastErrorType();
   17186             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17187             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17188             :       }
   17189             :     }
   17190             : #endif
   17191             :   }
   17192           4 :   {
   17193             :     /* %typemap(out) (retStringAndCPLFree*) */
   17194           4 :     Py_XDECREF(resultobj);
   17195           4 :     if(result)
   17196             :     {
   17197           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17198           1 :       CPLFree(result);
   17199             :     }
   17200             :     else
   17201             :     {
   17202           3 :       resultobj = Py_None;
   17203           3 :       Py_INCREF(resultobj);
   17204             :     }
   17205             :   }
   17206           4 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17207           4 :   {
   17208             :     /* %typemap(freearg) char **dict */
   17209           4 :     CSLDestroy( arg2 );
   17210             :   }
   17211           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; } }
   17212             :   return resultobj;
   17213           1 : fail:
   17214           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17215           1 :   {
   17216             :     /* %typemap(freearg) char **dict */
   17217           1 :     CSLDestroy( arg2 );
   17218             :   }
   17219             :   return NULL;
   17220             : }
   17221             : 
   17222             : 
   17223           7 : SWIGINTERN PyObject *_wrap_MultipartUploadAddPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17224           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17225           7 :   char *arg1 = (char *) 0 ;
   17226           7 :   char *arg2 = (char *) 0 ;
   17227           7 :   int arg3 ;
   17228           7 :   GUIntBig arg4 ;
   17229           7 :   size_t arg5 ;
   17230           7 :   char *arg6 = (char *) 0 ;
   17231           7 :   char **arg7 = (char **) NULL ;
   17232           7 :   int res1 ;
   17233           7 :   char *buf1 = 0 ;
   17234           7 :   int alloc1 = 0 ;
   17235           7 :   int res2 ;
   17236           7 :   char *buf2 = 0 ;
   17237           7 :   int alloc2 = 0 ;
   17238           7 :   int val3 ;
   17239           7 :   int ecode3 = 0 ;
   17240           7 :   int alloc5 = 0 ;
   17241           7 :   bool viewIsValid5 = false ;
   17242           7 :   Py_buffer view5 ;
   17243           7 :   PyObject *swig_obj[6] ;
   17244           7 :   retStringAndCPLFree *result = 0 ;
   17245             :   
   17246           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAddPart", 5, 6, swig_obj)) SWIG_fail;
   17247           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17248           7 :   if (!SWIG_IsOK(res1)) {
   17249           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAddPart" "', argument " "1"" of type '" "char const *""'");
   17250             :   }
   17251           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17252           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17253           7 :   if (!SWIG_IsOK(res2)) {
   17254           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAddPart" "', argument " "2"" of type '" "char const *""'");
   17255             :   }
   17256           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17257           7 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   17258           7 :   if (!SWIG_IsOK(ecode3)) {
   17259           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipartUploadAddPart" "', argument " "3"" of type '" "int""'");
   17260             :   } 
   17261           7 :   arg3 = static_cast< int >(val3);
   17262           7 :   {
   17263           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17264             :   }
   17265           7 :   {
   17266             :     /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
   17267           7 :     char* ptr = NULL;
   17268           7 :     if( !GetBufferAsCharPtrSizetSize(swig_obj[4], &arg5, &ptr, &alloc5, &viewIsValid5, &view5) ) {
   17269           0 :       SWIG_fail;
   17270             :     }
   17271           7 :     arg6 = (char *)ptr;
   17272             :   }
   17273           7 :   if (swig_obj[5]) {
   17274           0 :     {
   17275             :       /* %typemap(in) char **dict */
   17276           0 :       arg7 = NULL;
   17277           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   17278           0 :         int bErr = FALSE;
   17279           0 :         arg7 = CSLFromPySequence(swig_obj[5], &bErr);
   17280           0 :         if ( bErr )
   17281             :         {
   17282           0 :           SWIG_fail;
   17283             :         }
   17284             :       }
   17285           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   17286           0 :         int bErr = FALSE;
   17287           0 :         arg7 = CSLFromPyMapping(swig_obj[5], &bErr);
   17288           0 :         if ( bErr )
   17289             :         {
   17290           0 :           SWIG_fail;
   17291             :         }
   17292             :       }
   17293             :       else {
   17294           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17295           0 :         SWIG_fail;
   17296             :       }
   17297             :     }
   17298             :   }
   17299           7 :   {
   17300           7 :     if (!arg1) {
   17301           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17302             :     }
   17303             :   }
   17304           6 :   {
   17305           6 :     if (!arg2) {
   17306           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17307             :     }
   17308             :   }
   17309           5 :   {
   17310           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17311           5 :     if ( bLocalUseExceptions ) {
   17312           1 :       pushErrorHandler();
   17313             :     }
   17314           5 :     {
   17315           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17316           5 :       result = (retStringAndCPLFree *)MultipartUploadAddPart((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7);
   17317           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17318             :     }
   17319           5 :     if ( bLocalUseExceptions ) {
   17320           1 :       popErrorHandler();
   17321             :     }
   17322             : #ifndef SED_HACKS
   17323             :     if ( bLocalUseExceptions ) {
   17324             :       CPLErr eclass = CPLGetLastErrorType();
   17325             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17326             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17327             :       }
   17328             :     }
   17329             : #endif
   17330             :   }
   17331           5 :   {
   17332             :     /* %typemap(out) (retStringAndCPLFree*) */
   17333           5 :     Py_XDECREF(resultobj);
   17334           5 :     if(result)
   17335             :     {
   17336           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17337           2 :       CPLFree(result);
   17338             :     }
   17339             :     else
   17340             :     {
   17341           3 :       resultobj = Py_None;
   17342           3 :       Py_INCREF(resultobj);
   17343             :     }
   17344             :   }
   17345           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17346           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17347           5 :   {
   17348             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17349           5 :     if( viewIsValid5 ) {
   17350           5 :       PyBuffer_Release(&view5);
   17351             :     }
   17352           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17353           0 :       delete[] arg6;
   17354             :     }
   17355             :   }
   17356           5 :   {
   17357             :     /* %typemap(freearg) char **dict */
   17358           5 :     CSLDestroy( arg7 );
   17359             :   }
   17360           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; } }
   17361             :   return resultobj;
   17362           2 : fail:
   17363           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17364           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17365           2 :   {
   17366             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17367           2 :     if( viewIsValid5 ) {
   17368           2 :       PyBuffer_Release(&view5);
   17369             :     }
   17370           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17371           0 :       delete[] arg6;
   17372             :     }
   17373             :   }
   17374           2 :   {
   17375             :     /* %typemap(freearg) char **dict */
   17376           2 :     CSLDestroy( arg7 );
   17377             :   }
   17378             :   return NULL;
   17379             : }
   17380             : 
   17381             : 
   17382           7 : SWIGINTERN PyObject *_wrap_MultipartUploadEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17383           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17384           7 :   char *arg1 = (char *) 0 ;
   17385           7 :   char *arg2 = (char *) 0 ;
   17386           7 :   char **arg3 = (char **) 0 ;
   17387           7 :   GUIntBig arg4 ;
   17388           7 :   char **arg5 = (char **) NULL ;
   17389           7 :   int res1 ;
   17390           7 :   char *buf1 = 0 ;
   17391           7 :   int alloc1 = 0 ;
   17392           7 :   int res2 ;
   17393           7 :   char *buf2 = 0 ;
   17394           7 :   int alloc2 = 0 ;
   17395           7 :   PyObject *swig_obj[5] ;
   17396           7 :   bool result;
   17397             :   
   17398           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadEnd", 4, 5, swig_obj)) SWIG_fail;
   17399           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17400           7 :   if (!SWIG_IsOK(res1)) {
   17401           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadEnd" "', argument " "1"" of type '" "char const *""'");
   17402             :   }
   17403           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17404           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17405           7 :   if (!SWIG_IsOK(res2)) {
   17406           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadEnd" "', argument " "2"" of type '" "char const *""'");
   17407             :   }
   17408           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17409           7 :   {
   17410             :     /* %typemap(in) char **dict */
   17411           7 :     arg3 = NULL;
   17412           7 :     if ( PySequence_Check( swig_obj[2] ) ) {
   17413           7 :       int bErr = FALSE;
   17414           7 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17415           7 :       if ( bErr )
   17416             :       {
   17417           0 :         SWIG_fail;
   17418             :       }
   17419             :     }
   17420           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   17421           0 :       int bErr = FALSE;
   17422           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17423           0 :       if ( bErr )
   17424             :       {
   17425           0 :         SWIG_fail;
   17426             :       }
   17427             :     }
   17428             :     else {
   17429           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17430           0 :       SWIG_fail;
   17431             :     }
   17432             :   }
   17433           7 :   {
   17434           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17435             :   }
   17436           7 :   if (swig_obj[4]) {
   17437           0 :     {
   17438             :       /* %typemap(in) char **dict */
   17439           0 :       arg5 = NULL;
   17440           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   17441           0 :         int bErr = FALSE;
   17442           0 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   17443           0 :         if ( bErr )
   17444             :         {
   17445           0 :           SWIG_fail;
   17446             :         }
   17447             :       }
   17448           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   17449           0 :         int bErr = FALSE;
   17450           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   17451           0 :         if ( bErr )
   17452             :         {
   17453           0 :           SWIG_fail;
   17454             :         }
   17455             :       }
   17456             :       else {
   17457           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17458           0 :         SWIG_fail;
   17459             :       }
   17460             :     }
   17461             :   }
   17462           7 :   {
   17463           7 :     if (!arg1) {
   17464           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17465             :     }
   17466             :   }
   17467           6 :   {
   17468           6 :     if (!arg2) {
   17469           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17470             :     }
   17471             :   }
   17472           5 :   {
   17473           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17474           5 :     if ( bLocalUseExceptions ) {
   17475           1 :       pushErrorHandler();
   17476             :     }
   17477           5 :     {
   17478           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17479           5 :       result = (bool)MultipartUploadEnd((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   17480           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17481             :     }
   17482           5 :     if ( bLocalUseExceptions ) {
   17483           1 :       popErrorHandler();
   17484             :     }
   17485             : #ifndef SED_HACKS
   17486             :     if ( bLocalUseExceptions ) {
   17487             :       CPLErr eclass = CPLGetLastErrorType();
   17488             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17489             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17490             :       }
   17491             :     }
   17492             : #endif
   17493             :   }
   17494           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17495           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17496           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17497           5 :   {
   17498             :     /* %typemap(freearg) char **dict */
   17499           5 :     CSLDestroy( arg3 );
   17500             :   }
   17501           5 :   {
   17502             :     /* %typemap(freearg) char **dict */
   17503           5 :     CSLDestroy( arg5 );
   17504             :   }
   17505           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; } }
   17506             :   return resultobj;
   17507           2 : fail:
   17508           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17509           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17510           2 :   {
   17511             :     /* %typemap(freearg) char **dict */
   17512           2 :     CSLDestroy( arg3 );
   17513             :   }
   17514           2 :   {
   17515             :     /* %typemap(freearg) char **dict */
   17516           2 :     CSLDestroy( arg5 );
   17517             :   }
   17518             :   return NULL;
   17519             : }
   17520             : 
   17521             : 
   17522           8 : SWIGINTERN PyObject *_wrap_MultipartUploadAbort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17523           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17524           8 :   char *arg1 = (char *) 0 ;
   17525           8 :   char *arg2 = (char *) 0 ;
   17526           8 :   char **arg3 = (char **) NULL ;
   17527           8 :   int res1 ;
   17528           8 :   char *buf1 = 0 ;
   17529           8 :   int alloc1 = 0 ;
   17530           8 :   int res2 ;
   17531           8 :   char *buf2 = 0 ;
   17532           8 :   int alloc2 = 0 ;
   17533           8 :   PyObject *swig_obj[3] ;
   17534           8 :   bool result;
   17535             :   
   17536           8 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAbort", 2, 3, swig_obj)) SWIG_fail;
   17537           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17538           8 :   if (!SWIG_IsOK(res1)) {
   17539           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAbort" "', argument " "1"" of type '" "char const *""'");
   17540             :   }
   17541           8 :   arg1 = reinterpret_cast< char * >(buf1);
   17542           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17543           8 :   if (!SWIG_IsOK(res2)) {
   17544           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAbort" "', argument " "2"" of type '" "char const *""'");
   17545             :   }
   17546           8 :   arg2 = reinterpret_cast< char * >(buf2);
   17547           8 :   if (swig_obj[2]) {
   17548           0 :     {
   17549             :       /* %typemap(in) char **dict */
   17550           0 :       arg3 = NULL;
   17551           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   17552           0 :         int bErr = FALSE;
   17553           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17554           0 :         if ( bErr )
   17555             :         {
   17556           0 :           SWIG_fail;
   17557             :         }
   17558             :       }
   17559           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   17560           0 :         int bErr = FALSE;
   17561           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17562           0 :         if ( bErr )
   17563             :         {
   17564           0 :           SWIG_fail;
   17565             :         }
   17566             :       }
   17567             :       else {
   17568           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17569           0 :         SWIG_fail;
   17570             :       }
   17571             :     }
   17572             :   }
   17573           8 :   {
   17574           8 :     if (!arg1) {
   17575           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17576             :     }
   17577             :   }
   17578           7 :   {
   17579           7 :     if (!arg2) {
   17580           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17581             :     }
   17582             :   }
   17583           6 :   {
   17584           6 :     const int bLocalUseExceptions = GetUseExceptions();
   17585           6 :     if ( bLocalUseExceptions ) {
   17586           3 :       pushErrorHandler();
   17587             :     }
   17588           6 :     {
   17589           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17590           6 :       result = (bool)MultipartUploadAbort((char const *)arg1,(char const *)arg2,arg3);
   17591           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17592             :     }
   17593           6 :     if ( bLocalUseExceptions ) {
   17594           3 :       popErrorHandler();
   17595             :     }
   17596             : #ifndef SED_HACKS
   17597             :     if ( bLocalUseExceptions ) {
   17598             :       CPLErr eclass = CPLGetLastErrorType();
   17599             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17600             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17601             :       }
   17602             :     }
   17603             : #endif
   17604             :   }
   17605           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17606           6 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17607           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17608           6 :   {
   17609             :     /* %typemap(freearg) char **dict */
   17610           6 :     CSLDestroy( arg3 );
   17611             :   }
   17612          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; } }
   17613             :   return resultobj;
   17614           2 : fail:
   17615           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17616           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17617           2 :   {
   17618             :     /* %typemap(freearg) char **dict */
   17619           2 :     CSLDestroy( arg3 );
   17620             :   }
   17621             :   return NULL;
   17622             : }
   17623             : 
   17624             : 
   17625        2490 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17626        2490 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17627        2490 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17628        2490 :   void *argp1 = 0 ;
   17629        2490 :   int res1 = 0 ;
   17630        2490 :   PyObject *swig_obj[1] ;
   17631        2490 :   char *result = 0 ;
   17632             :   
   17633        2490 :   if (!args) SWIG_fail;
   17634        2490 :   swig_obj[0] = args;
   17635        2490 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17636        2490 :   if (!SWIG_IsOK(res1)) {
   17637           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17638             :   }
   17639        2490 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17640        2490 :   {
   17641        2490 :     const int bLocalUseExceptions = GetUseExceptions();
   17642        2490 :     if ( bLocalUseExceptions ) {
   17643        1254 :       pushErrorHandler();
   17644             :     }
   17645        2490 :     {
   17646        2490 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17647        2490 :       result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
   17648        2490 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17649             :     }
   17650        2490 :     if ( bLocalUseExceptions ) {
   17651        1254 :       popErrorHandler();
   17652             :     }
   17653             : #ifndef SED_HACKS
   17654             :     if ( bLocalUseExceptions ) {
   17655             :       CPLErr eclass = CPLGetLastErrorType();
   17656             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17657             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17658             :       }
   17659             :     }
   17660             : #endif
   17661             :   }
   17662        2490 :   resultobj = SWIG_FromCharPtr((const char *)result);
   17663        2490 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17664             :   return resultobj;
   17665             : fail:
   17666             :   return NULL;
   17667             : }
   17668             : 
   17669             : 
   17670          51 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17671          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17672          51 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17673          51 :   char *arg2 = (char *) 0 ;
   17674          51 :   void *argp1 = 0 ;
   17675          51 :   int res1 = 0 ;
   17676          51 :   int res2 ;
   17677          51 :   char *buf2 = 0 ;
   17678          51 :   int alloc2 = 0 ;
   17679          51 :   PyObject *swig_obj[2] ;
   17680             :   
   17681          51 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
   17682          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17683          51 :   if (!SWIG_IsOK(res1)) {
   17684           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17685             :   }
   17686          51 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17687          51 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17688          51 :   if (!SWIG_IsOK(res2)) {
   17689           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
   17690             :   }
   17691          51 :   arg2 = reinterpret_cast< char * >(buf2);
   17692          51 :   {
   17693          51 :     if (!arg2) {
   17694           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17695             :     }
   17696             :   }
   17697          51 :   {
   17698          51 :     const int bLocalUseExceptions = GetUseExceptions();
   17699          51 :     if ( bLocalUseExceptions ) {
   17700          39 :       pushErrorHandler();
   17701             :     }
   17702          51 :     {
   17703          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17704          51 :       GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
   17705          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17706             :     }
   17707          51 :     if ( bLocalUseExceptions ) {
   17708          39 :       popErrorHandler();
   17709             :     }
   17710             : #ifndef SED_HACKS
   17711             :     if ( bLocalUseExceptions ) {
   17712             :       CPLErr eclass = CPLGetLastErrorType();
   17713             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17714             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17715             :       }
   17716             :     }
   17717             : #endif
   17718             :   }
   17719          51 :   resultobj = SWIG_Py_Void();
   17720          51 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17721          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; } }
   17722             :   return resultobj;
   17723           0 : fail:
   17724           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17725             :   return NULL;
   17726             : }
   17727             : 
   17728             : 
   17729          75 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17730          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17731          75 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17732          75 :   void *argp1 = 0 ;
   17733          75 :   int res1 = 0 ;
   17734          75 :   PyObject *swig_obj[1] ;
   17735          75 :   char **result = 0 ;
   17736             :   
   17737          75 :   if (!args) SWIG_fail;
   17738          75 :   swig_obj[0] = args;
   17739          75 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17740          75 :   if (!SWIG_IsOK(res1)) {
   17741           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17742             :   }
   17743          75 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17744          75 :   {
   17745          75 :     const int bLocalUseExceptions = GetUseExceptions();
   17746          75 :     if ( bLocalUseExceptions ) {
   17747          39 :       pushErrorHandler();
   17748             :     }
   17749          75 :     {
   17750          75 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17751          75 :       result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
   17752          75 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17753             :     }
   17754          75 :     if ( bLocalUseExceptions ) {
   17755          39 :       popErrorHandler();
   17756             :     }
   17757             : #ifndef SED_HACKS
   17758             :     if ( bLocalUseExceptions ) {
   17759             :       CPLErr eclass = CPLGetLastErrorType();
   17760             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17761             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17762             :       }
   17763             :     }
   17764             : #endif
   17765             :   }
   17766          75 :   {
   17767             :     /* %typemap(out) char **CSL -> ( string ) */
   17768          75 :     bool bErr = false;
   17769          75 :     resultobj = CSLToList(result, &bErr);
   17770          75 :     CSLDestroy(result);
   17771          75 :     if( bErr ) {
   17772           0 :       SWIG_fail;
   17773             :     }
   17774             :   }
   17775          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; } }
   17776             :   return resultobj;
   17777             : fail:
   17778             :   return NULL;
   17779             : }
   17780             : 
   17781             : 
   17782        7007 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17783        7007 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17784        7007 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17785        7007 :   char *arg2 = (char *) "" ;
   17786        7007 :   void *argp1 = 0 ;
   17787        7007 :   int res1 = 0 ;
   17788        7007 :   int res2 ;
   17789        7007 :   char *buf2 = 0 ;
   17790        7007 :   int alloc2 = 0 ;
   17791        7007 :   PyObject *swig_obj[2] ;
   17792        7007 :   char **result = 0 ;
   17793             :   
   17794        7007 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
   17795        7007 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17796        7007 :   if (!SWIG_IsOK(res1)) {
   17797           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17798             :   }
   17799        7007 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17800        7007 :   if (swig_obj[1]) {
   17801        6913 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17802        6913 :     if (!SWIG_IsOK(res2)) {
   17803           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
   17804             :     }
   17805        6913 :     arg2 = reinterpret_cast< char * >(buf2);
   17806             :   }
   17807        7007 :   {
   17808        7007 :     const int bLocalUseExceptions = GetUseExceptions();
   17809        7007 :     if ( bLocalUseExceptions ) {
   17810        1709 :       pushErrorHandler();
   17811             :     }
   17812        7007 :     {
   17813        7007 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17814        7007 :       result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
   17815        7007 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17816             :     }
   17817        7007 :     if ( bLocalUseExceptions ) {
   17818        1709 :       popErrorHandler();
   17819             :     }
   17820             : #ifndef SED_HACKS
   17821             :     if ( bLocalUseExceptions ) {
   17822             :       CPLErr eclass = CPLGetLastErrorType();
   17823             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17824             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17825             :       }
   17826             :     }
   17827             : #endif
   17828             :   }
   17829        7007 :   {
   17830             :     /* %typemap(out) char **dict */
   17831        7007 :     resultobj = GetCSLStringAsPyDict(result, false);
   17832             :   }
   17833        7007 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17834        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; } }
   17835             :   return resultobj;
   17836           0 : fail:
   17837           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17838             :   return NULL;
   17839             : }
   17840             : 
   17841             : 
   17842         403 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17843         403 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17844         403 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17845         403 :   char *arg2 = (char *) "" ;
   17846         403 :   void *argp1 = 0 ;
   17847         403 :   int res1 = 0 ;
   17848         403 :   int res2 ;
   17849         403 :   char *buf2 = 0 ;
   17850         403 :   int alloc2 = 0 ;
   17851         403 :   PyObject *swig_obj[2] ;
   17852         403 :   char **result = 0 ;
   17853             :   
   17854         403 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
   17855         403 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17856         403 :   if (!SWIG_IsOK(res1)) {
   17857           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17858             :   }
   17859         403 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17860         403 :   if (swig_obj[1]) {
   17861         360 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17862         360 :     if (!SWIG_IsOK(res2)) {
   17863           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
   17864             :     }
   17865         360 :     arg2 = reinterpret_cast< char * >(buf2);
   17866             :   }
   17867         403 :   {
   17868         403 :     const int bLocalUseExceptions = GetUseExceptions();
   17869         403 :     if ( bLocalUseExceptions ) {
   17870         115 :       pushErrorHandler();
   17871             :     }
   17872         403 :     {
   17873         403 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17874         403 :       result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
   17875         403 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17876             :     }
   17877         403 :     if ( bLocalUseExceptions ) {
   17878         115 :       popErrorHandler();
   17879             :     }
   17880             : #ifndef SED_HACKS
   17881             :     if ( bLocalUseExceptions ) {
   17882             :       CPLErr eclass = CPLGetLastErrorType();
   17883             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17884             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17885             :       }
   17886             :     }
   17887             : #endif
   17888             :   }
   17889         403 :   {
   17890             :     /* %typemap(out) char **options -> ( string ) */
   17891         403 :     bool bErr = false;
   17892         403 :     resultobj = CSLToList(result, &bErr);
   17893         403 :     if( bErr ) {
   17894           0 :       SWIG_fail;
   17895             :     }
   17896             :   }
   17897         403 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17898         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; } }
   17899             :   return resultobj;
   17900           0 : fail:
   17901           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17902             :   return NULL;
   17903             : }
   17904             : 
   17905             : 
   17906             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17907             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17908             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17909             :   char **arg2 = (char **) 0 ;
   17910             :   char *arg3 = (char *) "" ;
   17911             :   void *argp1 = 0 ;
   17912             :   int res1 = 0 ;
   17913             :   int res3 ;
   17914             :   char *buf3 = 0 ;
   17915             :   int alloc3 = 0 ;
   17916             :   CPLErr result;
   17917             :   
   17918             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   17919             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17920             :   if (!SWIG_IsOK(res1)) {
   17921             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17922             :   }
   17923             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17924             :   {
   17925             :     /* %typemap(in) char **dict */
   17926             :     arg2 = NULL;
   17927             :     if ( PySequence_Check( swig_obj[1] ) ) {
   17928             :       int bErr = FALSE;
   17929             :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17930             :       if ( bErr )
   17931             :       {
   17932             :         SWIG_fail;
   17933             :       }
   17934             :     }
   17935             :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   17936             :       int bErr = FALSE;
   17937             :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17938             :       if ( bErr )
   17939             :       {
   17940             :         SWIG_fail;
   17941             :       }
   17942             :     }
   17943             :     else {
   17944             :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17945             :       SWIG_fail;
   17946             :     }
   17947             :   }
   17948             :   if (swig_obj[2]) {
   17949             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   17950             :     if (!SWIG_IsOK(res3)) {
   17951             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   17952             :     }
   17953             :     arg3 = reinterpret_cast< char * >(buf3);
   17954             :   }
   17955             :   {
   17956             :     const int bLocalUseExceptions = GetUseExceptions();
   17957             :     if ( bLocalUseExceptions ) {
   17958             :       pushErrorHandler();
   17959             :     }
   17960             :     {
   17961             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17962             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
   17963             :       SWIG_PYTHON_THREAD_END_ALLOW;
   17964             :     }
   17965             :     if ( bLocalUseExceptions ) {
   17966             :       popErrorHandler();
   17967             :     }
   17968             : #ifndef SED_HACKS
   17969             :     if ( bLocalUseExceptions ) {
   17970             :       CPLErr eclass = CPLGetLastErrorType();
   17971             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17972             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17973             :       }
   17974             :     }
   17975             : #endif
   17976             :   }
   17977             :   resultobj = SWIG_From_int(static_cast< int >(result));
   17978             :   {
   17979             :     /* %typemap(freearg) char **dict */
   17980             :     CSLDestroy( arg2 );
   17981             :   }
   17982             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17983             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17984             :   return resultobj;
   17985             : fail:
   17986             :   {
   17987             :     /* %typemap(freearg) char **dict */
   17988             :     CSLDestroy( arg2 );
   17989             :   }
   17990             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17991             :   return NULL;
   17992             : }
   17993             : 
   17994             : 
   17995             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17996             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17997             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17998             :   char *arg2 = (char *) 0 ;
   17999             :   char *arg3 = (char *) "" ;
   18000             :   void *argp1 = 0 ;
   18001             :   int res1 = 0 ;
   18002             :   int res2 ;
   18003             :   char *buf2 = 0 ;
   18004             :   int alloc2 = 0 ;
   18005             :   int res3 ;
   18006             :   char *buf3 = 0 ;
   18007             :   int alloc3 = 0 ;
   18008             :   CPLErr result;
   18009             :   
   18010             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   18011             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18012             :   if (!SWIG_IsOK(res1)) {
   18013             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18014             :   }
   18015             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18016             :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18017             :   if (!SWIG_IsOK(res2)) {
   18018             :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
   18019             :   }
   18020             :   arg2 = reinterpret_cast< char * >(buf2);
   18021             :   if (swig_obj[2]) {
   18022             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18023             :     if (!SWIG_IsOK(res3)) {
   18024             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   18025             :     }
   18026             :     arg3 = reinterpret_cast< char * >(buf3);
   18027             :   }
   18028             :   {
   18029             :     const int bLocalUseExceptions = GetUseExceptions();
   18030             :     if ( bLocalUseExceptions ) {
   18031             :       pushErrorHandler();
   18032             :     }
   18033             :     {
   18034             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18035             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
   18036             :       SWIG_PYTHON_THREAD_END_ALLOW;
   18037             :     }
   18038             :     if ( bLocalUseExceptions ) {
   18039             :       popErrorHandler();
   18040             :     }
   18041             : #ifndef SED_HACKS
   18042             :     if ( bLocalUseExceptions ) {
   18043             :       CPLErr eclass = CPLGetLastErrorType();
   18044             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18045             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18046             :       }
   18047             :     }
   18048             : #endif
   18049             :   }
   18050             :   resultobj = SWIG_From_int(static_cast< int >(result));
   18051             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18052             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18053             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18054             :   return resultobj;
   18055             : fail:
   18056             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18057             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18058             :   return NULL;
   18059             : }
   18060             : 
   18061             : 
   18062         281 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
   18063         281 :   Py_ssize_t argc;
   18064         281 :   PyObject *argv[4] = {
   18065             :     0
   18066             :   };
   18067             :   
   18068         281 :   if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
   18069         281 :   --argc;
   18070         281 :   if ((argc >= 2) && (argc <= 3)) {
   18071         281 :     int _v;
   18072         281 :     void *vptr = 0;
   18073         281 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   18074         301 :     _v = SWIG_CheckState(res);
   18075         281 :     if (_v) {
   18076         281 :       {
   18077             :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
   18078             :         /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
   18079             :         /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
   18080             :         /* (see #4816) */
   18081         281 :         _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
   18082             :       }
   18083         261 :       if (_v) {
   18084         261 :         if (argc <= 2) {
   18085         261 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   18086             :         }
   18087         111 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   18088         111 :         _v = SWIG_CheckState(res);
   18089         111 :         if (_v) {
   18090         111 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   18091             :         }
   18092             :       }
   18093             :     }
   18094             :   }
   18095          20 :   if ((argc >= 2) && (argc <= 3)) {
   18096          20 :     int _v;
   18097          20 :     void *vptr = 0;
   18098          20 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   18099          21 :     _v = SWIG_CheckState(res);
   18100          20 :     if (_v) {
   18101          20 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   18102          20 :       _v = SWIG_CheckState(res);
   18103          19 :       if (_v) {
   18104          19 :         if (argc <= 2) {
   18105          19 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   18106             :         }
   18107          15 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   18108          15 :         _v = SWIG_CheckState(res);
   18109          15 :         if (_v) {
   18110          15 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   18111             :         }
   18112             :       }
   18113             :     }
   18114             :   }
   18115             :   
   18116           0 : fail:
   18117           1 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
   18118             :     "  Possible C/C++ prototypes are:\n"
   18119             :     "    GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
   18120             :     "    GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
   18121             :   return 0;
   18122             : }
   18123             : 
   18124             : 
   18125       57022 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18126       57022 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18127       57022 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   18128       57022 :   char *arg2 = (char *) 0 ;
   18129       57022 :   char *arg3 = (char *) "" ;
   18130       57022 :   void *argp1 = 0 ;
   18131       57022 :   int res1 = 0 ;
   18132       57022 :   int res2 ;
   18133       57022 :   char *buf2 = 0 ;
   18134       57022 :   int alloc2 = 0 ;
   18135       57022 :   int res3 ;
   18136       57022 :   char *buf3 = 0 ;
   18137       57022 :   int alloc3 = 0 ;
   18138       57022 :   PyObject *swig_obj[3] ;
   18139       57022 :   char *result = 0 ;
   18140             :   
   18141       57022 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
   18142       57022 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18143       57022 :   if (!SWIG_IsOK(res1)) {
   18144           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18145             :   }
   18146       57022 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18147       57022 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18148       57022 :   if (!SWIG_IsOK(res2)) {
   18149           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18150             :   }
   18151       57022 :   arg2 = reinterpret_cast< char * >(buf2);
   18152       57022 :   if (swig_obj[2]) {
   18153        6967 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18154        6967 :     if (!SWIG_IsOK(res3)) {
   18155           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18156             :     }
   18157        6967 :     arg3 = reinterpret_cast< char * >(buf3);
   18158             :   }
   18159       57022 :   {
   18160       57022 :     if (!arg2) {
   18161           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18162             :     }
   18163             :   }
   18164       57022 :   {
   18165       57022 :     const int bLocalUseExceptions = GetUseExceptions();
   18166       57022 :     if ( bLocalUseExceptions ) {
   18167       52604 :       pushErrorHandler();
   18168             :     }
   18169       57022 :     {
   18170       57022 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18171       57022 :       result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
   18172       57022 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18173             :     }
   18174       57022 :     if ( bLocalUseExceptions ) {
   18175       52604 :       popErrorHandler();
   18176             :     }
   18177             : #ifndef SED_HACKS
   18178             :     if ( bLocalUseExceptions ) {
   18179             :       CPLErr eclass = CPLGetLastErrorType();
   18180             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18181             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18182             :       }
   18183             :     }
   18184             : #endif
   18185             :   }
   18186       57022 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18187       57022 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18188       57022 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18189       57024 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18190             :   return resultobj;
   18191           0 : fail:
   18192           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18193           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18194             :   return NULL;
   18195             : }
   18196             : 
   18197             : 
   18198         494 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18199         494 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18200         494 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   18201         494 :   char *arg2 = (char *) 0 ;
   18202         494 :   char *arg3 = (char *) 0 ;
   18203         494 :   char *arg4 = (char *) "" ;
   18204         494 :   void *argp1 = 0 ;
   18205         494 :   int res1 = 0 ;
   18206         494 :   int res2 ;
   18207         494 :   char *buf2 = 0 ;
   18208         494 :   int alloc2 = 0 ;
   18209         494 :   int res3 ;
   18210         494 :   char *buf3 = 0 ;
   18211         494 :   int alloc3 = 0 ;
   18212         494 :   int res4 ;
   18213         494 :   char *buf4 = 0 ;
   18214         494 :   int alloc4 = 0 ;
   18215         494 :   PyObject *swig_obj[4] ;
   18216         494 :   CPLErr result;
   18217             :   
   18218         494 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
   18219         494 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18220         494 :   if (!SWIG_IsOK(res1)) {
   18221           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18222             :   }
   18223         494 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18224         494 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18225         494 :   if (!SWIG_IsOK(res2)) {
   18226           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18227             :   }
   18228         494 :   arg2 = reinterpret_cast< char * >(buf2);
   18229         494 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18230         494 :   if (!SWIG_IsOK(res3)) {
   18231           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18232             :   }
   18233         494 :   arg3 = reinterpret_cast< char * >(buf3);
   18234         494 :   if (swig_obj[3]) {
   18235          77 :     res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   18236          77 :     if (!SWIG_IsOK(res4)) {
   18237           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
   18238             :     }
   18239          77 :     arg4 = reinterpret_cast< char * >(buf4);
   18240             :   }
   18241         494 :   {
   18242         494 :     if (!arg2) {
   18243           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18244             :     }
   18245             :   }
   18246         494 :   {
   18247         494 :     const int bLocalUseExceptions = GetUseExceptions();
   18248         494 :     if ( bLocalUseExceptions ) {
   18249         127 :       pushErrorHandler();
   18250             :     }
   18251         494 :     {
   18252         494 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18253         494 :       result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
   18254         494 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18255             :     }
   18256         494 :     if ( bLocalUseExceptions ) {
   18257         127 :       popErrorHandler();
   18258             :     }
   18259             : #ifndef SED_HACKS
   18260             :     if ( bLocalUseExceptions ) {
   18261             :       CPLErr eclass = CPLGetLastErrorType();
   18262             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18263             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18264             :       }
   18265             :     }
   18266             : #endif
   18267             :   }
   18268         494 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18269         494 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18270         494 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18271         494 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18272         494 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18273             :   return resultobj;
   18274           0 : fail:
   18275           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18276           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18277           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18278             :   return NULL;
   18279             : }
   18280             : 
   18281             : 
   18282         277 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18283         277 :   PyObject *obj;
   18284         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   18285         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
   18286         277 :   return SWIG_Py_Void();
   18287             : }
   18288             : 
   18289       98602 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18290       98602 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18291       98602 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18292       98602 :   void *argp1 = 0 ;
   18293       98602 :   int res1 = 0 ;
   18294       98602 :   PyObject *swig_obj[1] ;
   18295       98602 :   char *result = 0 ;
   18296             :   
   18297       98602 :   if (!args) SWIG_fail;
   18298       98602 :   swig_obj[0] = args;
   18299       98602 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18300       98602 :   if (!SWIG_IsOK(res1)) {
   18301           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18302             :   }
   18303       98602 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18304       98602 :   {
   18305       98602 :     const int bLocalUseExceptions = GetUseExceptions();
   18306       98602 :     if ( bLocalUseExceptions ) {
   18307       51476 :       pushErrorHandler();
   18308             :     }
   18309       98602 :     {
   18310       98602 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18311       98602 :       result = (char *)GDALDriverShadow_ShortName_get(arg1);
   18312       98602 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18313             :     }
   18314       98602 :     if ( bLocalUseExceptions ) {
   18315       51476 :       popErrorHandler();
   18316             :     }
   18317             : #ifndef SED_HACKS
   18318             :     if ( bLocalUseExceptions ) {
   18319             :       CPLErr eclass = CPLGetLastErrorType();
   18320             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18321             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18322             :       }
   18323             :     }
   18324             : #endif
   18325             :   }
   18326       98602 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18327       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; } }
   18328             :   return resultobj;
   18329             : fail:
   18330             :   return NULL;
   18331             : }
   18332             : 
   18333             : 
   18334          17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18335          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18336          17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18337          17 :   void *argp1 = 0 ;
   18338          17 :   int res1 = 0 ;
   18339          17 :   PyObject *swig_obj[1] ;
   18340          17 :   char *result = 0 ;
   18341             :   
   18342          17 :   if (!args) SWIG_fail;
   18343          17 :   swig_obj[0] = args;
   18344          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18345          17 :   if (!SWIG_IsOK(res1)) {
   18346           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18347             :   }
   18348          17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18349          17 :   {
   18350          17 :     const int bLocalUseExceptions = GetUseExceptions();
   18351          17 :     if ( bLocalUseExceptions ) {
   18352           0 :       pushErrorHandler();
   18353             :     }
   18354          17 :     {
   18355          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18356          17 :       result = (char *)GDALDriverShadow_LongName_get(arg1);
   18357          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18358             :     }
   18359          17 :     if ( bLocalUseExceptions ) {
   18360           0 :       popErrorHandler();
   18361             :     }
   18362             : #ifndef SED_HACKS
   18363             :     if ( bLocalUseExceptions ) {
   18364             :       CPLErr eclass = CPLGetLastErrorType();
   18365             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18366             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18367             :       }
   18368             :     }
   18369             : #endif
   18370             :   }
   18371          17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18372          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; } }
   18373             :   return resultobj;
   18374             : fail:
   18375             :   return NULL;
   18376             : }
   18377             : 
   18378             : 
   18379           0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18380           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18381           0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18382           0 :   void *argp1 = 0 ;
   18383           0 :   int res1 = 0 ;
   18384           0 :   PyObject *swig_obj[1] ;
   18385           0 :   char *result = 0 ;
   18386             :   
   18387           0 :   if (!args) SWIG_fail;
   18388           0 :   swig_obj[0] = args;
   18389           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18390           0 :   if (!SWIG_IsOK(res1)) {
   18391           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18392             :   }
   18393           0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18394           0 :   {
   18395           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18396           0 :     if ( bLocalUseExceptions ) {
   18397           0 :       pushErrorHandler();
   18398             :     }
   18399           0 :     {
   18400           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18401           0 :       result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
   18402           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18403             :     }
   18404           0 :     if ( bLocalUseExceptions ) {
   18405           0 :       popErrorHandler();
   18406             :     }
   18407             : #ifndef SED_HACKS
   18408             :     if ( bLocalUseExceptions ) {
   18409             :       CPLErr eclass = CPLGetLastErrorType();
   18410             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18411             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18412             :       }
   18413             :     }
   18414             : #endif
   18415             :   }
   18416           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18417           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; } }
   18418             :   return resultobj;
   18419             : fail:
   18420             :   return NULL;
   18421             : }
   18422             : 
   18423             : 
   18424       17406 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18425       17406 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18426       17406 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18427       17406 :   char *arg2 = (char *) 0 ;
   18428       17406 :   int arg3 ;
   18429       17406 :   int arg4 ;
   18430       17406 :   int arg5 = (int) 1 ;
   18431       17406 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
   18432       17406 :   char **arg7 = (char **) 0 ;
   18433       17406 :   void *argp1 = 0 ;
   18434       17406 :   int res1 = 0 ;
   18435       17406 :   int bToFree2 = 0 ;
   18436       17406 :   int val3 ;
   18437       17406 :   int ecode3 = 0 ;
   18438       17406 :   int val4 ;
   18439       17406 :   int ecode4 = 0 ;
   18440       17406 :   int val5 ;
   18441       17406 :   int ecode5 = 0 ;
   18442       17406 :   PyObject * obj0 = 0 ;
   18443       17406 :   PyObject * obj1 = 0 ;
   18444       17406 :   PyObject * obj2 = 0 ;
   18445       17406 :   PyObject * obj3 = 0 ;
   18446       17406 :   PyObject * obj4 = 0 ;
   18447       17406 :   PyObject * obj5 = 0 ;
   18448       17406 :   PyObject * obj6 = 0 ;
   18449       17406 :   char * kwnames[] = {
   18450             :     (char *)"self",  (char *)"utf8_path",  (char *)"xsize",  (char *)"ysize",  (char *)"bands",  (char *)"eType",  (char *)"options",  NULL 
   18451             :   };
   18452       17406 :   GDALDatasetShadow *result = 0 ;
   18453             :   
   18454       17406 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Driver_Create", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18455       17406 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18456       17406 :   if (!SWIG_IsOK(res1)) {
   18457           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18458             :   }
   18459       17406 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18460       17406 :   {
   18461             :     /* %typemap(in) (const char *utf8_path) */
   18462       17406 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18463             :     {
   18464       13652 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18465             :     }
   18466             :     else
   18467             :     {
   18468        3754 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18469             :       
   18470             :     }
   18471       17406 :     if (arg2 == NULL)
   18472             :     {
   18473           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18474           0 :       SWIG_fail;
   18475             :     }
   18476             :   }
   18477       17406 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   18478       17406 :   if (!SWIG_IsOK(ecode3)) {
   18479           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
   18480             :   } 
   18481       17406 :   arg3 = static_cast< int >(val3);
   18482       17406 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18483       17406 :   if (!SWIG_IsOK(ecode4)) {
   18484           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
   18485             :   } 
   18486       17406 :   arg4 = static_cast< int >(val4);
   18487       17406 :   if (obj4) {
   18488       15817 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18489       15817 :     if (!SWIG_IsOK(ecode5)) {
   18490           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
   18491             :     } 
   18492             :     arg5 = static_cast< int >(val5);
   18493             :   }
   18494       17406 :   if (obj5) {
   18495        9375 :     {
   18496        9375 :       if (PyInt_Check(obj5))
   18497             :       {
   18498        9371 :         arg6 = static_cast<GDALDataType>(PyInt_AsLong(obj5));
   18499             :       }
   18500             :       else
   18501             :       {
   18502           4 :         PyObject* gdal_array = PyImport_ImportModule("osgeo.gdal_array");
   18503           4 :         if (gdal_array)
   18504             :         {
   18505           4 :           PyObject* dict = PyModule_GetDict(gdal_array);
   18506           4 :           PyObject* fn = PyDict_GetItemString(dict, "NumericTypeCodeToGDALTypeCode");
   18507           4 :           PyObject* type_code = PyObject_CallFunctionObjArgs(fn, obj5, NULL);
   18508             :           
   18509           4 :           Py_DECREF(gdal_array);
   18510           4 :           if (type_code && PyInt_Check(type_code))
   18511             :           {
   18512           2 :             arg6 = static_cast<GDALDataType>(PyInt_AsLong(type_code));
   18513           2 :             Py_DECREF(type_code);
   18514             :           }
   18515             :           else
   18516             :           {
   18517           2 :             Py_XDECREF(type_code);
   18518           2 :             PyErr_SetString(PyExc_RuntimeError, "type must be a GDAL data type code or NumPy type");
   18519           2 :             SWIG_fail;
   18520             :           }
   18521             :         }
   18522             :         else
   18523             :         {
   18524           0 :           PyErr_SetString(PyExc_RuntimeError, "gdal_array module is not available; type must be a specified as a GDAL data type code");
   18525           0 :           SWIG_fail;
   18526             :         }
   18527             :       }
   18528             :     }
   18529             :   }
   18530       17404 :   if (obj6) {
   18531        4418 :     {
   18532             :       /* %typemap(in) char **dict */
   18533        4418 :       arg7 = NULL;
   18534        4418 :       if ( PySequence_Check( obj6 ) ) {
   18535        4386 :         int bErr = FALSE;
   18536        4386 :         arg7 = CSLFromPySequence(obj6, &bErr);
   18537        4386 :         if ( bErr )
   18538             :         {
   18539           0 :           SWIG_fail;
   18540             :         }
   18541             :       }
   18542          32 :       else if ( PyMapping_Check( obj6 ) ) {
   18543          32 :         int bErr = FALSE;
   18544          32 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   18545          32 :         if ( bErr )
   18546             :         {
   18547           0 :           SWIG_fail;
   18548             :         }
   18549             :       }
   18550             :       else {
   18551           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18552           0 :         SWIG_fail;
   18553             :       }
   18554             :     }
   18555             :   }
   18556       17404 :   {
   18557       17404 :     if (!arg2) {
   18558       17404 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18559             :     }
   18560             :   }
   18561       17404 :   {
   18562       17404 :     const int bLocalUseExceptions = GetUseExceptions();
   18563       17404 :     if ( bLocalUseExceptions ) {
   18564        5611 :       pushErrorHandler();
   18565             :     }
   18566       17404 :     {
   18567       17404 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18568       17404 :       result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   18569       17404 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18570             :     }
   18571       17404 :     if ( bLocalUseExceptions ) {
   18572        5611 :       popErrorHandler();
   18573             :     }
   18574             : #ifndef SED_HACKS
   18575             :     if ( bLocalUseExceptions ) {
   18576             :       CPLErr eclass = CPLGetLastErrorType();
   18577             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18578             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18579             :       }
   18580             :     }
   18581             : #endif
   18582             :   }
   18583       17404 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18584       17404 :   {
   18585             :     /* %typemap(freearg) (const char *utf8_path) */
   18586       17404 :     GDALPythonFreeCStr(arg2, bToFree2);
   18587             :   }
   18588       17404 :   {
   18589             :     /* %typemap(freearg) char **dict */
   18590       17404 :     CSLDestroy( arg7 );
   18591             :   }
   18592       17452 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18593             :   return resultobj;
   18594           2 : fail:
   18595           2 :   {
   18596             :     /* %typemap(freearg) (const char *utf8_path) */
   18597           2 :     GDALPythonFreeCStr(arg2, bToFree2);
   18598             :   }
   18599           2 :   {
   18600             :     /* %typemap(freearg) char **dict */
   18601           2 :     CSLDestroy( arg7 );
   18602             :   }
   18603             :   return NULL;
   18604             : }
   18605             : 
   18606             : 
   18607         182 : SWIGINTERN PyObject *_wrap_Driver_CreateVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18608         182 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18609         182 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18610         182 :   char *arg2 = (char *) 0 ;
   18611         182 :   char **arg3 = (char **) 0 ;
   18612         182 :   void *argp1 = 0 ;
   18613         182 :   int res1 = 0 ;
   18614         182 :   int bToFree2 = 0 ;
   18615         182 :   PyObject * obj0 = 0 ;
   18616         182 :   PyObject * obj1 = 0 ;
   18617         182 :   PyObject * obj2 = 0 ;
   18618         182 :   char * kwnames[] = {
   18619             :     (char *)"self",  (char *)"utf8_path",  (char *)"options",  NULL 
   18620             :   };
   18621         182 :   GDALDatasetShadow *result = 0 ;
   18622             :   
   18623         182 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Driver_CreateVector", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   18624         182 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18625         182 :   if (!SWIG_IsOK(res1)) {
   18626           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateVector" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18627             :   }
   18628         182 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18629         182 :   {
   18630             :     /* %typemap(in) (const char *utf8_path) */
   18631         182 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18632             :     {
   18633         134 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18634             :     }
   18635             :     else
   18636             :     {
   18637          48 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18638             :       
   18639             :     }
   18640         182 :     if (arg2 == NULL)
   18641             :     {
   18642           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18643           0 :       SWIG_fail;
   18644             :     }
   18645             :   }
   18646         182 :   if (obj2) {
   18647           2 :     {
   18648             :       /* %typemap(in) char **dict */
   18649           2 :       arg3 = NULL;
   18650           2 :       if ( PySequence_Check( obj2 ) ) {
   18651           2 :         int bErr = FALSE;
   18652           2 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18653           2 :         if ( bErr )
   18654             :         {
   18655           0 :           SWIG_fail;
   18656             :         }
   18657             :       }
   18658           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18659           0 :         int bErr = FALSE;
   18660           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18661           0 :         if ( bErr )
   18662             :         {
   18663           0 :           SWIG_fail;
   18664             :         }
   18665             :       }
   18666             :       else {
   18667           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18668           0 :         SWIG_fail;
   18669             :       }
   18670             :     }
   18671             :   }
   18672         182 :   {
   18673         182 :     if (!arg2) {
   18674         182 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18675             :     }
   18676             :   }
   18677         182 :   {
   18678         182 :     const int bLocalUseExceptions = GetUseExceptions();
   18679         182 :     if ( bLocalUseExceptions ) {
   18680         182 :       pushErrorHandler();
   18681             :     }
   18682         182 :     {
   18683         182 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18684         182 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateVector(arg1,(char const *)arg2,arg3);
   18685         182 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18686             :     }
   18687         182 :     if ( bLocalUseExceptions ) {
   18688         182 :       popErrorHandler();
   18689             :     }
   18690             : #ifndef SED_HACKS
   18691             :     if ( bLocalUseExceptions ) {
   18692             :       CPLErr eclass = CPLGetLastErrorType();
   18693             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18694             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18695             :       }
   18696             :     }
   18697             : #endif
   18698             :   }
   18699         182 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18700         182 :   {
   18701             :     /* %typemap(freearg) (const char *utf8_path) */
   18702         182 :     GDALPythonFreeCStr(arg2, bToFree2);
   18703             :   }
   18704         182 :   {
   18705             :     /* %typemap(freearg) char **dict */
   18706         182 :     CSLDestroy( arg3 );
   18707             :   }
   18708         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; } }
   18709             :   return resultobj;
   18710           0 : fail:
   18711           0 :   {
   18712             :     /* %typemap(freearg) (const char *utf8_path) */
   18713           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18714             :   }
   18715           0 :   {
   18716             :     /* %typemap(freearg) char **dict */
   18717           0 :     CSLDestroy( arg3 );
   18718             :   }
   18719             :   return NULL;
   18720             : }
   18721             : 
   18722             : 
   18723         425 : SWIGINTERN PyObject *_wrap_Driver_CreateMultiDimensional(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18724         425 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18725         425 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18726         425 :   char *arg2 = (char *) 0 ;
   18727         425 :   char **arg3 = (char **) 0 ;
   18728         425 :   char **arg4 = (char **) 0 ;
   18729         425 :   void *argp1 = 0 ;
   18730         425 :   int res1 = 0 ;
   18731         425 :   int bToFree2 = 0 ;
   18732         425 :   PyObject * obj0 = 0 ;
   18733         425 :   PyObject * obj1 = 0 ;
   18734         425 :   PyObject * obj2 = 0 ;
   18735         425 :   PyObject * obj3 = 0 ;
   18736         425 :   char * kwnames[] = {
   18737             :     (char *)"self",  (char *)"utf8_path",  (char *)"root_group_options",  (char *)"options",  NULL 
   18738             :   };
   18739         425 :   GDALDatasetShadow *result = 0 ;
   18740             :   
   18741         425 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Driver_CreateMultiDimensional", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   18742         425 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18743         425 :   if (!SWIG_IsOK(res1)) {
   18744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateMultiDimensional" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18745             :   }
   18746         425 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18747         425 :   {
   18748             :     /* %typemap(in) (const char *utf8_path) */
   18749         425 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18750             :     {
   18751         240 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18752             :     }
   18753             :     else
   18754             :     {
   18755         185 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18756             :       
   18757             :     }
   18758         425 :     if (arg2 == NULL)
   18759             :     {
   18760           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18761           0 :       SWIG_fail;
   18762             :     }
   18763             :   }
   18764         425 :   if (obj2) {
   18765           1 :     {
   18766             :       /* %typemap(in) char **dict */
   18767           1 :       arg3 = NULL;
   18768           1 :       if ( PySequence_Check( obj2 ) ) {
   18769           1 :         int bErr = FALSE;
   18770           1 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18771           1 :         if ( bErr )
   18772             :         {
   18773           0 :           SWIG_fail;
   18774             :         }
   18775             :       }
   18776           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18777           0 :         int bErr = FALSE;
   18778           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18779           0 :         if ( bErr )
   18780             :         {
   18781           0 :           SWIG_fail;
   18782             :         }
   18783             :       }
   18784             :       else {
   18785           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18786           0 :         SWIG_fail;
   18787             :       }
   18788             :     }
   18789             :   }
   18790         425 :   if (obj3) {
   18791         217 :     {
   18792             :       /* %typemap(in) char **dict */
   18793         217 :       arg4 = NULL;
   18794         217 :       if ( PySequence_Check( obj3 ) ) {
   18795         217 :         int bErr = FALSE;
   18796         217 :         arg4 = CSLFromPySequence(obj3, &bErr);
   18797         217 :         if ( bErr )
   18798             :         {
   18799           0 :           SWIG_fail;
   18800             :         }
   18801             :       }
   18802           0 :       else if ( PyMapping_Check( obj3 ) ) {
   18803           0 :         int bErr = FALSE;
   18804           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   18805           0 :         if ( bErr )
   18806             :         {
   18807           0 :           SWIG_fail;
   18808             :         }
   18809             :       }
   18810             :       else {
   18811           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18812           0 :         SWIG_fail;
   18813             :       }
   18814             :     }
   18815             :   }
   18816         425 :   {
   18817         425 :     if (!arg2) {
   18818         425 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18819             :     }
   18820             :   }
   18821         425 :   {
   18822         425 :     const int bLocalUseExceptions = GetUseExceptions();
   18823         425 :     if ( bLocalUseExceptions ) {
   18824         110 :       pushErrorHandler();
   18825             :     }
   18826         425 :     {
   18827         425 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18828         425 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateMultiDimensional(arg1,(char const *)arg2,arg3,arg4);
   18829         425 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18830             :     }
   18831         425 :     if ( bLocalUseExceptions ) {
   18832         110 :       popErrorHandler();
   18833             :     }
   18834             : #ifndef SED_HACKS
   18835             :     if ( bLocalUseExceptions ) {
   18836             :       CPLErr eclass = CPLGetLastErrorType();
   18837             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18838             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18839             :       }
   18840             :     }
   18841             : #endif
   18842             :   }
   18843         425 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18844         425 :   {
   18845             :     /* %typemap(freearg) (const char *utf8_path) */
   18846         425 :     GDALPythonFreeCStr(arg2, bToFree2);
   18847             :   }
   18848         425 :   {
   18849             :     /* %typemap(freearg) char **dict */
   18850         425 :     CSLDestroy( arg3 );
   18851             :   }
   18852         425 :   {
   18853             :     /* %typemap(freearg) char **dict */
   18854         425 :     CSLDestroy( arg4 );
   18855             :   }
   18856         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; } }
   18857             :   return resultobj;
   18858           0 : fail:
   18859           0 :   {
   18860             :     /* %typemap(freearg) (const char *utf8_path) */
   18861           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18862             :   }
   18863           0 :   {
   18864             :     /* %typemap(freearg) char **dict */
   18865           0 :     CSLDestroy( arg3 );
   18866             :   }
   18867           0 :   {
   18868             :     /* %typemap(freearg) char **dict */
   18869           0 :     CSLDestroy( arg4 );
   18870             :   }
   18871             :   return NULL;
   18872             : }
   18873             : 
   18874             : 
   18875        3891 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18876        3891 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18877        3891 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18878        3891 :   char *arg2 = (char *) 0 ;
   18879        3891 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
   18880        3891 :   int arg4 = (int) 1 ;
   18881        3891 :   char **arg5 = (char **) 0 ;
   18882        3891 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18883        3891 :   void *arg7 = (void *) NULL ;
   18884        3891 :   void *argp1 = 0 ;
   18885        3891 :   int res1 = 0 ;
   18886        3891 :   int bToFree2 = 0 ;
   18887        3891 :   void *argp3 = 0 ;
   18888        3891 :   int res3 = 0 ;
   18889        3891 :   int val4 ;
   18890        3891 :   int ecode4 = 0 ;
   18891        3891 :   PyObject * obj0 = 0 ;
   18892        3891 :   PyObject * obj1 = 0 ;
   18893        3891 :   PyObject * obj2 = 0 ;
   18894        3891 :   PyObject * obj3 = 0 ;
   18895        3891 :   PyObject * obj4 = 0 ;
   18896        3891 :   PyObject * obj5 = 0 ;
   18897        3891 :   PyObject * obj6 = 0 ;
   18898        3891 :   char * kwnames[] = {
   18899             :     (char *)"self",  (char *)"utf8_path",  (char *)"src",  (char *)"strict",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   18900             :   };
   18901        3891 :   GDALDatasetShadow *result = 0 ;
   18902             :   
   18903             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18904        3891 :   PyProgressData *psProgressInfo;
   18905        3891 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18906        3891 :   psProgressInfo->nLastReported = -1;
   18907        3891 :   psProgressInfo->psPyCallback = NULL;
   18908        3891 :   psProgressInfo->psPyCallbackData = NULL;
   18909        3891 :   arg7 = psProgressInfo;
   18910        3891 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOO:Driver_CreateCopy", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18911        3891 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18912        3891 :   if (!SWIG_IsOK(res1)) {
   18913           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18914             :   }
   18915        3891 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18916        3891 :   {
   18917             :     /* %typemap(in) (const char *utf8_path) */
   18918        3891 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18919             :     {
   18920        3649 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18921             :     }
   18922             :     else
   18923             :     {
   18924         242 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18925             :       
   18926             :     }
   18927        3891 :     if (arg2 == NULL)
   18928             :     {
   18929           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18930           0 :       SWIG_fail;
   18931             :     }
   18932             :   }
   18933        3891 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18934        3891 :   if (!SWIG_IsOK(res3)) {
   18935           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
   18936             :   }
   18937        3891 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
   18938        3891 :   if (obj3) {
   18939         478 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   18940         478 :     if (!SWIG_IsOK(ecode4)) {
   18941           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
   18942             :     } 
   18943             :     arg4 = static_cast< int >(val4);
   18944             :   }
   18945        3891 :   if (obj4) {
   18946        1445 :     {
   18947             :       /* %typemap(in) char **dict */
   18948        1445 :       arg5 = NULL;
   18949        1445 :       if ( PySequence_Check( obj4 ) ) {
   18950        1440 :         int bErr = FALSE;
   18951        1440 :         arg5 = CSLFromPySequence(obj4, &bErr);
   18952        1440 :         if ( bErr )
   18953             :         {
   18954           0 :           SWIG_fail;
   18955             :         }
   18956             :       }
   18957           5 :       else if ( PyMapping_Check( obj4 ) ) {
   18958           5 :         int bErr = FALSE;
   18959           5 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   18960           5 :         if ( bErr )
   18961             :         {
   18962           0 :           SWIG_fail;
   18963             :         }
   18964             :       }
   18965             :       else {
   18966           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18967           0 :         SWIG_fail;
   18968             :       }
   18969             :     }
   18970             :   }
   18971        3891 :   if (obj5) {
   18972          79 :     {
   18973             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18974             :       /* callback_func typemap */
   18975             :       
   18976             :       /* In some cases 0 is passed instead of None. */
   18977             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   18978          79 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   18979             :       {
   18980           0 :         if( PyLong_AsLong(obj5) == 0 )
   18981             :         {
   18982           0 :           obj5 = Py_None;
   18983             :         }
   18984             :       }
   18985             :       
   18986          79 :       if (obj5 && obj5 != Py_None ) {
   18987          79 :         void* cbfunction = NULL;
   18988          79 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   18989             :             (void**)&cbfunction,
   18990             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18991             :             SWIG_POINTER_EXCEPTION | 0 ));
   18992             :         
   18993          79 :         if ( cbfunction == GDALTermProgress ) {
   18994             :           arg6 = GDALTermProgress;
   18995             :         } else {
   18996          79 :           if (!PyCallable_Check(obj5)) {
   18997           1 :             PyErr_SetString( PyExc_RuntimeError,
   18998             :               "Object given is not a Python function" );
   18999           1 :             SWIG_fail;
   19000             :           }
   19001          78 :           psProgressInfo->psPyCallback = obj5;
   19002          78 :           arg6 = PyProgressProxy;
   19003             :         }
   19004             :         
   19005             :       }
   19006             :       
   19007             :     }
   19008             :   }
   19009        3890 :   if (obj6) {
   19010          14 :     {
   19011             :       /* %typemap(in) ( void* callback_data=NULL)  */
   19012          14 :       psProgressInfo->psPyCallbackData = obj6 ;
   19013             :     }
   19014             :   }
   19015        3890 :   {
   19016        3890 :     if (!arg2) {
   19017        3890 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19018             :     }
   19019             :   }
   19020        3890 :   {
   19021        3890 :     if (!arg3) {
   19022           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19023             :     }
   19024             :   }
   19025        3890 :   {
   19026        3890 :     const int bLocalUseExceptions = GetUseExceptions();
   19027        3890 :     if ( bLocalUseExceptions ) {
   19028         650 :       pushErrorHandler();
   19029             :     }
   19030        3890 :     {
   19031        3890 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19032        3890 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   19033        3890 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19034             :     }
   19035        3890 :     if ( bLocalUseExceptions ) {
   19036         650 :       popErrorHandler();
   19037             :     }
   19038             : #ifndef SED_HACKS
   19039             :     if ( bLocalUseExceptions ) {
   19040             :       CPLErr eclass = CPLGetLastErrorType();
   19041             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19042             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19043             :       }
   19044             :     }
   19045             : #endif
   19046             :   }
   19047        3890 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   19048        3890 :   {
   19049             :     /* %typemap(freearg) (const char *utf8_path) */
   19050        3890 :     GDALPythonFreeCStr(arg2, bToFree2);
   19051             :   }
   19052        3890 :   {
   19053             :     /* %typemap(freearg) char **dict */
   19054        3890 :     CSLDestroy( arg5 );
   19055             :   }
   19056        3890 :   {
   19057             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19058             :     
   19059        3890 :     CPLFree(psProgressInfo);
   19060             :     
   19061             :   }
   19062        3925 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19063             :   return resultobj;
   19064           1 : fail:
   19065           1 :   {
   19066             :     /* %typemap(freearg) (const char *utf8_path) */
   19067           1 :     GDALPythonFreeCStr(arg2, bToFree2);
   19068             :   }
   19069           1 :   {
   19070             :     /* %typemap(freearg) char **dict */
   19071           1 :     CSLDestroy( arg5 );
   19072             :   }
   19073           1 :   {
   19074             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19075             :     
   19076           1 :     CPLFree(psProgressInfo);
   19077             :     
   19078             :   }
   19079             :   return NULL;
   19080             : }
   19081             : 
   19082             : 
   19083        2361 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19084        2361 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19085        2361 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19086        2361 :   char *arg2 = (char *) 0 ;
   19087        2361 :   void *argp1 = 0 ;
   19088        2361 :   int res1 = 0 ;
   19089        2361 :   int bToFree2 = 0 ;
   19090        2361 :   PyObject *swig_obj[2] ;
   19091        2361 :   CPLErr result;
   19092             :   
   19093        2361 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Delete", 2, 2, swig_obj)) SWIG_fail;
   19094        2361 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19095        2361 :   if (!SWIG_IsOK(res1)) {
   19096           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19097             :   }
   19098        2361 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19099        2361 :   {
   19100             :     /* %typemap(in) (const char *utf8_path) */
   19101        2361 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19102             :     {
   19103        2199 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19104             :     }
   19105             :     else
   19106             :     {
   19107         162 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19108             :       
   19109             :     }
   19110        2361 :     if (arg2 == NULL)
   19111             :     {
   19112           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19113           0 :       SWIG_fail;
   19114             :     }
   19115             :   }
   19116        2361 :   {
   19117        2361 :     if (!arg2) {
   19118        2361 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19119             :     }
   19120             :   }
   19121        2361 :   {
   19122        2361 :     const int bLocalUseExceptions = GetUseExceptions();
   19123        2361 :     if ( bLocalUseExceptions ) {
   19124        1323 :       pushErrorHandler();
   19125             :     }
   19126        2361 :     {
   19127        2361 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19128        2361 :       result = (CPLErr)GDALDriverShadow_Delete(arg1,(char const *)arg2);
   19129        2361 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19130             :     }
   19131        2361 :     if ( bLocalUseExceptions ) {
   19132        1323 :       popErrorHandler();
   19133             :     }
   19134             : #ifndef SED_HACKS
   19135             :     if ( bLocalUseExceptions ) {
   19136             :       CPLErr eclass = CPLGetLastErrorType();
   19137             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19138             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19139             :       }
   19140             :     }
   19141             : #endif
   19142             :   }
   19143        2361 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19144        2361 :   {
   19145             :     /* %typemap(freearg) (const char *utf8_path) */
   19146        2361 :     GDALPythonFreeCStr(arg2, bToFree2);
   19147             :   }
   19148        2361 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19149             :   return resultobj;
   19150           0 : fail:
   19151           0 :   {
   19152             :     /* %typemap(freearg) (const char *utf8_path) */
   19153        2361 :     GDALPythonFreeCStr(arg2, bToFree2);
   19154             :   }
   19155             :   return NULL;
   19156             : }
   19157             : 
   19158             : 
   19159         173 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19160         173 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19161         173 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19162         173 :   char *arg2 = (char *) 0 ;
   19163         173 :   char *arg3 = (char *) 0 ;
   19164         173 :   void *argp1 = 0 ;
   19165         173 :   int res1 = 0 ;
   19166         173 :   int bToFree2 = 0 ;
   19167         173 :   int bToFree3 = 0 ;
   19168         173 :   PyObject *swig_obj[3] ;
   19169         173 :   CPLErr result;
   19170             :   
   19171         173 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Rename", 3, 3, swig_obj)) SWIG_fail;
   19172         173 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19173         173 :   if (!SWIG_IsOK(res1)) {
   19174           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19175             :   }
   19176         173 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19177         173 :   {
   19178             :     /* %typemap(in) (const char *utf8_path) */
   19179         173 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19180             :     {
   19181         171 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19182             :     }
   19183             :     else
   19184             :     {
   19185           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19186             :       
   19187             :     }
   19188         173 :     if (arg2 == NULL)
   19189             :     {
   19190           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19191           0 :       SWIG_fail;
   19192             :     }
   19193             :   }
   19194         173 :   {
   19195             :     /* %typemap(in) (const char *utf8_path) */
   19196         173 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19197             :     {
   19198         171 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19199             :     }
   19200             :     else
   19201             :     {
   19202           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19203             :       
   19204             :     }
   19205         173 :     if (arg3 == NULL)
   19206             :     {
   19207           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19208           0 :       SWIG_fail;
   19209             :     }
   19210             :   }
   19211         173 :   {
   19212         173 :     if (!arg2) {
   19213         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19214             :     }
   19215             :   }
   19216         173 :   {
   19217         173 :     if (!arg3) {
   19218         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19219             :     }
   19220             :   }
   19221         173 :   {
   19222         173 :     const int bLocalUseExceptions = GetUseExceptions();
   19223         173 :     if ( bLocalUseExceptions ) {
   19224         173 :       pushErrorHandler();
   19225             :     }
   19226         173 :     {
   19227         173 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19228         173 :       result = (CPLErr)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
   19229         173 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19230             :     }
   19231         173 :     if ( bLocalUseExceptions ) {
   19232         173 :       popErrorHandler();
   19233             :     }
   19234             : #ifndef SED_HACKS
   19235             :     if ( bLocalUseExceptions ) {
   19236             :       CPLErr eclass = CPLGetLastErrorType();
   19237             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19238             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19239             :       }
   19240             :     }
   19241             : #endif
   19242             :   }
   19243         173 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19244         173 :   {
   19245             :     /* %typemap(freearg) (const char *utf8_path) */
   19246         173 :     GDALPythonFreeCStr(arg2, bToFree2);
   19247             :   }
   19248         173 :   {
   19249             :     /* %typemap(freearg) (const char *utf8_path) */
   19250         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19251             :   }
   19252         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; } }
   19253             :   return resultobj;
   19254           0 : fail:
   19255           0 :   {
   19256             :     /* %typemap(freearg) (const char *utf8_path) */
   19257           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19258             :   }
   19259           0 :   {
   19260             :     /* %typemap(freearg) (const char *utf8_path) */
   19261         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19262             :   }
   19263             :   return NULL;
   19264             : }
   19265             : 
   19266             : 
   19267           3 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19268           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19269           3 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19270           3 :   char *arg2 = (char *) 0 ;
   19271           3 :   char *arg3 = (char *) 0 ;
   19272           3 :   void *argp1 = 0 ;
   19273           3 :   int res1 = 0 ;
   19274           3 :   int bToFree2 = 0 ;
   19275           3 :   int bToFree3 = 0 ;
   19276           3 :   PyObject *swig_obj[3] ;
   19277           3 :   CPLErr result;
   19278             :   
   19279           3 :   if (!SWIG_Python_UnpackTuple(args, "Driver_CopyFiles", 3, 3, swig_obj)) SWIG_fail;
   19280           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19281           3 :   if (!SWIG_IsOK(res1)) {
   19282           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19283             :   }
   19284           3 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19285           3 :   {
   19286             :     /* %typemap(in) (const char *utf8_path) */
   19287           3 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19288             :     {
   19289           1 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19290             :     }
   19291             :     else
   19292             :     {
   19293           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19294             :       
   19295             :     }
   19296           3 :     if (arg2 == NULL)
   19297             :     {
   19298           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19299           0 :       SWIG_fail;
   19300             :     }
   19301             :   }
   19302           3 :   {
   19303             :     /* %typemap(in) (const char *utf8_path) */
   19304           3 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19305             :     {
   19306           1 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19307             :     }
   19308             :     else
   19309             :     {
   19310           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19311             :       
   19312             :     }
   19313           3 :     if (arg3 == NULL)
   19314             :     {
   19315           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19316           0 :       SWIG_fail;
   19317             :     }
   19318             :   }
   19319           3 :   {
   19320           3 :     if (!arg2) {
   19321           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19322             :     }
   19323             :   }
   19324           3 :   {
   19325           3 :     if (!arg3) {
   19326           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19327             :     }
   19328             :   }
   19329           3 :   {
   19330           3 :     const int bLocalUseExceptions = GetUseExceptions();
   19331           3 :     if ( bLocalUseExceptions ) {
   19332           3 :       pushErrorHandler();
   19333             :     }
   19334           3 :     {
   19335           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19336           3 :       result = (CPLErr)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
   19337           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19338             :     }
   19339           3 :     if ( bLocalUseExceptions ) {
   19340           3 :       popErrorHandler();
   19341             :     }
   19342             : #ifndef SED_HACKS
   19343             :     if ( bLocalUseExceptions ) {
   19344             :       CPLErr eclass = CPLGetLastErrorType();
   19345             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19346             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19347             :       }
   19348             :     }
   19349             : #endif
   19350             :   }
   19351           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19352           3 :   {
   19353             :     /* %typemap(freearg) (const char *utf8_path) */
   19354           3 :     GDALPythonFreeCStr(arg2, bToFree2);
   19355             :   }
   19356           3 :   {
   19357             :     /* %typemap(freearg) (const char *utf8_path) */
   19358           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19359             :   }
   19360           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; } }
   19361             :   return resultobj;
   19362           0 : fail:
   19363           0 :   {
   19364             :     /* %typemap(freearg) (const char *utf8_path) */
   19365           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19366             :   }
   19367           0 :   {
   19368             :     /* %typemap(freearg) (const char *utf8_path) */
   19369           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19370             :   }
   19371             :   return NULL;
   19372             : }
   19373             : 
   19374             : 
   19375           2 : SWIGINTERN PyObject *_wrap_Driver_HasOpenOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19376           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19377           2 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19378           2 :   char *arg2 = (char *) 0 ;
   19379           2 :   void *argp1 = 0 ;
   19380           2 :   int res1 = 0 ;
   19381           2 :   int res2 ;
   19382           2 :   char *buf2 = 0 ;
   19383           2 :   int alloc2 = 0 ;
   19384           2 :   PyObject *swig_obj[2] ;
   19385           2 :   bool result;
   19386             :   
   19387           2 :   if (!SWIG_Python_UnpackTuple(args, "Driver_HasOpenOption", 2, 2, swig_obj)) SWIG_fail;
   19388           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19389           2 :   if (!SWIG_IsOK(res1)) {
   19390           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HasOpenOption" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19391             :   }
   19392           2 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19393           2 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19394           2 :   if (!SWIG_IsOK(res2)) {
   19395           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_HasOpenOption" "', argument " "2"" of type '" "char const *""'");
   19396             :   }
   19397           2 :   arg2 = reinterpret_cast< char * >(buf2);
   19398           2 :   {
   19399           2 :     const int bLocalUseExceptions = GetUseExceptions();
   19400           2 :     if ( bLocalUseExceptions ) {
   19401           0 :       pushErrorHandler();
   19402             :     }
   19403           2 :     {
   19404           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19405           2 :       result = (bool)GDALDriverShadow_HasOpenOption(arg1,(char const *)arg2);
   19406           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19407             :     }
   19408           2 :     if ( bLocalUseExceptions ) {
   19409           0 :       popErrorHandler();
   19410             :     }
   19411             : #ifndef SED_HACKS
   19412             :     if ( bLocalUseExceptions ) {
   19413             :       CPLErr eclass = CPLGetLastErrorType();
   19414             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19415             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19416             :       }
   19417             :     }
   19418             : #endif
   19419             :   }
   19420           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19421           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19422           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; } }
   19423             :   return resultobj;
   19424           0 : fail:
   19425           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19426             :   return NULL;
   19427             : }
   19428             : 
   19429             : 
   19430           6 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19431           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19432           6 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19433           6 :   char *arg2 = (char *) 0 ;
   19434           6 :   void *argp1 = 0 ;
   19435           6 :   int res1 = 0 ;
   19436           6 :   int res2 ;
   19437           6 :   char *buf2 = 0 ;
   19438           6 :   int alloc2 = 0 ;
   19439           6 :   PyObject *swig_obj[2] ;
   19440           6 :   bool result;
   19441             :   
   19442           6 :   if (!SWIG_Python_UnpackTuple(args, "Driver_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   19443           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19444           6 :   if (!SWIG_IsOK(res1)) {
   19445           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19446             :   }
   19447           6 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19448           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19449           6 :   if (!SWIG_IsOK(res2)) {
   19450           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
   19451             :   }
   19452           6 :   arg2 = reinterpret_cast< char * >(buf2);
   19453           6 :   {
   19454           6 :     const int bLocalUseExceptions = GetUseExceptions();
   19455           6 :     if ( bLocalUseExceptions ) {
   19456           4 :       pushErrorHandler();
   19457             :     }
   19458           6 :     {
   19459           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19460           6 :       result = (bool)GDALDriverShadow_TestCapability(arg1,(char const *)arg2);
   19461           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19462             :     }
   19463           6 :     if ( bLocalUseExceptions ) {
   19464           4 :       popErrorHandler();
   19465             :     }
   19466             : #ifndef SED_HACKS
   19467             :     if ( bLocalUseExceptions ) {
   19468             :       CPLErr eclass = CPLGetLastErrorType();
   19469             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19470             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19471             :       }
   19472             :     }
   19473             : #endif
   19474             :   }
   19475           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19476           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19477           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; } }
   19478             :   return resultobj;
   19479           0 : fail:
   19480           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19481             :   return NULL;
   19482             : }
   19483             : 
   19484             : 
   19485          93 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19486          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19487          93 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19488          93 :   void *argp1 = 0 ;
   19489          93 :   int res1 = 0 ;
   19490          93 :   PyObject *swig_obj[1] ;
   19491          93 :   int result;
   19492             :   
   19493          93 :   if (!args) SWIG_fail;
   19494          93 :   swig_obj[0] = args;
   19495          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19496          93 :   if (!SWIG_IsOK(res1)) {
   19497           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19498             :   }
   19499          93 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19500          93 :   {
   19501          93 :     const int bLocalUseExceptions = GetUseExceptions();
   19502          93 :     if ( bLocalUseExceptions ) {
   19503          17 :       pushErrorHandler();
   19504             :     }
   19505          93 :     {
   19506          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19507          93 :       result = (int)GDALDriverShadow_Register(arg1);
   19508          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19509             :     }
   19510          93 :     if ( bLocalUseExceptions ) {
   19511          17 :       popErrorHandler();
   19512             :     }
   19513             : #ifndef SED_HACKS
   19514             :     if ( bLocalUseExceptions ) {
   19515             :       CPLErr eclass = CPLGetLastErrorType();
   19516             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19517             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19518             :       }
   19519             :     }
   19520             : #endif
   19521             :   }
   19522          93 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19523          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; } }
   19524             :   return resultobj;
   19525             : fail:
   19526             :   return NULL;
   19527             : }
   19528             : 
   19529             : 
   19530          93 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19531          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19532          93 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19533          93 :   void *argp1 = 0 ;
   19534          93 :   int res1 = 0 ;
   19535          93 :   PyObject *swig_obj[1] ;
   19536             :   
   19537          93 :   if (!args) SWIG_fail;
   19538          93 :   swig_obj[0] = args;
   19539          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19540          93 :   if (!SWIG_IsOK(res1)) {
   19541           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19542             :   }
   19543          93 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19544          93 :   {
   19545          93 :     const int bLocalUseExceptions = GetUseExceptions();
   19546          93 :     if ( bLocalUseExceptions ) {
   19547          17 :       pushErrorHandler();
   19548             :     }
   19549          93 :     {
   19550          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19551          93 :       GDALDriverShadow_Deregister(arg1);
   19552          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19553             :     }
   19554          93 :     if ( bLocalUseExceptions ) {
   19555          17 :       popErrorHandler();
   19556             :     }
   19557             : #ifndef SED_HACKS
   19558             :     if ( bLocalUseExceptions ) {
   19559             :       CPLErr eclass = CPLGetLastErrorType();
   19560             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19561             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19562             :       }
   19563             :     }
   19564             : #endif
   19565             :   }
   19566          93 :   resultobj = SWIG_Py_Void();
   19567          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; } }
   19568             :   return resultobj;
   19569             : fail:
   19570             :   return NULL;
   19571             : }
   19572             : 
   19573             : 
   19574         277 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19575         277 :   PyObject *obj;
   19576         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19577         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
   19578         277 :   return SWIG_Py_Void();
   19579             : }
   19580             : 
   19581           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19582           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19583           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19584           0 :   short arg2 ;
   19585           0 :   GDALColorEntry ce1 ;
   19586           0 :   short val2 ;
   19587           0 :   int ecode2 = 0 ;
   19588           0 :   PyObject *swig_obj[2] ;
   19589             :   
   19590           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c1_set", 2, 2, swig_obj)) SWIG_fail;
   19591           0 :   {
   19592             :     /* %typemap(in) GDALColorEntry* */
   19593           0 :     ce1.c4 = 255;
   19594           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19595           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19596           0 :       SWIG_fail;
   19597             :     }
   19598           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19599           0 :     if ( size > 4 ) {
   19600           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19601           0 :       SWIG_fail;
   19602             :     }
   19603           0 :     if ( size < 3 ) {
   19604           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19605           0 :       SWIG_fail;
   19606             :     }
   19607           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19608           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19609           0 :       SWIG_fail;
   19610             :     }
   19611           0 :     arg1 = &ce1;
   19612             :   }
   19613           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19614           0 :   if (!SWIG_IsOK(ecode2)) {
   19615           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
   19616             :   } 
   19617           0 :   arg2 = static_cast< short >(val2);
   19618           0 :   {
   19619           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19620           0 :     if (arg1) (arg1)->c1 = arg2;
   19621           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19622             :   }
   19623           0 :   resultobj = SWIG_Py_Void();
   19624           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; } }
   19625             :   return resultobj;
   19626             : fail:
   19627             :   return NULL;
   19628             : }
   19629             : 
   19630             : 
   19631           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19632           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19633           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19634           0 :   GDALColorEntry ce1 ;
   19635           0 :   PyObject *swig_obj[1] ;
   19636           0 :   short result;
   19637             :   
   19638           0 :   if (!args) SWIG_fail;
   19639           0 :   swig_obj[0] = args;
   19640           0 :   {
   19641             :     /* %typemap(in) GDALColorEntry* */
   19642           0 :     ce1.c4 = 255;
   19643           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19644           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19645           0 :       SWIG_fail;
   19646             :     }
   19647           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19648           0 :     if ( size > 4 ) {
   19649           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19650           0 :       SWIG_fail;
   19651             :     }
   19652           0 :     if ( size < 3 ) {
   19653           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19654           0 :       SWIG_fail;
   19655             :     }
   19656           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19657           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19658           0 :       SWIG_fail;
   19659             :     }
   19660           0 :     arg1 = &ce1;
   19661             :   }
   19662           0 :   {
   19663           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19664           0 :     result = (short) ((arg1)->c1);
   19665           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19666             :   }
   19667           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19668           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; } }
   19669             :   return resultobj;
   19670             : fail:
   19671             :   return NULL;
   19672             : }
   19673             : 
   19674             : 
   19675           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19676           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19677           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19678           0 :   short arg2 ;
   19679           0 :   GDALColorEntry ce1 ;
   19680           0 :   short val2 ;
   19681           0 :   int ecode2 = 0 ;
   19682           0 :   PyObject *swig_obj[2] ;
   19683             :   
   19684           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c2_set", 2, 2, swig_obj)) SWIG_fail;
   19685           0 :   {
   19686             :     /* %typemap(in) GDALColorEntry* */
   19687           0 :     ce1.c4 = 255;
   19688           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19689           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19690           0 :       SWIG_fail;
   19691             :     }
   19692           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19693           0 :     if ( size > 4 ) {
   19694           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19695           0 :       SWIG_fail;
   19696             :     }
   19697           0 :     if ( size < 3 ) {
   19698           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19699           0 :       SWIG_fail;
   19700             :     }
   19701           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19702           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19703           0 :       SWIG_fail;
   19704             :     }
   19705           0 :     arg1 = &ce1;
   19706             :   }
   19707           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19708           0 :   if (!SWIG_IsOK(ecode2)) {
   19709           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
   19710             :   } 
   19711           0 :   arg2 = static_cast< short >(val2);
   19712           0 :   {
   19713           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19714           0 :     if (arg1) (arg1)->c2 = arg2;
   19715           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19716             :   }
   19717           0 :   resultobj = SWIG_Py_Void();
   19718           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; } }
   19719             :   return resultobj;
   19720             : fail:
   19721             :   return NULL;
   19722             : }
   19723             : 
   19724             : 
   19725           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19726           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19727           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19728           0 :   GDALColorEntry ce1 ;
   19729           0 :   PyObject *swig_obj[1] ;
   19730           0 :   short result;
   19731             :   
   19732           0 :   if (!args) SWIG_fail;
   19733           0 :   swig_obj[0] = args;
   19734           0 :   {
   19735             :     /* %typemap(in) GDALColorEntry* */
   19736           0 :     ce1.c4 = 255;
   19737           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19738           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19739           0 :       SWIG_fail;
   19740             :     }
   19741           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19742           0 :     if ( size > 4 ) {
   19743           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19744           0 :       SWIG_fail;
   19745             :     }
   19746           0 :     if ( size < 3 ) {
   19747           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19748           0 :       SWIG_fail;
   19749             :     }
   19750           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19751           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19752           0 :       SWIG_fail;
   19753             :     }
   19754           0 :     arg1 = &ce1;
   19755             :   }
   19756           0 :   {
   19757           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19758           0 :     result = (short) ((arg1)->c2);
   19759           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19760             :   }
   19761           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19762           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; } }
   19763             :   return resultobj;
   19764             : fail:
   19765             :   return NULL;
   19766             : }
   19767             : 
   19768             : 
   19769           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19770           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19771           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19772           0 :   short arg2 ;
   19773           0 :   GDALColorEntry ce1 ;
   19774           0 :   short val2 ;
   19775           0 :   int ecode2 = 0 ;
   19776           0 :   PyObject *swig_obj[2] ;
   19777             :   
   19778           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c3_set", 2, 2, swig_obj)) SWIG_fail;
   19779           0 :   {
   19780             :     /* %typemap(in) GDALColorEntry* */
   19781           0 :     ce1.c4 = 255;
   19782           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19783           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19784           0 :       SWIG_fail;
   19785             :     }
   19786           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19787           0 :     if ( size > 4 ) {
   19788           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19789           0 :       SWIG_fail;
   19790             :     }
   19791           0 :     if ( size < 3 ) {
   19792           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19793           0 :       SWIG_fail;
   19794             :     }
   19795           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19796           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19797           0 :       SWIG_fail;
   19798             :     }
   19799           0 :     arg1 = &ce1;
   19800             :   }
   19801           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19802           0 :   if (!SWIG_IsOK(ecode2)) {
   19803           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
   19804             :   } 
   19805           0 :   arg2 = static_cast< short >(val2);
   19806           0 :   {
   19807           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19808           0 :     if (arg1) (arg1)->c3 = arg2;
   19809           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19810             :   }
   19811           0 :   resultobj = SWIG_Py_Void();
   19812           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; } }
   19813             :   return resultobj;
   19814             : fail:
   19815             :   return NULL;
   19816             : }
   19817             : 
   19818             : 
   19819           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19820           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19821           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19822           0 :   GDALColorEntry ce1 ;
   19823           0 :   PyObject *swig_obj[1] ;
   19824           0 :   short result;
   19825             :   
   19826           0 :   if (!args) SWIG_fail;
   19827           0 :   swig_obj[0] = args;
   19828           0 :   {
   19829             :     /* %typemap(in) GDALColorEntry* */
   19830           0 :     ce1.c4 = 255;
   19831           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19832           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19833           0 :       SWIG_fail;
   19834             :     }
   19835           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19836           0 :     if ( size > 4 ) {
   19837           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19838           0 :       SWIG_fail;
   19839             :     }
   19840           0 :     if ( size < 3 ) {
   19841           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19842           0 :       SWIG_fail;
   19843             :     }
   19844           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19845           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19846           0 :       SWIG_fail;
   19847             :     }
   19848           0 :     arg1 = &ce1;
   19849             :   }
   19850           0 :   {
   19851           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19852           0 :     result = (short) ((arg1)->c3);
   19853           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19854             :   }
   19855           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19856           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; } }
   19857             :   return resultobj;
   19858             : fail:
   19859             :   return NULL;
   19860             : }
   19861             : 
   19862             : 
   19863           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19864           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19865           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19866           0 :   short arg2 ;
   19867           0 :   GDALColorEntry ce1 ;
   19868           0 :   short val2 ;
   19869           0 :   int ecode2 = 0 ;
   19870           0 :   PyObject *swig_obj[2] ;
   19871             :   
   19872           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c4_set", 2, 2, swig_obj)) SWIG_fail;
   19873           0 :   {
   19874             :     /* %typemap(in) GDALColorEntry* */
   19875           0 :     ce1.c4 = 255;
   19876           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19877           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19878           0 :       SWIG_fail;
   19879             :     }
   19880           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19881           0 :     if ( size > 4 ) {
   19882           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19883           0 :       SWIG_fail;
   19884             :     }
   19885           0 :     if ( size < 3 ) {
   19886           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19887           0 :       SWIG_fail;
   19888             :     }
   19889           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19890           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19891           0 :       SWIG_fail;
   19892             :     }
   19893           0 :     arg1 = &ce1;
   19894             :   }
   19895           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19896           0 :   if (!SWIG_IsOK(ecode2)) {
   19897           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
   19898             :   } 
   19899           0 :   arg2 = static_cast< short >(val2);
   19900           0 :   {
   19901           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19902           0 :     if (arg1) (arg1)->c4 = arg2;
   19903           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19904             :   }
   19905           0 :   resultobj = SWIG_Py_Void();
   19906           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; } }
   19907             :   return resultobj;
   19908             : fail:
   19909             :   return NULL;
   19910             : }
   19911             : 
   19912             : 
   19913           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19914           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19915           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19916           0 :   GDALColorEntry ce1 ;
   19917           0 :   PyObject *swig_obj[1] ;
   19918           0 :   short result;
   19919             :   
   19920           0 :   if (!args) SWIG_fail;
   19921           0 :   swig_obj[0] = args;
   19922           0 :   {
   19923             :     /* %typemap(in) GDALColorEntry* */
   19924           0 :     ce1.c4 = 255;
   19925           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19926           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19927           0 :       SWIG_fail;
   19928             :     }
   19929           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19930           0 :     if ( size > 4 ) {
   19931           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19932           0 :       SWIG_fail;
   19933             :     }
   19934           0 :     if ( size < 3 ) {
   19935           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19936           0 :       SWIG_fail;
   19937             :     }
   19938           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19939           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19940           0 :       SWIG_fail;
   19941             :     }
   19942           0 :     arg1 = &ce1;
   19943             :   }
   19944           0 :   {
   19945           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19946           0 :     result = (short) ((arg1)->c4);
   19947           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19948             :   }
   19949           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19950           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; } }
   19951             :   return resultobj;
   19952             : fail:
   19953             :   return NULL;
   19954             : }
   19955             : 
   19956             : 
   19957         277 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19958         277 :   PyObject *obj;
   19959         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19960         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
   19961         277 :   return SWIG_Py_Void();
   19962             : }
   19963             : 
   19964          92 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19965          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19966          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19967          92 :   double arg2 ;
   19968          92 :   void *argp1 = 0 ;
   19969          92 :   int res1 = 0 ;
   19970          92 :   double val2 ;
   19971          92 :   int ecode2 = 0 ;
   19972          92 :   PyObject *swig_obj[2] ;
   19973             :   
   19974          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   19975          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19976          92 :   if (!SWIG_IsOK(res1)) {
   19977           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19978             :   }
   19979          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19980          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   19981          92 :   if (!SWIG_IsOK(ecode2)) {
   19982           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   19983             :   } 
   19984          92 :   arg2 = static_cast< double >(val2);
   19985          92 :   {
   19986          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19987          92 :     if ( bLocalUseExceptions ) {
   19988          91 :       pushErrorHandler();
   19989             :     }
   19990          92 :     {
   19991          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19992          92 :       GDAL_GCP_GCPX_set(arg1,arg2);
   19993          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19994             :     }
   19995          92 :     if ( bLocalUseExceptions ) {
   19996          91 :       popErrorHandler();
   19997             :     }
   19998             : #ifndef SED_HACKS
   19999             :     if ( bLocalUseExceptions ) {
   20000             :       CPLErr eclass = CPLGetLastErrorType();
   20001             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20002             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20003             :       }
   20004             :     }
   20005             : #endif
   20006             :   }
   20007          92 :   resultobj = SWIG_Py_Void();
   20008          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; } }
   20009             :   return resultobj;
   20010             : fail:
   20011             :   return NULL;
   20012             : }
   20013             : 
   20014             : 
   20015        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20016        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20017        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20018        2205 :   void *argp1 = 0 ;
   20019        2205 :   int res1 = 0 ;
   20020        2205 :   PyObject *swig_obj[1] ;
   20021        2205 :   double result;
   20022             :   
   20023        2205 :   if (!args) SWIG_fail;
   20024        2205 :   swig_obj[0] = args;
   20025        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20026        2205 :   if (!SWIG_IsOK(res1)) {
   20027           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20028             :   }
   20029        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20030        2205 :   {
   20031        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   20032        2205 :     if ( bLocalUseExceptions ) {
   20033        2182 :       pushErrorHandler();
   20034             :     }
   20035        2205 :     {
   20036        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20037        2205 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   20038        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20039             :     }
   20040        2205 :     if ( bLocalUseExceptions ) {
   20041        2182 :       popErrorHandler();
   20042             :     }
   20043             : #ifndef SED_HACKS
   20044             :     if ( bLocalUseExceptions ) {
   20045             :       CPLErr eclass = CPLGetLastErrorType();
   20046             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20047             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20048             :       }
   20049             :     }
   20050             : #endif
   20051             :   }
   20052        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20053        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; } }
   20054             :   return resultobj;
   20055             : fail:
   20056             :   return NULL;
   20057             : }
   20058             : 
   20059             : 
   20060          92 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20061          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20062          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20063          92 :   double arg2 ;
   20064          92 :   void *argp1 = 0 ;
   20065          92 :   int res1 = 0 ;
   20066          92 :   double val2 ;
   20067          92 :   int ecode2 = 0 ;
   20068          92 :   PyObject *swig_obj[2] ;
   20069             :   
   20070          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   20071          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20072          92 :   if (!SWIG_IsOK(res1)) {
   20073           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20074             :   }
   20075          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20076          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20077          92 :   if (!SWIG_IsOK(ecode2)) {
   20078           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   20079             :   } 
   20080          92 :   arg2 = static_cast< double >(val2);
   20081          92 :   {
   20082          92 :     const int bLocalUseExceptions = GetUseExceptions();
   20083          92 :     if ( bLocalUseExceptions ) {
   20084          91 :       pushErrorHandler();
   20085             :     }
   20086          92 :     {
   20087          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20088          92 :       GDAL_GCP_GCPY_set(arg1,arg2);
   20089          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20090             :     }
   20091          92 :     if ( bLocalUseExceptions ) {
   20092          91 :       popErrorHandler();
   20093             :     }
   20094             : #ifndef SED_HACKS
   20095             :     if ( bLocalUseExceptions ) {
   20096             :       CPLErr eclass = CPLGetLastErrorType();
   20097             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20098             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20099             :       }
   20100             :     }
   20101             : #endif
   20102             :   }
   20103          92 :   resultobj = SWIG_Py_Void();
   20104          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; } }
   20105             :   return resultobj;
   20106             : fail:
   20107             :   return NULL;
   20108             : }
   20109             : 
   20110             : 
   20111        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20112        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20113        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20114        2205 :   void *argp1 = 0 ;
   20115        2205 :   int res1 = 0 ;
   20116        2205 :   PyObject *swig_obj[1] ;
   20117        2205 :   double result;
   20118             :   
   20119        2205 :   if (!args) SWIG_fail;
   20120        2205 :   swig_obj[0] = args;
   20121        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20122        2205 :   if (!SWIG_IsOK(res1)) {
   20123           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20124             :   }
   20125        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20126        2205 :   {
   20127        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   20128        2205 :     if ( bLocalUseExceptions ) {
   20129        2182 :       pushErrorHandler();
   20130             :     }
   20131        2205 :     {
   20132        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20133        2205 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   20134        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20135             :     }
   20136        2205 :     if ( bLocalUseExceptions ) {
   20137        2182 :       popErrorHandler();
   20138             :     }
   20139             : #ifndef SED_HACKS
   20140             :     if ( bLocalUseExceptions ) {
   20141             :       CPLErr eclass = CPLGetLastErrorType();
   20142             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20143             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20144             :       }
   20145             :     }
   20146             : #endif
   20147             :   }
   20148        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20149        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; } }
   20150             :   return resultobj;
   20151             : fail:
   20152             :   return NULL;
   20153             : }
   20154             : 
   20155             : 
   20156           0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20157           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20158           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20159           0 :   double arg2 ;
   20160           0 :   void *argp1 = 0 ;
   20161           0 :   int res1 = 0 ;
   20162           0 :   double val2 ;
   20163           0 :   int ecode2 = 0 ;
   20164           0 :   PyObject *swig_obj[2] ;
   20165             :   
   20166           0 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   20167           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20168           0 :   if (!SWIG_IsOK(res1)) {
   20169           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20170             :   }
   20171           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20172           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20173           0 :   if (!SWIG_IsOK(ecode2)) {
   20174           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   20175             :   } 
   20176           0 :   arg2 = static_cast< double >(val2);
   20177           0 :   {
   20178           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20179           0 :     if ( bLocalUseExceptions ) {
   20180           0 :       pushErrorHandler();
   20181             :     }
   20182           0 :     {
   20183           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20184           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   20185           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20186             :     }
   20187           0 :     if ( bLocalUseExceptions ) {
   20188           0 :       popErrorHandler();
   20189             :     }
   20190             : #ifndef SED_HACKS
   20191             :     if ( bLocalUseExceptions ) {
   20192             :       CPLErr eclass = CPLGetLastErrorType();
   20193             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20194             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20195             :       }
   20196             :     }
   20197             : #endif
   20198             :   }
   20199           0 :   resultobj = SWIG_Py_Void();
   20200           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; } }
   20201             :   return resultobj;
   20202             : fail:
   20203             :   return NULL;
   20204             : }
   20205             : 
   20206             : 
   20207          42 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20208          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20209          42 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20210          42 :   void *argp1 = 0 ;
   20211          42 :   int res1 = 0 ;
   20212          42 :   PyObject *swig_obj[1] ;
   20213          42 :   double result;
   20214             :   
   20215          42 :   if (!args) SWIG_fail;
   20216          42 :   swig_obj[0] = args;
   20217          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20218          42 :   if (!SWIG_IsOK(res1)) {
   20219           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20220             :   }
   20221          42 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20222          42 :   {
   20223          42 :     const int bLocalUseExceptions = GetUseExceptions();
   20224          42 :     if ( bLocalUseExceptions ) {
   20225          29 :       pushErrorHandler();
   20226             :     }
   20227          42 :     {
   20228          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20229          42 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   20230          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20231             :     }
   20232          42 :     if ( bLocalUseExceptions ) {
   20233          29 :       popErrorHandler();
   20234             :     }
   20235             : #ifndef SED_HACKS
   20236             :     if ( bLocalUseExceptions ) {
   20237             :       CPLErr eclass = CPLGetLastErrorType();
   20238             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20239             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20240             :       }
   20241             :     }
   20242             : #endif
   20243             :   }
   20244          42 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20245          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; } }
   20246             :   return resultobj;
   20247             : fail:
   20248             :   return NULL;
   20249             : }
   20250             : 
   20251             : 
   20252         100 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20253         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20254         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20255         100 :   double arg2 ;
   20256         100 :   void *argp1 = 0 ;
   20257         100 :   int res1 = 0 ;
   20258         100 :   double val2 ;
   20259         100 :   int ecode2 = 0 ;
   20260         100 :   PyObject *swig_obj[2] ;
   20261             :   
   20262         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   20263         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20264         100 :   if (!SWIG_IsOK(res1)) {
   20265           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20266             :   }
   20267         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20268         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20269         100 :   if (!SWIG_IsOK(ecode2)) {
   20270           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   20271             :   } 
   20272         100 :   arg2 = static_cast< double >(val2);
   20273         100 :   {
   20274         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20275         100 :     if ( bLocalUseExceptions ) {
   20276          99 :       pushErrorHandler();
   20277             :     }
   20278         100 :     {
   20279         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20280         100 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   20281         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20282             :     }
   20283         100 :     if ( bLocalUseExceptions ) {
   20284          99 :       popErrorHandler();
   20285             :     }
   20286             : #ifndef SED_HACKS
   20287             :     if ( bLocalUseExceptions ) {
   20288             :       CPLErr eclass = CPLGetLastErrorType();
   20289             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20290             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20291             :       }
   20292             :     }
   20293             : #endif
   20294             :   }
   20295         100 :   resultobj = SWIG_Py_Void();
   20296         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; } }
   20297             :   return resultobj;
   20298             : fail:
   20299             :   return NULL;
   20300             : }
   20301             : 
   20302             : 
   20303        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20304        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20305        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20306        8554 :   void *argp1 = 0 ;
   20307        8554 :   int res1 = 0 ;
   20308        8554 :   PyObject *swig_obj[1] ;
   20309        8554 :   double result;
   20310             :   
   20311        8554 :   if (!args) SWIG_fail;
   20312        8554 :   swig_obj[0] = args;
   20313        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20314        8554 :   if (!SWIG_IsOK(res1)) {
   20315           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20316             :   }
   20317        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20318        8554 :   {
   20319        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20320        8554 :     if ( bLocalUseExceptions ) {
   20321        8531 :       pushErrorHandler();
   20322             :     }
   20323        8554 :     {
   20324        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20325        8554 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   20326        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20327             :     }
   20328        8554 :     if ( bLocalUseExceptions ) {
   20329        8531 :       popErrorHandler();
   20330             :     }
   20331             : #ifndef SED_HACKS
   20332             :     if ( bLocalUseExceptions ) {
   20333             :       CPLErr eclass = CPLGetLastErrorType();
   20334             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20335             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20336             :       }
   20337             :     }
   20338             : #endif
   20339             :   }
   20340        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20341        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; } }
   20342             :   return resultobj;
   20343             : fail:
   20344             :   return NULL;
   20345             : }
   20346             : 
   20347             : 
   20348         100 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20349         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20350         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20351         100 :   double arg2 ;
   20352         100 :   void *argp1 = 0 ;
   20353         100 :   int res1 = 0 ;
   20354         100 :   double val2 ;
   20355         100 :   int ecode2 = 0 ;
   20356         100 :   PyObject *swig_obj[2] ;
   20357             :   
   20358         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   20359         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20360         100 :   if (!SWIG_IsOK(res1)) {
   20361           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20362             :   }
   20363         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20364         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20365         100 :   if (!SWIG_IsOK(ecode2)) {
   20366           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   20367             :   } 
   20368         100 :   arg2 = static_cast< double >(val2);
   20369         100 :   {
   20370         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20371         100 :     if ( bLocalUseExceptions ) {
   20372          99 :       pushErrorHandler();
   20373             :     }
   20374         100 :     {
   20375         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20376         100 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   20377         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20378             :     }
   20379         100 :     if ( bLocalUseExceptions ) {
   20380          99 :       popErrorHandler();
   20381             :     }
   20382             : #ifndef SED_HACKS
   20383             :     if ( bLocalUseExceptions ) {
   20384             :       CPLErr eclass = CPLGetLastErrorType();
   20385             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20386             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20387             :       }
   20388             :     }
   20389             : #endif
   20390             :   }
   20391         100 :   resultobj = SWIG_Py_Void();
   20392         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; } }
   20393             :   return resultobj;
   20394             : fail:
   20395             :   return NULL;
   20396             : }
   20397             : 
   20398             : 
   20399        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20400        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20401        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20402        8554 :   void *argp1 = 0 ;
   20403        8554 :   int res1 = 0 ;
   20404        8554 :   PyObject *swig_obj[1] ;
   20405        8554 :   double result;
   20406             :   
   20407        8554 :   if (!args) SWIG_fail;
   20408        8554 :   swig_obj[0] = args;
   20409        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20410        8554 :   if (!SWIG_IsOK(res1)) {
   20411           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20412             :   }
   20413        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20414        8554 :   {
   20415        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20416        8554 :     if ( bLocalUseExceptions ) {
   20417        8531 :       pushErrorHandler();
   20418             :     }
   20419        8554 :     {
   20420        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20421        8554 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   20422        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20423             :     }
   20424        8554 :     if ( bLocalUseExceptions ) {
   20425        8531 :       popErrorHandler();
   20426             :     }
   20427             : #ifndef SED_HACKS
   20428             :     if ( bLocalUseExceptions ) {
   20429             :       CPLErr eclass = CPLGetLastErrorType();
   20430             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20431             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20432             :       }
   20433             :     }
   20434             : #endif
   20435             :   }
   20436        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20437        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; } }
   20438             :   return resultobj;
   20439             : fail:
   20440             :   return NULL;
   20441             : }
   20442             : 
   20443             : 
   20444           1 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20445           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20446           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20447           1 :   char *arg2 = (char *) 0 ;
   20448           1 :   void *argp1 = 0 ;
   20449           1 :   int res1 = 0 ;
   20450           1 :   int res2 ;
   20451           1 :   char *buf2 = 0 ;
   20452           1 :   int alloc2 = 0 ;
   20453           1 :   PyObject *swig_obj[2] ;
   20454             :   
   20455           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   20456           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20457           1 :   if (!SWIG_IsOK(res1)) {
   20458           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20459             :   }
   20460           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20461           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20462           1 :   if (!SWIG_IsOK(res2)) {
   20463           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
   20464             :   }
   20465           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20466           1 :   {
   20467           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20468           1 :     if ( bLocalUseExceptions ) {
   20469           1 :       pushErrorHandler();
   20470             :     }
   20471           1 :     {
   20472           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20473           1 :       GDAL_GCP_Info_set(arg1,arg2);
   20474           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20475             :     }
   20476           1 :     if ( bLocalUseExceptions ) {
   20477           1 :       popErrorHandler();
   20478             :     }
   20479             : #ifndef SED_HACKS
   20480             :     if ( bLocalUseExceptions ) {
   20481             :       CPLErr eclass = CPLGetLastErrorType();
   20482             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20483             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20484             :       }
   20485             :     }
   20486             : #endif
   20487             :   }
   20488           1 :   resultobj = SWIG_Py_Void();
   20489           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20490           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; } }
   20491             :   return resultobj;
   20492           0 : fail:
   20493           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20494             :   return NULL;
   20495             : }
   20496             : 
   20497             : 
   20498           9 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20499           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20500           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20501           9 :   void *argp1 = 0 ;
   20502           9 :   int res1 = 0 ;
   20503           9 :   PyObject *swig_obj[1] ;
   20504           9 :   char *result = 0 ;
   20505             :   
   20506           9 :   if (!args) SWIG_fail;
   20507           9 :   swig_obj[0] = args;
   20508           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20509           9 :   if (!SWIG_IsOK(res1)) {
   20510           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20511             :   }
   20512           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20513           9 :   {
   20514           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20515           9 :     if ( bLocalUseExceptions ) {
   20516           5 :       pushErrorHandler();
   20517             :     }
   20518           9 :     {
   20519           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20520           9 :       result = (char *)GDAL_GCP_Info_get(arg1);
   20521           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20522             :     }
   20523           9 :     if ( bLocalUseExceptions ) {
   20524           5 :       popErrorHandler();
   20525             :     }
   20526             : #ifndef SED_HACKS
   20527             :     if ( bLocalUseExceptions ) {
   20528             :       CPLErr eclass = CPLGetLastErrorType();
   20529             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20530             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20531             :       }
   20532             :     }
   20533             : #endif
   20534             :   }
   20535           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20536           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; } }
   20537             :   return resultobj;
   20538             : fail:
   20539             :   return NULL;
   20540             : }
   20541             : 
   20542             : 
   20543           1 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20544           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20545           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20546           1 :   char *arg2 = (char *) 0 ;
   20547           1 :   void *argp1 = 0 ;
   20548           1 :   int res1 = 0 ;
   20549           1 :   int res2 ;
   20550           1 :   char *buf2 = 0 ;
   20551           1 :   int alloc2 = 0 ;
   20552           1 :   PyObject *swig_obj[2] ;
   20553             :   
   20554           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   20555           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20556           1 :   if (!SWIG_IsOK(res1)) {
   20557           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20558             :   }
   20559           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20560           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20561           1 :   if (!SWIG_IsOK(res2)) {
   20562           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
   20563             :   }
   20564           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20565           1 :   {
   20566           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20567           1 :     if ( bLocalUseExceptions ) {
   20568           1 :       pushErrorHandler();
   20569             :     }
   20570           1 :     {
   20571           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20572           1 :       GDAL_GCP_Id_set(arg1,arg2);
   20573           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20574             :     }
   20575           1 :     if ( bLocalUseExceptions ) {
   20576           1 :       popErrorHandler();
   20577             :     }
   20578             : #ifndef SED_HACKS
   20579             :     if ( bLocalUseExceptions ) {
   20580             :       CPLErr eclass = CPLGetLastErrorType();
   20581             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20582             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20583             :       }
   20584             :     }
   20585             : #endif
   20586             :   }
   20587           1 :   resultobj = SWIG_Py_Void();
   20588           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20589           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; } }
   20590             :   return resultobj;
   20591           0 : fail:
   20592           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20593             :   return NULL;
   20594             : }
   20595             : 
   20596             : 
   20597           9 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20598           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20599           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20600           9 :   void *argp1 = 0 ;
   20601           9 :   int res1 = 0 ;
   20602           9 :   PyObject *swig_obj[1] ;
   20603           9 :   char *result = 0 ;
   20604             :   
   20605           9 :   if (!args) SWIG_fail;
   20606           9 :   swig_obj[0] = args;
   20607           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20608           9 :   if (!SWIG_IsOK(res1)) {
   20609           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20610             :   }
   20611           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20612           9 :   {
   20613           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20614           9 :     if ( bLocalUseExceptions ) {
   20615           5 :       pushErrorHandler();
   20616             :     }
   20617           9 :     {
   20618           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20619           9 :       result = (char *)GDAL_GCP_Id_get(arg1);
   20620           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20621             :     }
   20622           9 :     if ( bLocalUseExceptions ) {
   20623           5 :       popErrorHandler();
   20624             :     }
   20625             : #ifndef SED_HACKS
   20626             :     if ( bLocalUseExceptions ) {
   20627             :       CPLErr eclass = CPLGetLastErrorType();
   20628             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20629             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20630             :       }
   20631             :     }
   20632             : #endif
   20633             :   }
   20634           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20635           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; } }
   20636             :   return resultobj;
   20637             : fail:
   20638             :   return NULL;
   20639             : }
   20640             : 
   20641             : 
   20642         130 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20643         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20644         130 :   double arg1 = (double) 0.0 ;
   20645         130 :   double arg2 = (double) 0.0 ;
   20646         130 :   double arg3 = (double) 0.0 ;
   20647         130 :   double arg4 = (double) 0.0 ;
   20648         130 :   double arg5 = (double) 0.0 ;
   20649         130 :   char *arg6 = (char *) "" ;
   20650         130 :   char *arg7 = (char *) "" ;
   20651         130 :   double val1 ;
   20652         130 :   int ecode1 = 0 ;
   20653         130 :   double val2 ;
   20654         130 :   int ecode2 = 0 ;
   20655         130 :   double val3 ;
   20656         130 :   int ecode3 = 0 ;
   20657         130 :   double val4 ;
   20658         130 :   int ecode4 = 0 ;
   20659         130 :   double val5 ;
   20660         130 :   int ecode5 = 0 ;
   20661         130 :   int res6 ;
   20662         130 :   char *buf6 = 0 ;
   20663         130 :   int alloc6 = 0 ;
   20664         130 :   int res7 ;
   20665         130 :   char *buf7 = 0 ;
   20666         130 :   int alloc7 = 0 ;
   20667         130 :   PyObject *swig_obj[7] ;
   20668         130 :   GDAL_GCP *result = 0 ;
   20669             :   
   20670         130 :   if (!SWIG_Python_UnpackTuple(args, "new_GCP", 0, 7, swig_obj)) SWIG_fail;
   20671         130 :   if (swig_obj[0]) {
   20672          38 :     ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   20673          38 :     if (!SWIG_IsOK(ecode1)) {
   20674           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
   20675             :     } 
   20676          38 :     arg1 = static_cast< double >(val1);
   20677             :   }
   20678         130 :   if (swig_obj[1]) {
   20679          38 :     ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20680          38 :     if (!SWIG_IsOK(ecode2)) {
   20681           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
   20682             :     } 
   20683          38 :     arg2 = static_cast< double >(val2);
   20684             :   }
   20685         130 :   if (swig_obj[2]) {
   20686          38 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   20687          38 :     if (!SWIG_IsOK(ecode3)) {
   20688           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
   20689             :     } 
   20690          38 :     arg3 = static_cast< double >(val3);
   20691             :   }
   20692         130 :   if (swig_obj[3]) {
   20693          38 :     ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   20694          38 :     if (!SWIG_IsOK(ecode4)) {
   20695           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
   20696             :     } 
   20697          38 :     arg4 = static_cast< double >(val4);
   20698             :   }
   20699         130 :   if (swig_obj[4]) {
   20700          38 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   20701          38 :     if (!SWIG_IsOK(ecode5)) {
   20702           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
   20703             :     } 
   20704          38 :     arg5 = static_cast< double >(val5);
   20705             :   }
   20706         130 :   if (swig_obj[5]) {
   20707           0 :     res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
   20708           0 :     if (!SWIG_IsOK(res6)) {
   20709           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
   20710             :     }
   20711           0 :     arg6 = reinterpret_cast< char * >(buf6);
   20712             :   }
   20713         130 :   if (swig_obj[6]) {
   20714           0 :     res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
   20715           0 :     if (!SWIG_IsOK(res7)) {
   20716           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
   20717             :     }
   20718           0 :     arg7 = reinterpret_cast< char * >(buf7);
   20719             :   }
   20720         130 :   {
   20721         130 :     const int bLocalUseExceptions = GetUseExceptions();
   20722         130 :     if ( bLocalUseExceptions ) {
   20723         119 :       pushErrorHandler();
   20724             :     }
   20725         130 :     {
   20726         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20727         130 :       result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
   20728         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20729             :     }
   20730         130 :     if ( bLocalUseExceptions ) {
   20731         119 :       popErrorHandler();
   20732             :     }
   20733             : #ifndef SED_HACKS
   20734             :     if ( bLocalUseExceptions ) {
   20735             :       CPLErr eclass = CPLGetLastErrorType();
   20736             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20737             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20738             :       }
   20739             :     }
   20740             : #endif
   20741             :   }
   20742         130 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
   20743         130 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20744         130 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20745         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; } }
   20746             :   return resultobj;
   20747           0 : fail:
   20748           0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20749           0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20750             :   return NULL;
   20751             : }
   20752             : 
   20753             : 
   20754        3428 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20755        3428 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20756        3428 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20757        3428 :   void *argp1 = 0 ;
   20758        3428 :   int res1 = 0 ;
   20759        3428 :   PyObject *swig_obj[1] ;
   20760             :   
   20761        3428 :   if (!args) SWIG_fail;
   20762        3428 :   swig_obj[0] = args;
   20763        3428 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
   20764        3428 :   if (!SWIG_IsOK(res1)) {
   20765           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20766             :   }
   20767        3428 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20768        3428 :   {
   20769        3428 :     const int bLocalUseExceptions = GetUseExceptions();
   20770        3428 :     if ( bLocalUseExceptions ) {
   20771        3337 :       pushErrorHandler();
   20772             :     }
   20773        3428 :     {
   20774        3428 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20775        3428 :       delete_GDAL_GCP(arg1);
   20776        3428 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20777             :     }
   20778        3428 :     if ( bLocalUseExceptions ) {
   20779        3337 :       popErrorHandler();
   20780             :     }
   20781             : #ifndef SED_HACKS
   20782             :     if ( bLocalUseExceptions ) {
   20783             :       CPLErr eclass = CPLGetLastErrorType();
   20784             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20785             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20786             :       }
   20787             :     }
   20788             : #endif
   20789             :   }
   20790        3428 :   resultobj = SWIG_Py_Void();
   20791        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; } }
   20792             :   return resultobj;
   20793             : fail:
   20794             :   return NULL;
   20795             : }
   20796             : 
   20797             : 
   20798         277 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20799         277 :   PyObject *obj;
   20800         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   20801         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
   20802         277 :   return SWIG_Py_Void();
   20803             : }
   20804             : 
   20805         130 : SWIGINTERN PyObject *GCP_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20806         130 :   return SWIG_Python_InitShadowInstance(args);
   20807             : }
   20808             : 
   20809           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20810           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20811           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20812           0 :   void *argp1 = 0 ;
   20813           0 :   int res1 = 0 ;
   20814           0 :   PyObject *swig_obj[1] ;
   20815           0 :   double result;
   20816             :   
   20817           0 :   if (!args) SWIG_fail;
   20818           0 :   swig_obj[0] = args;
   20819           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20820           0 :   if (!SWIG_IsOK(res1)) {
   20821           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20822             :   }
   20823           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20824           0 :   {
   20825           0 :     if (!arg1) {
   20826           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20827             :     }
   20828             :   }
   20829           0 :   {
   20830           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20831           0 :     if ( bLocalUseExceptions ) {
   20832           0 :       pushErrorHandler();
   20833             :     }
   20834           0 :     {
   20835           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20836           0 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   20837           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20838             :     }
   20839           0 :     if ( bLocalUseExceptions ) {
   20840           0 :       popErrorHandler();
   20841             :     }
   20842             : #ifndef SED_HACKS
   20843             :     if ( bLocalUseExceptions ) {
   20844             :       CPLErr eclass = CPLGetLastErrorType();
   20845             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20846             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20847             :       }
   20848             :     }
   20849             : #endif
   20850             :   }
   20851           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20852           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; } }
   20853             :   return resultobj;
   20854             : fail:
   20855             :   return NULL;
   20856             : }
   20857             : 
   20858             : 
   20859           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20860           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20861           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20862           0 :   double arg2 ;
   20863           0 :   void *argp1 = 0 ;
   20864           0 :   int res1 = 0 ;
   20865           0 :   double val2 ;
   20866           0 :   int ecode2 = 0 ;
   20867           0 :   PyObject *swig_obj[2] ;
   20868             :   
   20869           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   20870           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20871           0 :   if (!SWIG_IsOK(res1)) {
   20872           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20873             :   }
   20874           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20875           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20876           0 :   if (!SWIG_IsOK(ecode2)) {
   20877           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   20878             :   } 
   20879           0 :   arg2 = static_cast< double >(val2);
   20880           0 :   {
   20881           0 :     if (!arg1) {
   20882           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20883             :     }
   20884             :   }
   20885           0 :   {
   20886           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20887           0 :     if ( bLocalUseExceptions ) {
   20888           0 :       pushErrorHandler();
   20889             :     }
   20890           0 :     {
   20891           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20892           0 :       GDAL_GCP_GCPX_set(arg1,arg2);
   20893           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20894             :     }
   20895           0 :     if ( bLocalUseExceptions ) {
   20896           0 :       popErrorHandler();
   20897             :     }
   20898             : #ifndef SED_HACKS
   20899             :     if ( bLocalUseExceptions ) {
   20900             :       CPLErr eclass = CPLGetLastErrorType();
   20901             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20902             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20903             :       }
   20904             :     }
   20905             : #endif
   20906             :   }
   20907           0 :   resultobj = SWIG_Py_Void();
   20908           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; } }
   20909             :   return resultobj;
   20910             : fail:
   20911             :   return NULL;
   20912             : }
   20913             : 
   20914             : 
   20915           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20916           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20917           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20918           0 :   void *argp1 = 0 ;
   20919           0 :   int res1 = 0 ;
   20920           0 :   PyObject *swig_obj[1] ;
   20921           0 :   double result;
   20922             :   
   20923           0 :   if (!args) SWIG_fail;
   20924           0 :   swig_obj[0] = args;
   20925           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20926           0 :   if (!SWIG_IsOK(res1)) {
   20927           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20928             :   }
   20929           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20930           0 :   {
   20931           0 :     if (!arg1) {
   20932           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20933             :     }
   20934             :   }
   20935           0 :   {
   20936           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20937           0 :     if ( bLocalUseExceptions ) {
   20938           0 :       pushErrorHandler();
   20939             :     }
   20940           0 :     {
   20941           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20942           0 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   20943           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20944             :     }
   20945           0 :     if ( bLocalUseExceptions ) {
   20946           0 :       popErrorHandler();
   20947             :     }
   20948             : #ifndef SED_HACKS
   20949             :     if ( bLocalUseExceptions ) {
   20950             :       CPLErr eclass = CPLGetLastErrorType();
   20951             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20952             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20953             :       }
   20954             :     }
   20955             : #endif
   20956             :   }
   20957           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20958           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; } }
   20959             :   return resultobj;
   20960             : fail:
   20961             :   return NULL;
   20962             : }
   20963             : 
   20964             : 
   20965           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20966           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20967           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20968           0 :   double arg2 ;
   20969           0 :   void *argp1 = 0 ;
   20970           0 :   int res1 = 0 ;
   20971           0 :   double val2 ;
   20972           0 :   int ecode2 = 0 ;
   20973           0 :   PyObject *swig_obj[2] ;
   20974             :   
   20975           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   20976           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20977           0 :   if (!SWIG_IsOK(res1)) {
   20978           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20979             :   }
   20980           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20981           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20982           0 :   if (!SWIG_IsOK(ecode2)) {
   20983           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   20984             :   } 
   20985           0 :   arg2 = static_cast< double >(val2);
   20986           0 :   {
   20987           0 :     if (!arg1) {
   20988           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20989             :     }
   20990             :   }
   20991           0 :   {
   20992           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20993           0 :     if ( bLocalUseExceptions ) {
   20994           0 :       pushErrorHandler();
   20995             :     }
   20996           0 :     {
   20997           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20998           0 :       GDAL_GCP_GCPY_set(arg1,arg2);
   20999           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21000             :     }
   21001           0 :     if ( bLocalUseExceptions ) {
   21002           0 :       popErrorHandler();
   21003             :     }
   21004             : #ifndef SED_HACKS
   21005             :     if ( bLocalUseExceptions ) {
   21006             :       CPLErr eclass = CPLGetLastErrorType();
   21007             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21008             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21009             :       }
   21010             :     }
   21011             : #endif
   21012             :   }
   21013           0 :   resultobj = SWIG_Py_Void();
   21014           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; } }
   21015             :   return resultobj;
   21016             : fail:
   21017             :   return NULL;
   21018             : }
   21019             : 
   21020             : 
   21021           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21022           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21023           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21024           0 :   void *argp1 = 0 ;
   21025           0 :   int res1 = 0 ;
   21026           0 :   PyObject *swig_obj[1] ;
   21027           0 :   double result;
   21028             :   
   21029           0 :   if (!args) SWIG_fail;
   21030           0 :   swig_obj[0] = args;
   21031           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21032           0 :   if (!SWIG_IsOK(res1)) {
   21033           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21034             :   }
   21035           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21036           0 :   {
   21037           0 :     if (!arg1) {
   21038           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21039             :     }
   21040             :   }
   21041           0 :   {
   21042           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21043           0 :     if ( bLocalUseExceptions ) {
   21044           0 :       pushErrorHandler();
   21045             :     }
   21046           0 :     {
   21047           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21048           0 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   21049           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21050             :     }
   21051           0 :     if ( bLocalUseExceptions ) {
   21052           0 :       popErrorHandler();
   21053             :     }
   21054             : #ifndef SED_HACKS
   21055             :     if ( bLocalUseExceptions ) {
   21056             :       CPLErr eclass = CPLGetLastErrorType();
   21057             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21058             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21059             :       }
   21060             :     }
   21061             : #endif
   21062             :   }
   21063           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21064           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; } }
   21065             :   return resultobj;
   21066             : fail:
   21067             :   return NULL;
   21068             : }
   21069             : 
   21070             : 
   21071           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21072           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21073           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21074           0 :   double arg2 ;
   21075           0 :   void *argp1 = 0 ;
   21076           0 :   int res1 = 0 ;
   21077           0 :   double val2 ;
   21078           0 :   int ecode2 = 0 ;
   21079           0 :   PyObject *swig_obj[2] ;
   21080             :   
   21081           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   21082           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21083           0 :   if (!SWIG_IsOK(res1)) {
   21084           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21085             :   }
   21086           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21087           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21088           0 :   if (!SWIG_IsOK(ecode2)) {
   21089           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   21090             :   } 
   21091           0 :   arg2 = static_cast< double >(val2);
   21092           0 :   {
   21093           0 :     if (!arg1) {
   21094           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21095             :     }
   21096             :   }
   21097           0 :   {
   21098           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21099           0 :     if ( bLocalUseExceptions ) {
   21100           0 :       pushErrorHandler();
   21101             :     }
   21102           0 :     {
   21103           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21104           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   21105           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21106             :     }
   21107           0 :     if ( bLocalUseExceptions ) {
   21108           0 :       popErrorHandler();
   21109             :     }
   21110             : #ifndef SED_HACKS
   21111             :     if ( bLocalUseExceptions ) {
   21112             :       CPLErr eclass = CPLGetLastErrorType();
   21113             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21114             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21115             :       }
   21116             :     }
   21117             : #endif
   21118             :   }
   21119           0 :   resultobj = SWIG_Py_Void();
   21120           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; } }
   21121             :   return resultobj;
   21122             : fail:
   21123             :   return NULL;
   21124             : }
   21125             : 
   21126             : 
   21127           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21128           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21129           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21130           0 :   void *argp1 = 0 ;
   21131           0 :   int res1 = 0 ;
   21132           0 :   PyObject *swig_obj[1] ;
   21133           0 :   double result;
   21134             :   
   21135           0 :   if (!args) SWIG_fail;
   21136           0 :   swig_obj[0] = args;
   21137           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21138           0 :   if (!SWIG_IsOK(res1)) {
   21139           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21140             :   }
   21141           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21142           0 :   {
   21143           0 :     if (!arg1) {
   21144           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21145             :     }
   21146             :   }
   21147           0 :   {
   21148           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21149           0 :     if ( bLocalUseExceptions ) {
   21150           0 :       pushErrorHandler();
   21151             :     }
   21152           0 :     {
   21153           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21154           0 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   21155           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21156             :     }
   21157           0 :     if ( bLocalUseExceptions ) {
   21158           0 :       popErrorHandler();
   21159             :     }
   21160             : #ifndef SED_HACKS
   21161             :     if ( bLocalUseExceptions ) {
   21162             :       CPLErr eclass = CPLGetLastErrorType();
   21163             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21164             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21165             :       }
   21166             :     }
   21167             : #endif
   21168             :   }
   21169           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21170           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; } }
   21171             :   return resultobj;
   21172             : fail:
   21173             :   return NULL;
   21174             : }
   21175             : 
   21176             : 
   21177           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21178           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21179           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21180           0 :   double arg2 ;
   21181           0 :   void *argp1 = 0 ;
   21182           0 :   int res1 = 0 ;
   21183           0 :   double val2 ;
   21184           0 :   int ecode2 = 0 ;
   21185           0 :   PyObject *swig_obj[2] ;
   21186             :   
   21187           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   21188           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21189           0 :   if (!SWIG_IsOK(res1)) {
   21190           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21191             :   }
   21192           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21193           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21194           0 :   if (!SWIG_IsOK(ecode2)) {
   21195           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   21196             :   } 
   21197           0 :   arg2 = static_cast< double >(val2);
   21198           0 :   {
   21199           0 :     if (!arg1) {
   21200           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21201             :     }
   21202             :   }
   21203           0 :   {
   21204           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21205           0 :     if ( bLocalUseExceptions ) {
   21206           0 :       pushErrorHandler();
   21207             :     }
   21208           0 :     {
   21209           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21210           0 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   21211           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21212             :     }
   21213           0 :     if ( bLocalUseExceptions ) {
   21214           0 :       popErrorHandler();
   21215             :     }
   21216             : #ifndef SED_HACKS
   21217             :     if ( bLocalUseExceptions ) {
   21218             :       CPLErr eclass = CPLGetLastErrorType();
   21219             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21220             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21221             :       }
   21222             :     }
   21223             : #endif
   21224             :   }
   21225           0 :   resultobj = SWIG_Py_Void();
   21226           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; } }
   21227             :   return resultobj;
   21228             : fail:
   21229             :   return NULL;
   21230             : }
   21231             : 
   21232             : 
   21233           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21234           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21235           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21236           0 :   void *argp1 = 0 ;
   21237           0 :   int res1 = 0 ;
   21238           0 :   PyObject *swig_obj[1] ;
   21239           0 :   double result;
   21240             :   
   21241           0 :   if (!args) SWIG_fail;
   21242           0 :   swig_obj[0] = args;
   21243           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21244           0 :   if (!SWIG_IsOK(res1)) {
   21245           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21246             :   }
   21247           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21248           0 :   {
   21249           0 :     if (!arg1) {
   21250           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21251             :     }
   21252             :   }
   21253           0 :   {
   21254           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21255           0 :     if ( bLocalUseExceptions ) {
   21256           0 :       pushErrorHandler();
   21257             :     }
   21258           0 :     {
   21259           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21260           0 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   21261           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21262             :     }
   21263           0 :     if ( bLocalUseExceptions ) {
   21264           0 :       popErrorHandler();
   21265             :     }
   21266             : #ifndef SED_HACKS
   21267             :     if ( bLocalUseExceptions ) {
   21268             :       CPLErr eclass = CPLGetLastErrorType();
   21269             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21270             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21271             :       }
   21272             :     }
   21273             : #endif
   21274             :   }
   21275           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21276           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; } }
   21277             :   return resultobj;
   21278             : fail:
   21279             :   return NULL;
   21280             : }
   21281             : 
   21282             : 
   21283           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21284           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21285           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21286           0 :   double arg2 ;
   21287           0 :   void *argp1 = 0 ;
   21288           0 :   int res1 = 0 ;
   21289           0 :   double val2 ;
   21290           0 :   int ecode2 = 0 ;
   21291           0 :   PyObject *swig_obj[2] ;
   21292             :   
   21293           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   21294           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21295           0 :   if (!SWIG_IsOK(res1)) {
   21296           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21297             :   }
   21298           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21299           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21300           0 :   if (!SWIG_IsOK(ecode2)) {
   21301           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   21302             :   } 
   21303           0 :   arg2 = static_cast< double >(val2);
   21304           0 :   {
   21305           0 :     if (!arg1) {
   21306           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21307             :     }
   21308             :   }
   21309           0 :   {
   21310           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21311           0 :     if ( bLocalUseExceptions ) {
   21312           0 :       pushErrorHandler();
   21313             :     }
   21314           0 :     {
   21315           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21316           0 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   21317           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21318             :     }
   21319           0 :     if ( bLocalUseExceptions ) {
   21320           0 :       popErrorHandler();
   21321             :     }
   21322             : #ifndef SED_HACKS
   21323             :     if ( bLocalUseExceptions ) {
   21324             :       CPLErr eclass = CPLGetLastErrorType();
   21325             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21326             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21327             :       }
   21328             :     }
   21329             : #endif
   21330             :   }
   21331           0 :   resultobj = SWIG_Py_Void();
   21332           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; } }
   21333             :   return resultobj;
   21334             : fail:
   21335             :   return NULL;
   21336             : }
   21337             : 
   21338             : 
   21339           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21340           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21341           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21342           0 :   void *argp1 = 0 ;
   21343           0 :   int res1 = 0 ;
   21344           0 :   PyObject *swig_obj[1] ;
   21345           0 :   char *result = 0 ;
   21346             :   
   21347           0 :   if (!args) SWIG_fail;
   21348           0 :   swig_obj[0] = args;
   21349           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21350           0 :   if (!SWIG_IsOK(res1)) {
   21351           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21352             :   }
   21353           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21354           0 :   {
   21355           0 :     if (!arg1) {
   21356           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21357             :     }
   21358             :   }
   21359           0 :   {
   21360           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21361           0 :     if ( bLocalUseExceptions ) {
   21362           0 :       pushErrorHandler();
   21363             :     }
   21364           0 :     {
   21365           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21366           0 :       result = (char *)GDAL_GCP_Info_get(arg1);
   21367           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21368             :     }
   21369           0 :     if ( bLocalUseExceptions ) {
   21370           0 :       popErrorHandler();
   21371             :     }
   21372             : #ifndef SED_HACKS
   21373             :     if ( bLocalUseExceptions ) {
   21374             :       CPLErr eclass = CPLGetLastErrorType();
   21375             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21376             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21377             :       }
   21378             :     }
   21379             : #endif
   21380             :   }
   21381           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21382           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; } }
   21383             :   return resultobj;
   21384             : fail:
   21385             :   return NULL;
   21386             : }
   21387             : 
   21388             : 
   21389           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21390           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21391           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21392           0 :   char *arg2 = (char *) 0 ;
   21393           0 :   void *argp1 = 0 ;
   21394           0 :   int res1 = 0 ;
   21395           0 :   int res2 ;
   21396           0 :   char *buf2 = 0 ;
   21397           0 :   int alloc2 = 0 ;
   21398           0 :   PyObject *swig_obj[2] ;
   21399             :   
   21400           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   21401           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21402           0 :   if (!SWIG_IsOK(res1)) {
   21403           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21404             :   }
   21405           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21406           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21407           0 :   if (!SWIG_IsOK(res2)) {
   21408           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
   21409             :   }
   21410           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21411           0 :   {
   21412           0 :     if (!arg1) {
   21413           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21414             :     }
   21415             :   }
   21416           0 :   {
   21417           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21418           0 :     if ( bLocalUseExceptions ) {
   21419           0 :       pushErrorHandler();
   21420             :     }
   21421           0 :     {
   21422           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21423           0 :       GDAL_GCP_Info_set(arg1,(char const *)arg2);
   21424           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21425             :     }
   21426           0 :     if ( bLocalUseExceptions ) {
   21427           0 :       popErrorHandler();
   21428             :     }
   21429             : #ifndef SED_HACKS
   21430             :     if ( bLocalUseExceptions ) {
   21431             :       CPLErr eclass = CPLGetLastErrorType();
   21432             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21433             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21434             :       }
   21435             :     }
   21436             : #endif
   21437             :   }
   21438           0 :   resultobj = SWIG_Py_Void();
   21439           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21440           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; } }
   21441             :   return resultobj;
   21442           0 : fail:
   21443           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21444             :   return NULL;
   21445             : }
   21446             : 
   21447             : 
   21448           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21449           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21450           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21451           0 :   void *argp1 = 0 ;
   21452           0 :   int res1 = 0 ;
   21453           0 :   PyObject *swig_obj[1] ;
   21454           0 :   char *result = 0 ;
   21455             :   
   21456           0 :   if (!args) SWIG_fail;
   21457           0 :   swig_obj[0] = args;
   21458           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21459           0 :   if (!SWIG_IsOK(res1)) {
   21460           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21461             :   }
   21462           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21463           0 :   {
   21464           0 :     if (!arg1) {
   21465           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21466             :     }
   21467             :   }
   21468           0 :   {
   21469           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21470           0 :     if ( bLocalUseExceptions ) {
   21471           0 :       pushErrorHandler();
   21472             :     }
   21473           0 :     {
   21474           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21475           0 :       result = (char *)GDAL_GCP_Id_get(arg1);
   21476           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21477             :     }
   21478           0 :     if ( bLocalUseExceptions ) {
   21479           0 :       popErrorHandler();
   21480             :     }
   21481             : #ifndef SED_HACKS
   21482             :     if ( bLocalUseExceptions ) {
   21483             :       CPLErr eclass = CPLGetLastErrorType();
   21484             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21485             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21486             :       }
   21487             :     }
   21488             : #endif
   21489             :   }
   21490           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21491           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; } }
   21492             :   return resultobj;
   21493             : fail:
   21494             :   return NULL;
   21495             : }
   21496             : 
   21497             : 
   21498           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21499           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21500           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21501           0 :   char *arg2 = (char *) 0 ;
   21502           0 :   void *argp1 = 0 ;
   21503           0 :   int res1 = 0 ;
   21504           0 :   int res2 ;
   21505           0 :   char *buf2 = 0 ;
   21506           0 :   int alloc2 = 0 ;
   21507           0 :   PyObject *swig_obj[2] ;
   21508             :   
   21509           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   21510           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21511           0 :   if (!SWIG_IsOK(res1)) {
   21512           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21513             :   }
   21514           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21515           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21516           0 :   if (!SWIG_IsOK(res2)) {
   21517           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
   21518             :   }
   21519           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21520           0 :   {
   21521           0 :     if (!arg1) {
   21522           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21523             :     }
   21524             :   }
   21525           0 :   {
   21526           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21527           0 :     if ( bLocalUseExceptions ) {
   21528           0 :       pushErrorHandler();
   21529             :     }
   21530           0 :     {
   21531           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21532           0 :       GDAL_GCP_Id_set(arg1,(char const *)arg2);
   21533           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21534             :     }
   21535           0 :     if ( bLocalUseExceptions ) {
   21536           0 :       popErrorHandler();
   21537             :     }
   21538             : #ifndef SED_HACKS
   21539             :     if ( bLocalUseExceptions ) {
   21540             :       CPLErr eclass = CPLGetLastErrorType();
   21541             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21542             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21543             :       }
   21544             :     }
   21545             : #endif
   21546             :   }
   21547           0 :   resultobj = SWIG_Py_Void();
   21548           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21549           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; } }
   21550             :   return resultobj;
   21551           0 : fail:
   21552           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21553             :   return NULL;
   21554             : }
   21555             : 
   21556             : 
   21557          10 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21558          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21559          10 :   int arg1 ;
   21560          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21561          10 :   double *arg3 ;
   21562          10 :   int arg4 = (int) 1 ;
   21563          10 :   GDAL_GCP *tmpGCPList1 ;
   21564          10 :   double argout3[6] ;
   21565          10 :   int val4 ;
   21566          10 :   int ecode4 = 0 ;
   21567          10 :   PyObject *swig_obj[2] ;
   21568          10 :   RETURN_NONE result;
   21569             :   
   21570          10 :   {
   21571             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21572          10 :     memset(argout3, 0, sizeof(argout3));
   21573          10 :     arg3 = argout3;
   21574             :   }
   21575          10 :   if (!SWIG_Python_UnpackTuple(args, "GCPsToGeoTransform", 1, 2, swig_obj)) SWIG_fail;
   21576          10 :   {
   21577             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21578             :     /* check if is List */
   21579          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21580           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21581           0 :       SWIG_fail;
   21582             :     }
   21583          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21584          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21585           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21586           0 :       SWIG_fail;
   21587             :     }
   21588          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21589           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21590           0 :       SWIG_fail;
   21591             :     }
   21592          10 :     arg1 = (int)size;
   21593          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21594          10 :     if( !tmpGCPList1 ) {
   21595           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21596           0 :       SWIG_fail;
   21597             :     }
   21598          46 :     arg2 = tmpGCPList1;
   21599          46 :     for( int i = 0; i<arg1; i++ ) {
   21600          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21601          36 :       GDAL_GCP *item = 0;
   21602          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21603          36 :       if ( ! item ) {
   21604           0 :         Py_DECREF(o);
   21605           0 :         SWIG_fail;
   21606             :       }
   21607          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21608          36 :       Py_DECREF(o);
   21609             :     }
   21610             :   }
   21611          10 :   if (swig_obj[1]) {
   21612           1 :     ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
   21613           1 :     if (!SWIG_IsOK(ecode4)) {
   21614           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   21615             :     } 
   21616             :     arg4 = static_cast< int >(val4);
   21617             :   }
   21618          10 :   {
   21619          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21620          10 :     if ( bLocalUseExceptions ) {
   21621          10 :       pushErrorHandler();
   21622             :     }
   21623          10 :     {
   21624          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21625          10 :       result = (RETURN_NONE)GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   21626          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21627             :     }
   21628          10 :     if ( bLocalUseExceptions ) {
   21629          10 :       popErrorHandler();
   21630             :     }
   21631             : #ifndef SED_HACKS
   21632             :     if ( bLocalUseExceptions ) {
   21633             :       CPLErr eclass = CPLGetLastErrorType();
   21634             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21635             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21636             :       }
   21637             :     }
   21638             : #endif
   21639             :   }
   21640             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21641          10 :   {
   21642             :     /* %typemap(argout) (double argout[ANY]) */
   21643          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   21644             : #if SWIG_VERSION >= 0x040300
   21645             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21646             : #else
   21647          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21648             : #endif
   21649             :   }
   21650          10 :   {
   21651             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21652          10 :     free( arg2 );
   21653             :   }
   21654          10 :   {
   21655             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21656          10 :     if (result == 0 ) {
   21657           4 :       Py_XDECREF( resultobj );
   21658           4 :       resultobj = Py_None;
   21659           4 :       Py_INCREF(resultobj);
   21660             :     }
   21661          10 :     if (resultobj == 0) {
   21662           0 :       resultobj = Py_None;
   21663           0 :       Py_INCREF(resultobj);
   21664             :     }
   21665             :   }
   21666          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; } }
   21667             :   return resultobj;
   21668           0 : fail:
   21669           0 :   {
   21670             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21671           0 :     free( arg2 );
   21672             :   }
   21673           0 :   return NULL;
   21674             : }
   21675             : 
   21676             : 
   21677          10 : SWIGINTERN PyObject *_wrap_GCPsToHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21678          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21679          10 :   int arg1 ;
   21680          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21681          10 :   double *arg3 ;
   21682          10 :   GDAL_GCP *tmpGCPList1 ;
   21683          10 :   double argout3[9] ;
   21684          10 :   PyObject *swig_obj[1] ;
   21685          10 :   RETURN_NONE result;
   21686             :   
   21687          10 :   {
   21688             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21689          10 :     memset(argout3, 0, sizeof(argout3));
   21690          10 :     arg3 = argout3;
   21691             :   }
   21692          10 :   if (!args) SWIG_fail;
   21693          10 :   swig_obj[0] = args;
   21694          10 :   {
   21695             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21696             :     /* check if is List */
   21697          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21698           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21699           0 :       SWIG_fail;
   21700             :     }
   21701          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21702          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21703           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21704           0 :       SWIG_fail;
   21705             :     }
   21706          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21707           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21708           0 :       SWIG_fail;
   21709             :     }
   21710          10 :     arg1 = (int)size;
   21711          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21712          10 :     if( !tmpGCPList1 ) {
   21713           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21714           0 :       SWIG_fail;
   21715             :     }
   21716          46 :     arg2 = tmpGCPList1;
   21717          46 :     for( int i = 0; i<arg1; i++ ) {
   21718          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21719          36 :       GDAL_GCP *item = 0;
   21720          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21721          36 :       if ( ! item ) {
   21722           0 :         Py_DECREF(o);
   21723           0 :         SWIG_fail;
   21724             :       }
   21725          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21726          36 :       Py_DECREF(o);
   21727             :     }
   21728             :   }
   21729          10 :   {
   21730          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21731          10 :     if ( bLocalUseExceptions ) {
   21732          10 :       pushErrorHandler();
   21733             :     }
   21734          10 :     {
   21735          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21736          10 :       result = (RETURN_NONE)GDALGCPsToHomography(arg1,(GDAL_GCP const *)arg2,arg3);
   21737          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21738             :     }
   21739          10 :     if ( bLocalUseExceptions ) {
   21740          10 :       popErrorHandler();
   21741             :     }
   21742             : #ifndef SED_HACKS
   21743             :     if ( bLocalUseExceptions ) {
   21744             :       CPLErr eclass = CPLGetLastErrorType();
   21745             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21746             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21747             :       }
   21748             :     }
   21749             : #endif
   21750             :   }
   21751             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21752          10 :   {
   21753             :     /* %typemap(argout) (double argout[ANY]) */
   21754          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 9 );
   21755             : #if SWIG_VERSION >= 0x040300
   21756             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21757             : #else
   21758          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21759             : #endif
   21760             :   }
   21761          10 :   {
   21762             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21763          10 :     free( arg2 );
   21764             :   }
   21765          10 :   {
   21766             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21767          10 :     if (result == 0 ) {
   21768           3 :       Py_XDECREF( resultobj );
   21769           3 :       resultobj = Py_None;
   21770           3 :       Py_INCREF(resultobj);
   21771             :     }
   21772          10 :     if (resultobj == 0) {
   21773           0 :       resultobj = Py_None;
   21774           0 :       Py_INCREF(resultobj);
   21775             :     }
   21776             :   }
   21777          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; } }
   21778             :   return resultobj;
   21779           0 : fail:
   21780           0 :   {
   21781             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21782           0 :     free( arg2 );
   21783             :   }
   21784           0 :   return NULL;
   21785             : }
   21786             : 
   21787             : 
   21788           0 : SWIGINTERN PyObject *_wrap_delete_VirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21789           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21790           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21791           0 :   void *argp1 = 0 ;
   21792           0 :   int res1 = 0 ;
   21793           0 :   PyObject *swig_obj[1] ;
   21794             :   
   21795           0 :   if (!args) SWIG_fail;
   21796           0 :   swig_obj[0] = args;
   21797           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_DISOWN |  0 );
   21798           0 :   if (!SWIG_IsOK(res1)) {
   21799           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VirtualMem" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21800             :   }
   21801           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21802           0 :   {
   21803           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21804           0 :     if ( bLocalUseExceptions ) {
   21805           0 :       pushErrorHandler();
   21806             :     }
   21807           0 :     {
   21808           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21809           0 :       delete_CPLVirtualMemShadow(arg1);
   21810           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21811             :     }
   21812           0 :     if ( bLocalUseExceptions ) {
   21813           0 :       popErrorHandler();
   21814             :     }
   21815             : #ifndef SED_HACKS
   21816             :     if ( bLocalUseExceptions ) {
   21817             :       CPLErr eclass = CPLGetLastErrorType();
   21818             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21819             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21820             :       }
   21821             :     }
   21822             : #endif
   21823             :   }
   21824           0 :   resultobj = SWIG_Py_Void();
   21825           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; } }
   21826             :   return resultobj;
   21827             : fail:
   21828             :   return NULL;
   21829             : }
   21830             : 
   21831             : 
   21832           0 : SWIGINTERN PyObject *_wrap_VirtualMem_GetAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21833           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21834           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21835           0 :   void **arg2 = (void **) 0 ;
   21836           0 :   size_t *arg3 = (size_t *) 0 ;
   21837           0 :   GDALDataType *arg4 = (GDALDataType *) 0 ;
   21838           0 :   int *arg5 = (int *) 0 ;
   21839           0 :   void *argp1 = 0 ;
   21840           0 :   int res1 = 0 ;
   21841           0 :   void *ptr2 ;
   21842           0 :   size_t nsize2 ;
   21843           0 :   GDALDataType datatype2 ;
   21844           0 :   int readonly2 ;
   21845           0 :   PyObject *swig_obj[1] ;
   21846             :   
   21847           0 :   {
   21848             :     /* %typemap(in,numinputs=0) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly) */
   21849           0 :     arg2 = &ptr2;
   21850           0 :     arg3 = &nsize2;
   21851           0 :     arg4 = &datatype2;
   21852           0 :     arg5 = &readonly2;
   21853             :   }
   21854           0 :   if (!args) SWIG_fail;
   21855           0 :   swig_obj[0] = args;
   21856           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21857           0 :   if (!SWIG_IsOK(res1)) {
   21858           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_GetAddr" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21859             :   }
   21860           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21861           0 :   {
   21862           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21863           0 :     if ( bLocalUseExceptions ) {
   21864           0 :       pushErrorHandler();
   21865             :     }
   21866           0 :     {
   21867           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21868           0 :       CPLVirtualMemShadow_GetAddr(arg1,arg2,arg3,arg4,arg5);
   21869           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21870             :     }
   21871           0 :     if ( bLocalUseExceptions ) {
   21872           0 :       popErrorHandler();
   21873             :     }
   21874             : #ifndef SED_HACKS
   21875             :     if ( bLocalUseExceptions ) {
   21876             :       CPLErr eclass = CPLGetLastErrorType();
   21877             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21878             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21879             :       }
   21880             :     }
   21881             : #endif
   21882             :   }
   21883           0 :   resultobj = SWIG_Py_Void();
   21884           0 :   {
   21885             :     /* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/
   21886           0 :     Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer));
   21887             :     
   21888           0 :     if (PyBuffer_FillInfo(buf, swig_obj[0], *(arg2), *(arg3), *(arg5), PyBUF_ND)) {
   21889             :       // error, handle
   21890             :     }
   21891           0 :     if( *(arg4) == GDT_Byte )
   21892             :     {
   21893           0 :       buf->format = (char*) "B";
   21894           0 :       buf->itemsize = 1;
   21895             :     }
   21896           0 :     else if( *(arg4) == GDT_Int16 )
   21897             :     {
   21898           0 :       buf->format = (char*) "h";
   21899           0 :       buf->itemsize = 2;
   21900             :     }
   21901           0 :     else if( *(arg4) == GDT_UInt16 )
   21902             :     {
   21903           0 :       buf->format = (char*) "H";
   21904           0 :       buf->itemsize = 2;
   21905             :     }
   21906           0 :     else if( *(arg4) == GDT_Int32 )
   21907             :     {
   21908           0 :       buf->format = (char*) "i";
   21909           0 :       buf->itemsize = 4;
   21910             :     }
   21911           0 :     else if( *(arg4) == GDT_UInt32 )
   21912             :     {
   21913           0 :       buf->format = (char*) "I";
   21914           0 :       buf->itemsize = 4;
   21915             :     }
   21916           0 :     else if( *(arg4) == GDT_Float16 )
   21917             :     {
   21918           0 :       buf->format = (char*) "f";
   21919           0 :       buf->itemsize = 2;
   21920             :     }
   21921           0 :     else if( *(arg4) == GDT_Float32 )
   21922             :     {
   21923           0 :       buf->format = (char*) "f";
   21924           0 :       buf->itemsize = 4;
   21925             :     }
   21926           0 :     else if( *(arg4) == GDT_Float64 )
   21927             :     {
   21928           0 :       buf->format = (char*) "F";
   21929           0 :       buf->itemsize = 8;
   21930             :     }
   21931             :     else
   21932             :     {
   21933           0 :       buf->format = (char*) "B";
   21934           0 :       buf->itemsize = 1;
   21935             :     }
   21936           0 :     Py_DECREF(resultobj);
   21937           0 :     resultobj = PyMemoryView_FromBuffer(buf);
   21938             :   }
   21939           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; } }
   21940             :   return resultobj;
   21941             : fail:
   21942             :   return NULL;
   21943             : }
   21944             : 
   21945             : 
   21946           0 : SWIGINTERN PyObject *_wrap_VirtualMem_Pin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21947           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21948           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21949           0 :   size_t arg2 = (size_t) 0 ;
   21950           0 :   size_t arg3 = (size_t) 0 ;
   21951           0 :   int arg4 = (int) 0 ;
   21952           0 :   void *argp1 = 0 ;
   21953           0 :   int res1 = 0 ;
   21954           0 :   size_t val2 ;
   21955           0 :   int ecode2 = 0 ;
   21956           0 :   size_t val3 ;
   21957           0 :   int ecode3 = 0 ;
   21958           0 :   int val4 ;
   21959           0 :   int ecode4 = 0 ;
   21960           0 :   PyObject *swig_obj[4] ;
   21961             :   
   21962           0 :   if (!SWIG_Python_UnpackTuple(args, "VirtualMem_Pin", 1, 4, swig_obj)) SWIG_fail;
   21963           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21964           0 :   if (!SWIG_IsOK(res1)) {
   21965           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_Pin" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21966             :   }
   21967           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21968           0 :   if (swig_obj[1]) {
   21969           0 :     ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   21970           0 :     if (!SWIG_IsOK(ecode2)) {
   21971           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VirtualMem_Pin" "', argument " "2"" of type '" "size_t""'");
   21972             :     } 
   21973             :     arg2 = static_cast< size_t >(val2);
   21974             :   }
   21975           0 :   if (swig_obj[2]) {
   21976           0 :     ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   21977           0 :     if (!SWIG_IsOK(ecode3)) {
   21978           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VirtualMem_Pin" "', argument " "3"" of type '" "size_t""'");
   21979             :     } 
   21980             :     arg3 = static_cast< size_t >(val3);
   21981             :   }
   21982           0 :   if (swig_obj[3]) {
   21983           0 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   21984           0 :     if (!SWIG_IsOK(ecode4)) {
   21985           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VirtualMem_Pin" "', argument " "4"" of type '" "int""'");
   21986             :     } 
   21987             :     arg4 = static_cast< int >(val4);
   21988             :   }
   21989           0 :   {
   21990           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21991           0 :     if ( bLocalUseExceptions ) {
   21992           0 :       pushErrorHandler();
   21993             :     }
   21994           0 :     {
   21995           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21996           0 :       CPLVirtualMemShadow_Pin(arg1,arg2,arg3,arg4);
   21997           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21998             :     }
   21999           0 :     if ( bLocalUseExceptions ) {
   22000           0 :       popErrorHandler();
   22001             :     }
   22002             : #ifndef SED_HACKS
   22003             :     if ( bLocalUseExceptions ) {
   22004             :       CPLErr eclass = CPLGetLastErrorType();
   22005             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22006             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22007             :       }
   22008             :     }
   22009             : #endif
   22010             :   }
   22011           0 :   resultobj = SWIG_Py_Void();
   22012           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; } }
   22013             :   return resultobj;
   22014             : fail:
   22015             :   return NULL;
   22016             : }
   22017             : 
   22018             : 
   22019         277 : SWIGINTERN PyObject *VirtualMem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22020         277 :   PyObject *obj;
   22021         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   22022         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_CPLVirtualMemShadow, SWIG_NewClientData(obj));
   22023         277 :   return SWIG_Py_Void();
   22024             : }
   22025             : 
   22026           1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22027           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22028           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22029           1 :   void *argp1 = 0 ;
   22030           1 :   int res1 = 0 ;
   22031           1 :   PyObject *swig_obj[1] ;
   22032             :   
   22033           1 :   if (!args) SWIG_fail;
   22034           1 :   swig_obj[0] = args;
   22035           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   22036           1 :   if (!SWIG_IsOK(res1)) {
   22037           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22038             :   }
   22039           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22040           1 :   {
   22041           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22042           1 :     if ( bLocalUseExceptions ) {
   22043           1 :       pushErrorHandler();
   22044             :     }
   22045           1 :     {
   22046           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22047           1 :       delete_GDALAsyncReaderShadow(arg1);
   22048           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22049             :     }
   22050           1 :     if ( bLocalUseExceptions ) {
   22051           1 :       popErrorHandler();
   22052             :     }
   22053             : #ifndef SED_HACKS
   22054             :     if ( bLocalUseExceptions ) {
   22055             :       CPLErr eclass = CPLGetLastErrorType();
   22056             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22057             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22058             :       }
   22059             :     }
   22060             : #endif
   22061             :   }
   22062           1 :   resultobj = SWIG_Py_Void();
   22063           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; } }
   22064             :   return resultobj;
   22065             : fail:
   22066             :   return NULL;
   22067             : }
   22068             : 
   22069             : 
   22070           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22071           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22072           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22073           1 :   double arg2 ;
   22074           1 :   int *arg3 = (int *) 0 ;
   22075           1 :   int *arg4 = (int *) 0 ;
   22076           1 :   int *arg5 = (int *) 0 ;
   22077           1 :   int *arg6 = (int *) 0 ;
   22078           1 :   void *argp1 = 0 ;
   22079           1 :   int res1 = 0 ;
   22080           1 :   double val2 ;
   22081           1 :   int ecode2 = 0 ;
   22082           1 :   int temp3 ;
   22083           1 :   int res3 = SWIG_TMPOBJ ;
   22084           1 :   int temp4 ;
   22085           1 :   int res4 = SWIG_TMPOBJ ;
   22086           1 :   int temp5 ;
   22087           1 :   int res5 = SWIG_TMPOBJ ;
   22088           1 :   int temp6 ;
   22089           1 :   int res6 = SWIG_TMPOBJ ;
   22090           1 :   PyObject *swig_obj[2] ;
   22091           1 :   GDALAsyncStatusType result;
   22092             :   
   22093           1 :   arg3 = &temp3;
   22094           1 :   arg4 = &temp4;
   22095           1 :   arg5 = &temp5;
   22096           1 :   arg6 = &temp6;
   22097           1 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_GetNextUpdatedRegion", 2, 2, swig_obj)) SWIG_fail;
   22098           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22099           1 :   if (!SWIG_IsOK(res1)) {
   22100           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22101             :   }
   22102           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22103           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   22104           1 :   if (!SWIG_IsOK(ecode2)) {
   22105           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   22106             :   } 
   22107           1 :   arg2 = static_cast< double >(val2);
   22108           1 :   {
   22109           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22110           1 :     if ( bLocalUseExceptions ) {
   22111           1 :       pushErrorHandler();
   22112             :     }
   22113           1 :     {
   22114           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22115           1 :       result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   22116           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22117             :     }
   22118           1 :     if ( bLocalUseExceptions ) {
   22119           1 :       popErrorHandler();
   22120             :     }
   22121             : #ifndef SED_HACKS
   22122             :     if ( bLocalUseExceptions ) {
   22123             :       CPLErr eclass = CPLGetLastErrorType();
   22124             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22125             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22126             :       }
   22127             :     }
   22128             : #endif
   22129             :   }
   22130           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22131           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   22132           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   22133             :   } else {
   22134           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22135           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   22136             :   }
   22137           1 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   22138           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   22139             :   } else {
   22140           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22141           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   22142             :   }
   22143           1 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   22144           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   22145             :   } else {
   22146           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22147           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   22148             :   }
   22149           1 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   22150           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   22151             :   } else {
   22152           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22153           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   22154             :   }
   22155           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; } }
   22156             :   return resultobj;
   22157             : fail:
   22158             :   return NULL;
   22159             : }
   22160             : 
   22161             : 
   22162           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22163           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22164           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22165           1 :   void **arg2 = (void **) 0 ;
   22166           1 :   void *argp1 = 0 ;
   22167           1 :   int res1 = 0 ;
   22168           1 :   void *pyObject2 = NULL ;
   22169           1 :   PyObject *swig_obj[1] ;
   22170             :   
   22171           1 :   {
   22172             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   22173           1 :     arg2 = &pyObject2;
   22174             :   }
   22175           1 :   if (!args) SWIG_fail;
   22176           1 :   swig_obj[0] = args;
   22177           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22178           1 :   if (!SWIG_IsOK(res1)) {
   22179           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22180             :   }
   22181           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22182           1 :   {
   22183           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22184           1 :     if ( bLocalUseExceptions ) {
   22185           1 :       pushErrorHandler();
   22186             :     }
   22187           1 :     {
   22188           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22189           1 :       GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   22190           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22191             :     }
   22192           1 :     if ( bLocalUseExceptions ) {
   22193           1 :       popErrorHandler();
   22194             :     }
   22195             : #ifndef SED_HACKS
   22196             :     if ( bLocalUseExceptions ) {
   22197             :       CPLErr eclass = CPLGetLastErrorType();
   22198             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22199             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22200             :       }
   22201             :     }
   22202             : #endif
   22203             :   }
   22204           1 :   resultobj = SWIG_Py_Void();
   22205           1 :   {
   22206             :     /* %typemap(argout) ( void **outPythonObject ) */
   22207           1 :     Py_XDECREF(resultobj);
   22208           1 :     if (*arg2)
   22209             :     {
   22210             :       resultobj = (PyObject*)*arg2;
   22211             :     }
   22212             :     else
   22213             :     {
   22214           0 :       resultobj = Py_None;
   22215           0 :       Py_INCREF(resultobj);
   22216             :     }
   22217             :   }
   22218           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; } }
   22219             :   return resultobj;
   22220             : fail:
   22221             :   return NULL;
   22222             : }
   22223             : 
   22224             : 
   22225           0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22226           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22227           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22228           0 :   double arg2 ;
   22229           0 :   void *argp1 = 0 ;
   22230           0 :   int res1 = 0 ;
   22231           0 :   double val2 ;
   22232           0 :   int ecode2 = 0 ;
   22233           0 :   PyObject *swig_obj[2] ;
   22234           0 :   int result;
   22235             :   
   22236           0 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_LockBuffer", 2, 2, swig_obj)) SWIG_fail;
   22237           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22238           0 :   if (!SWIG_IsOK(res1)) {
   22239           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22240             :   }
   22241           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22242           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   22243           0 :   if (!SWIG_IsOK(ecode2)) {
   22244           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   22245             :   } 
   22246           0 :   arg2 = static_cast< double >(val2);
   22247           0 :   {
   22248           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22249           0 :     if ( bLocalUseExceptions ) {
   22250           0 :       pushErrorHandler();
   22251             :     }
   22252           0 :     {
   22253           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22254           0 :       result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   22255           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22256             :     }
   22257           0 :     if ( bLocalUseExceptions ) {
   22258           0 :       popErrorHandler();
   22259             :     }
   22260             : #ifndef SED_HACKS
   22261             :     if ( bLocalUseExceptions ) {
   22262             :       CPLErr eclass = CPLGetLastErrorType();
   22263             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22264             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22265             :       }
   22266             :     }
   22267             : #endif
   22268             :   }
   22269           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22270           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; } }
   22271             :   return resultobj;
   22272             : fail:
   22273             :   return NULL;
   22274             : }
   22275             : 
   22276             : 
   22277           0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22278           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22279           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22280           0 :   void *argp1 = 0 ;
   22281           0 :   int res1 = 0 ;
   22282           0 :   PyObject *swig_obj[1] ;
   22283             :   
   22284           0 :   if (!args) SWIG_fail;
   22285           0 :   swig_obj[0] = args;
   22286           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22287           0 :   if (!SWIG_IsOK(res1)) {
   22288           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22289             :   }
   22290           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22291           0 :   {
   22292           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22293           0 :     if ( bLocalUseExceptions ) {
   22294           0 :       pushErrorHandler();
   22295             :     }
   22296           0 :     {
   22297           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22298           0 :       GDALAsyncReaderShadow_UnlockBuffer(arg1);
   22299           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22300             :     }
   22301           0 :     if ( bLocalUseExceptions ) {
   22302           0 :       popErrorHandler();
   22303             :     }
   22304             : #ifndef SED_HACKS
   22305             :     if ( bLocalUseExceptions ) {
   22306             :       CPLErr eclass = CPLGetLastErrorType();
   22307             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22308             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22309             :       }
   22310             :     }
   22311             : #endif
   22312             :   }
   22313           0 :   resultobj = SWIG_Py_Void();
   22314           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; } }
   22315             :   return resultobj;
   22316             : fail:
   22317             :   return NULL;
   22318             : }
   22319             : 
   22320             : 
   22321         277 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22322         277 :   PyObject *obj;
   22323         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   22324         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   22325         277 :   return SWIG_Py_Void();
   22326             : }
   22327             : 
   22328       19890 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22329       19890 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22330       19890 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22331       19890 :   void *argp1 = 0 ;
   22332       19890 :   int res1 = 0 ;
   22333       19890 :   PyObject *swig_obj[1] ;
   22334       19890 :   int result;
   22335             :   
   22336       19890 :   if (!args) SWIG_fail;
   22337       19890 :   swig_obj[0] = args;
   22338       19890 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22339       19890 :   if (!SWIG_IsOK(res1)) {
   22340           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22341             :   }
   22342       19890 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22343       19890 :   {
   22344       19890 :     const int bLocalUseExceptions = GetUseExceptions();
   22345       19890 :     if ( bLocalUseExceptions ) {
   22346       16878 :       pushErrorHandler();
   22347             :     }
   22348       19890 :     {
   22349       19890 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22350       19890 :       result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   22351       19890 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22352             :     }
   22353       19890 :     if ( bLocalUseExceptions ) {
   22354       16878 :       popErrorHandler();
   22355             :     }
   22356             : #ifndef SED_HACKS
   22357             :     if ( bLocalUseExceptions ) {
   22358             :       CPLErr eclass = CPLGetLastErrorType();
   22359             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22360             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22361             :       }
   22362             :     }
   22363             : #endif
   22364             :   }
   22365       19890 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22366       19890 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22367             :   return resultobj;
   22368             : fail:
   22369             :   return NULL;
   22370             : }
   22371             : 
   22372             : 
   22373       20154 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22374       20154 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22375       20154 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22376       20154 :   void *argp1 = 0 ;
   22377       20154 :   int res1 = 0 ;
   22378       20154 :   PyObject *swig_obj[1] ;
   22379       20154 :   int result;
   22380             :   
   22381       20154 :   if (!args) SWIG_fail;
   22382       20154 :   swig_obj[0] = args;
   22383       20154 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22384       20154 :   if (!SWIG_IsOK(res1)) {
   22385           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22386             :   }
   22387       20154 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22388       20154 :   {
   22389       20154 :     const int bLocalUseExceptions = GetUseExceptions();
   22390       20154 :     if ( bLocalUseExceptions ) {
   22391       17321 :       pushErrorHandler();
   22392             :     }
   22393       20154 :     {
   22394       20154 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22395       20154 :       result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   22396       20154 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22397             :     }
   22398       20154 :     if ( bLocalUseExceptions ) {
   22399       17321 :       popErrorHandler();
   22400             :     }
   22401             : #ifndef SED_HACKS
   22402             :     if ( bLocalUseExceptions ) {
   22403             :       CPLErr eclass = CPLGetLastErrorType();
   22404             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22405             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22406             :       }
   22407             :     }
   22408             : #endif
   22409             :   }
   22410       20154 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22411       20154 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22412             :   return resultobj;
   22413             : fail:
   22414             :   return NULL;
   22415             : }
   22416             : 
   22417             : 
   22418      355384 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22419      355384 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22420      355384 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22421      355384 :   void *argp1 = 0 ;
   22422      355384 :   int res1 = 0 ;
   22423      355384 :   PyObject *swig_obj[1] ;
   22424      355384 :   int result;
   22425             :   
   22426      355384 :   if (!args) SWIG_fail;
   22427      355384 :   swig_obj[0] = args;
   22428      355384 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22429      355384 :   if (!SWIG_IsOK(res1)) {
   22430           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22431             :   }
   22432      355383 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22433      355383 :   {
   22434      355383 :     const int bLocalUseExceptions = GetUseExceptions();
   22435      355383 :     if ( bLocalUseExceptions ) {
   22436      339937 :       pushErrorHandler();
   22437             :     }
   22438      355383 :     {
   22439      355383 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22440      355383 :       result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   22441      355383 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22442             :     }
   22443      355383 :     if ( bLocalUseExceptions ) {
   22444      339937 :       popErrorHandler();
   22445             :     }
   22446             : #ifndef SED_HACKS
   22447             :     if ( bLocalUseExceptions ) {
   22448             :       CPLErr eclass = CPLGetLastErrorType();
   22449             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22450             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22451             :       }
   22452             :     }
   22453             : #endif
   22454             :   }
   22455      355383 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22456      355384 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22457             :   return resultobj;
   22458             : fail:
   22459             :   return NULL;
   22460             : }
   22461             : 
   22462             : 
   22463       56099 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22464       56099 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22465       56099 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22466       56099 :   void *argp1 = 0 ;
   22467       56099 :   int res1 = 0 ;
   22468       56099 :   PyObject *swig_obj[1] ;
   22469             :   
   22470       56099 :   if (!args) SWIG_fail;
   22471       56099 :   swig_obj[0] = args;
   22472       56099 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   22473       56099 :   if (!SWIG_IsOK(res1)) {
   22474           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22475             :   }
   22476       56099 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22477       56099 :   {
   22478       56099 :     const int bLocalUseExceptions = GetUseExceptions();
   22479       56099 :     if ( bLocalUseExceptions ) {
   22480       25008 :       pushErrorHandler();
   22481             :     }
   22482       56099 :     {
   22483       56099 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22484       56099 :       delete_GDALDatasetShadow(arg1);
   22485       56099 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22486             :     }
   22487       56099 :     if ( bLocalUseExceptions ) {
   22488       25008 :       popErrorHandler();
   22489             :     }
   22490             : #ifndef SED_HACKS
   22491             :     if ( bLocalUseExceptions ) {
   22492             :       CPLErr eclass = CPLGetLastErrorType();
   22493             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22494             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22495             :       }
   22496             :     }
   22497             : #endif
   22498             :   }
   22499       56099 :   resultobj = SWIG_Py_Void();
   22500       56099 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22501             :   return resultobj;
   22502             : fail:
   22503             :   return NULL;
   22504             : }
   22505             : 
   22506             : 
   22507           4 : SWIGINTERN PyObject *_wrap_Dataset_MarkSuppressOnClose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22508           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22509           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22510           4 :   void *argp1 = 0 ;
   22511           4 :   int res1 = 0 ;
   22512           4 :   PyObject *swig_obj[1] ;
   22513             :   
   22514           4 :   if (!args) SWIG_fail;
   22515           4 :   swig_obj[0] = args;
   22516           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22517           4 :   if (!SWIG_IsOK(res1)) {
   22518           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_MarkSuppressOnClose" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22519             :   }
   22520           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22521           4 :   {
   22522           4 :     const int bLocalUseExceptions = GetUseExceptions();
   22523           4 :     if ( bLocalUseExceptions ) {
   22524           0 :       pushErrorHandler();
   22525             :     }
   22526           4 :     {
   22527           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22528           4 :       GDALDatasetShadow_MarkSuppressOnClose(arg1);
   22529           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22530             :     }
   22531           4 :     if ( bLocalUseExceptions ) {
   22532           0 :       popErrorHandler();
   22533             :     }
   22534             : #ifndef SED_HACKS
   22535             :     if ( bLocalUseExceptions ) {
   22536             :       CPLErr eclass = CPLGetLastErrorType();
   22537             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22538             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22539             :       }
   22540             :     }
   22541             : #endif
   22542             :   }
   22543           4 :   resultobj = SWIG_Py_Void();
   22544           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; } }
   22545             :   return resultobj;
   22546             : fail:
   22547             :   return NULL;
   22548             : }
   22549             : 
   22550             : 
   22551        3880 : SWIGINTERN PyObject *_wrap_Dataset_Close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22552        3880 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22553        3880 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22554        3880 :   void *argp1 = 0 ;
   22555        3880 :   int res1 = 0 ;
   22556        3880 :   PyObject *swig_obj[1] ;
   22557        3880 :   CPLErr result;
   22558             :   
   22559        3880 :   if (!args) SWIG_fail;
   22560        3880 :   swig_obj[0] = args;
   22561        3880 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22562        3880 :   if (!SWIG_IsOK(res1)) {
   22563           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_Close" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22564             :   }
   22565        3880 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22566        3880 :   {
   22567        3880 :     const int bLocalUseExceptions = GetUseExceptions();
   22568        3880 :     if ( bLocalUseExceptions ) {
   22569        1318 :       pushErrorHandler();
   22570             :     }
   22571        3880 :     {
   22572        3880 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22573        3880 :       result = (CPLErr)GDALDatasetShadow_Close(arg1);
   22574        3880 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22575             :     }
   22576        3880 :     if ( bLocalUseExceptions ) {
   22577        1318 :       popErrorHandler();
   22578             :     }
   22579             : #ifndef SED_HACKS
   22580             :     if ( bLocalUseExceptions ) {
   22581             :       CPLErr eclass = CPLGetLastErrorType();
   22582             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22583             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22584             :       }
   22585             :     }
   22586             : #endif
   22587             :   }
   22588        3880 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22589        3892 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22590             :   return resultobj;
   22591             : fail:
   22592             :   return NULL;
   22593             : }
   22594             : 
   22595             : 
   22596          12 : SWIGINTERN PyObject *_wrap_Dataset__RunCloseWithoutDestroying(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22597          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22598          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22599          12 :   void *argp1 = 0 ;
   22600          12 :   int res1 = 0 ;
   22601          12 :   PyObject *swig_obj[1] ;
   22602          12 :   CPLErr result;
   22603             :   
   22604          12 :   if (!args) SWIG_fail;
   22605          12 :   swig_obj[0] = args;
   22606          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22607          12 :   if (!SWIG_IsOK(res1)) {
   22608           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__RunCloseWithoutDestroying" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22609             :   }
   22610          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22611          12 :   {
   22612          12 :     const int bLocalUseExceptions = GetUseExceptions();
   22613          12 :     if ( bLocalUseExceptions ) {
   22614          12 :       pushErrorHandler();
   22615             :     }
   22616          12 :     {
   22617          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22618          12 :       result = (CPLErr)GDALDatasetShadow__RunCloseWithoutDestroying(arg1);
   22619          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22620             :     }
   22621          12 :     if ( bLocalUseExceptions ) {
   22622          12 :       popErrorHandler();
   22623             :     }
   22624             : #ifndef SED_HACKS
   22625             :     if ( bLocalUseExceptions ) {
   22626             :       CPLErr eclass = CPLGetLastErrorType();
   22627             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22628             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22629             :       }
   22630             :     }
   22631             : #endif
   22632             :   }
   22633          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22634          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; } }
   22635             :   return resultobj;
   22636             : fail:
   22637             :   return NULL;
   22638             : }
   22639             : 
   22640             : 
   22641        1328 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22642        1328 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22643        1328 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22644        1328 :   void *argp1 = 0 ;
   22645        1328 :   int res1 = 0 ;
   22646        1328 :   PyObject *swig_obj[1] ;
   22647        1328 :   GDALDriverShadow *result = 0 ;
   22648             :   
   22649        1328 :   if (!args) SWIG_fail;
   22650        1328 :   swig_obj[0] = args;
   22651        1328 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22652        1328 :   if (!SWIG_IsOK(res1)) {
   22653           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22654             :   }
   22655        1328 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22656        1328 :   {
   22657        1328 :     const int bLocalUseExceptions = GetUseExceptions();
   22658        1328 :     if ( bLocalUseExceptions ) {
   22659         831 :       pushErrorHandler();
   22660             :     }
   22661        1328 :     {
   22662        1328 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22663        1328 :       result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   22664        1328 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22665             :     }
   22666        1328 :     if ( bLocalUseExceptions ) {
   22667         831 :       popErrorHandler();
   22668             :     }
   22669             : #ifndef SED_HACKS
   22670             :     if ( bLocalUseExceptions ) {
   22671             :       CPLErr eclass = CPLGetLastErrorType();
   22672             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22673             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22674             :       }
   22675             :     }
   22676             : #endif
   22677             :   }
   22678        1328 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   22679        1328 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22680             :   return resultobj;
   22681             : fail:
   22682             :   return NULL;
   22683             : }
   22684             : 
   22685             : 
   22686      360303 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22687      360303 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22688      360303 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22689      360303 :   int arg2 ;
   22690      360303 :   void *argp1 = 0 ;
   22691      360303 :   int res1 = 0 ;
   22692      360303 :   int val2 ;
   22693      360303 :   int ecode2 = 0 ;
   22694      360303 :   PyObject *swig_obj[2] ;
   22695      360303 :   GDALRasterBandShadow *result = 0 ;
   22696             :   
   22697      360303 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRasterBand", 2, 2, swig_obj)) SWIG_fail;
   22698      360303 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22699      360303 :   if (!SWIG_IsOK(res1)) {
   22700           8 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22701             :   }
   22702      360299 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22703      360299 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22704      360299 :   if (!SWIG_IsOK(ecode2)) {
   22705           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   22706             :   } 
   22707      360299 :   arg2 = static_cast< int >(val2);
   22708      360299 :   {
   22709      360299 :     const int bLocalUseExceptions = GetUseExceptions();
   22710      360299 :     if ( bLocalUseExceptions ) {
   22711      234479 :       pushErrorHandler();
   22712             :     }
   22713      360299 :     {
   22714      360299 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22715      360299 :       result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   22716      360299 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22717             :     }
   22718      360299 :     if ( bLocalUseExceptions ) {
   22719      234479 :       popErrorHandler();
   22720             :     }
   22721             : #ifndef SED_HACKS
   22722             :     if ( bLocalUseExceptions ) {
   22723             :       CPLErr eclass = CPLGetLastErrorType();
   22724             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22725             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22726             :       }
   22727             :     }
   22728             : #endif
   22729             :   }
   22730      360299 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   22731      360303 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22732             :   return resultobj;
   22733             : fail:
   22734             :   return NULL;
   22735             : }
   22736             : 
   22737             : 
   22738           5 : SWIGINTERN PyObject *_wrap_Dataset_IsThreadSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22739           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22740           5 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22741           5 :   int arg2 ;
   22742           5 :   void *argp1 = 0 ;
   22743           5 :   int res1 = 0 ;
   22744           5 :   int val2 ;
   22745           5 :   int ecode2 = 0 ;
   22746           5 :   PyObject *swig_obj[2] ;
   22747           5 :   bool result;
   22748             :   
   22749           5 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsThreadSafe", 2, 2, swig_obj)) SWIG_fail;
   22750           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22751           5 :   if (!SWIG_IsOK(res1)) {
   22752           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsThreadSafe" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22753             :   }
   22754           5 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22755           5 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22756           5 :   if (!SWIG_IsOK(ecode2)) {
   22757           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsThreadSafe" "', argument " "2"" of type '" "int""'");
   22758             :   } 
   22759           5 :   arg2 = static_cast< int >(val2);
   22760           5 :   {
   22761           5 :     const int bLocalUseExceptions = GetUseExceptions();
   22762           5 :     if ( bLocalUseExceptions ) {
   22763           5 :       pushErrorHandler();
   22764             :     }
   22765           5 :     {
   22766           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22767           5 :       result = (bool)GDALDatasetShadow_IsThreadSafe(arg1,arg2);
   22768           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22769             :     }
   22770           5 :     if ( bLocalUseExceptions ) {
   22771           5 :       popErrorHandler();
   22772             :     }
   22773             : #ifndef SED_HACKS
   22774             :     if ( bLocalUseExceptions ) {
   22775             :       CPLErr eclass = CPLGetLastErrorType();
   22776             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22777             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22778             :       }
   22779             :     }
   22780             : #endif
   22781             :   }
   22782           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   22783           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; } }
   22784             :   return resultobj;
   22785             : fail:
   22786             :   return NULL;
   22787             : }
   22788             : 
   22789             : 
   22790           8 : SWIGINTERN PyObject *_wrap_Dataset_GetThreadSafeDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22791           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22792           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22793           8 :   int arg2 ;
   22794           8 :   void *argp1 = 0 ;
   22795           8 :   int res1 = 0 ;
   22796           8 :   int val2 ;
   22797           8 :   int ecode2 = 0 ;
   22798           8 :   PyObject *swig_obj[2] ;
   22799           8 :   GDALDatasetShadow *result = 0 ;
   22800             :   
   22801           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetThreadSafeDataset", 2, 2, swig_obj)) SWIG_fail;
   22802           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22803           8 :   if (!SWIG_IsOK(res1)) {
   22804           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22805             :   }
   22806           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22807           8 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22808           8 :   if (!SWIG_IsOK(ecode2)) {
   22809           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "2"" of type '" "int""'");
   22810             :   } 
   22811           8 :   arg2 = static_cast< int >(val2);
   22812           8 :   {
   22813           8 :     const int bLocalUseExceptions = GetUseExceptions();
   22814           8 :     if ( bLocalUseExceptions ) {
   22815           8 :       pushErrorHandler();
   22816             :     }
   22817           8 :     {
   22818           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22819           8 :       result = (GDALDatasetShadow *)GDALDatasetShadow_GetThreadSafeDataset(arg1,arg2);
   22820           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22821             :     }
   22822           8 :     if ( bLocalUseExceptions ) {
   22823           8 :       popErrorHandler();
   22824             :     }
   22825             : #ifndef SED_HACKS
   22826             :     if ( bLocalUseExceptions ) {
   22827             :       CPLErr eclass = CPLGetLastErrorType();
   22828             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22829             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22830             :       }
   22831             :     }
   22832             : #endif
   22833             :   }
   22834           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   22835           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; } }
   22836             :   return resultobj;
   22837             : fail:
   22838             :   return NULL;
   22839             : }
   22840             : 
   22841             : 
   22842        1185 : SWIGINTERN PyObject *_wrap_Dataset_GetRootGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22843        1185 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22844        1185 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22845        1185 :   void *argp1 = 0 ;
   22846        1185 :   int res1 = 0 ;
   22847        1185 :   PyObject *swig_obj[1] ;
   22848        1185 :   GDALGroupHS *result = 0 ;
   22849             :   
   22850        1185 :   if (!args) SWIG_fail;
   22851        1185 :   swig_obj[0] = args;
   22852        1185 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22853        1185 :   if (!SWIG_IsOK(res1)) {
   22854           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRootGroup" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22855             :   }
   22856        1185 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22857        1185 :   {
   22858        1185 :     const int bLocalUseExceptions = GetUseExceptions();
   22859        1185 :     if ( bLocalUseExceptions ) {
   22860         344 :       pushErrorHandler();
   22861             :     }
   22862        1185 :     {
   22863        1185 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22864        1185 :       result = (GDALGroupHS *)GDALDatasetShadow_GetRootGroup(arg1);
   22865        1185 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22866             :     }
   22867        1185 :     if ( bLocalUseExceptions ) {
   22868         344 :       popErrorHandler();
   22869             :     }
   22870             : #ifndef SED_HACKS
   22871             :     if ( bLocalUseExceptions ) {
   22872             :       CPLErr eclass = CPLGetLastErrorType();
   22873             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22874             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22875             :       }
   22876             :     }
   22877             : #endif
   22878             :   }
   22879        1185 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   22880        1185 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22881             :   return resultobj;
   22882             : fail:
   22883             :   return NULL;
   22884             : }
   22885             : 
   22886             : 
   22887         454 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22888         454 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22889         454 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22890         454 :   void *argp1 = 0 ;
   22891         454 :   int res1 = 0 ;
   22892         454 :   PyObject *swig_obj[1] ;
   22893         454 :   char *result = 0 ;
   22894             :   
   22895         454 :   if (!args) SWIG_fail;
   22896         454 :   swig_obj[0] = args;
   22897         454 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22898         454 :   if (!SWIG_IsOK(res1)) {
   22899           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22900             :   }
   22901         454 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22902         454 :   {
   22903         454 :     const int bLocalUseExceptions = GetUseExceptions();
   22904         454 :     if ( bLocalUseExceptions ) {
   22905         405 :       pushErrorHandler();
   22906             :     }
   22907         454 :     {
   22908         454 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22909         454 :       result = (char *)GDALDatasetShadow_GetProjection(arg1);
   22910         454 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22911             :     }
   22912         454 :     if ( bLocalUseExceptions ) {
   22913         405 :       popErrorHandler();
   22914             :     }
   22915             : #ifndef SED_HACKS
   22916             :     if ( bLocalUseExceptions ) {
   22917             :       CPLErr eclass = CPLGetLastErrorType();
   22918             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22919             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22920             :       }
   22921             :     }
   22922             : #endif
   22923             :   }
   22924         454 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22925         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; } }
   22926             :   return resultobj;
   22927             : fail:
   22928             :   return NULL;
   22929             : }
   22930             : 
   22931             : 
   22932         858 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22933         858 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22934         858 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22935         858 :   void *argp1 = 0 ;
   22936         858 :   int res1 = 0 ;
   22937         858 :   PyObject *swig_obj[1] ;
   22938         858 :   char *result = 0 ;
   22939             :   
   22940         858 :   if (!args) SWIG_fail;
   22941         858 :   swig_obj[0] = args;
   22942         858 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22943         858 :   if (!SWIG_IsOK(res1)) {
   22944           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22945             :   }
   22946         858 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22947         858 :   {
   22948         858 :     const int bLocalUseExceptions = GetUseExceptions();
   22949         858 :     if ( bLocalUseExceptions ) {
   22950         625 :       pushErrorHandler();
   22951             :     }
   22952         858 :     {
   22953         858 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22954         858 :       result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   22955         858 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22956             :     }
   22957         858 :     if ( bLocalUseExceptions ) {
   22958         625 :       popErrorHandler();
   22959             :     }
   22960             : #ifndef SED_HACKS
   22961             :     if ( bLocalUseExceptions ) {
   22962             :       CPLErr eclass = CPLGetLastErrorType();
   22963             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22964             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22965             :       }
   22966             :     }
   22967             : #endif
   22968             :   }
   22969         858 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22970         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; } }
   22971             :   return resultobj;
   22972             : fail:
   22973             :   return NULL;
   22974             : }
   22975             : 
   22976             : 
   22977        3887 : SWIGINTERN PyObject *_wrap_Dataset_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22978        3887 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22979        3887 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22980        3887 :   void *argp1 = 0 ;
   22981        3887 :   int res1 = 0 ;
   22982        3887 :   PyObject *swig_obj[1] ;
   22983        3887 :   int result;
   22984             :   
   22985        3887 :   if (!args) SWIG_fail;
   22986        3887 :   swig_obj[0] = args;
   22987        3887 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22988        3887 :   if (!SWIG_IsOK(res1)) {
   22989           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22990             :   }
   22991        3887 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22992        3887 :   {
   22993        3887 :     const int bLocalUseExceptions = GetUseExceptions();
   22994        3887 :     if ( bLocalUseExceptions ) {
   22995        1332 :       pushErrorHandler();
   22996             :     }
   22997        3887 :     {
   22998        3887 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22999        3887 :       result = (int)GDALDatasetShadow_GetRefCount(arg1);
   23000        3887 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23001             :     }
   23002        3887 :     if ( bLocalUseExceptions ) {
   23003        1332 :       popErrorHandler();
   23004             :     }
   23005             : #ifndef SED_HACKS
   23006             :     if ( bLocalUseExceptions ) {
   23007             :       CPLErr eclass = CPLGetLastErrorType();
   23008             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23009             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23010             :       }
   23011             :     }
   23012             : #endif
   23013             :   }
   23014        3887 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23015        3887 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23016             :   return resultobj;
   23017             : fail:
   23018             :   return NULL;
   23019             : }
   23020             : 
   23021             : 
   23022           0 : SWIGINTERN PyObject *_wrap_Dataset_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23023           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23024           0 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23025           0 :   void *argp1 = 0 ;
   23026           0 :   int res1 = 0 ;
   23027           0 :   PyObject *swig_obj[1] ;
   23028           0 :   int result;
   23029             :   
   23030           0 :   if (!args) SWIG_fail;
   23031           0 :   swig_obj[0] = args;
   23032           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23033           0 :   if (!SWIG_IsOK(res1)) {
   23034           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSummaryRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23035             :   }
   23036           0 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23037           0 :   {
   23038           0 :     const int bLocalUseExceptions = GetUseExceptions();
   23039           0 :     if ( bLocalUseExceptions ) {
   23040           0 :       pushErrorHandler();
   23041             :     }
   23042           0 :     {
   23043           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23044           0 :       result = (int)GDALDatasetShadow_GetSummaryRefCount(arg1);
   23045           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23046             :     }
   23047           0 :     if ( bLocalUseExceptions ) {
   23048           0 :       popErrorHandler();
   23049             :     }
   23050             : #ifndef SED_HACKS
   23051             :     if ( bLocalUseExceptions ) {
   23052             :       CPLErr eclass = CPLGetLastErrorType();
   23053             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23054             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23055             :       }
   23056             :     }
   23057             : #endif
   23058             :   }
   23059           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23060           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; } }
   23061             :   return resultobj;
   23062             : fail:
   23063             :   return NULL;
   23064             : }
   23065             : 
   23066             : 
   23067        1233 : SWIGINTERN PyObject *_wrap_Dataset_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23068        1233 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23069        1233 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23070        1233 :   void *argp1 = 0 ;
   23071        1233 :   int res1 = 0 ;
   23072        1233 :   PyObject *swig_obj[1] ;
   23073        1233 :   OSRSpatialReferenceShadow *result = 0 ;
   23074             :   
   23075        1233 :   if (!args) SWIG_fail;
   23076        1233 :   swig_obj[0] = args;
   23077        1233 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23078        1233 :   if (!SWIG_IsOK(res1)) {
   23079           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23080             :   }
   23081        1233 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23082        1233 :   {
   23083        1233 :     const int bLocalUseExceptions = GetUseExceptions();
   23084        1233 :     if ( bLocalUseExceptions ) {
   23085         972 :       pushErrorHandler();
   23086             :     }
   23087        1233 :     {
   23088        1233 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23089        1233 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetSpatialRef(arg1);
   23090        1233 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23091             :     }
   23092        1233 :     if ( bLocalUseExceptions ) {
   23093         972 :       popErrorHandler();
   23094             :     }
   23095             : #ifndef SED_HACKS
   23096             :     if ( bLocalUseExceptions ) {
   23097             :       CPLErr eclass = CPLGetLastErrorType();
   23098             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23099             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23100             :       }
   23101             :     }
   23102             : #endif
   23103             :   }
   23104        1233 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   23105        1233 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23106             :   return resultobj;
   23107             : fail:
   23108             :   return NULL;
   23109             : }
   23110             : 
   23111             : 
   23112        1630 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23113        1630 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23114        1630 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23115        1630 :   char *arg2 = (char *) 0 ;
   23116        1630 :   void *argp1 = 0 ;
   23117        1630 :   int res1 = 0 ;
   23118        1630 :   int res2 ;
   23119        1630 :   char *buf2 = 0 ;
   23120        1630 :   int alloc2 = 0 ;
   23121        1630 :   PyObject *swig_obj[2] ;
   23122        1630 :   CPLErr result;
   23123             :   
   23124        1630 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetProjection", 2, 2, swig_obj)) SWIG_fail;
   23125        1630 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23126        1630 :   if (!SWIG_IsOK(res1)) {
   23127           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23128             :   }
   23129        1630 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23130        1630 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   23131        1630 :   if (!SWIG_IsOK(res2)) {
   23132           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   23133             :   }
   23134        1630 :   arg2 = reinterpret_cast< char * >(buf2);
   23135        1630 :   {
   23136        1630 :     if (!arg2) {
   23137           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   23138             :     }
   23139             :   }
   23140        1630 :   {
   23141        1630 :     const int bLocalUseExceptions = GetUseExceptions();
   23142        1630 :     if ( bLocalUseExceptions ) {
   23143         743 :       pushErrorHandler();
   23144             :     }
   23145        1630 :     {
   23146        1630 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23147        1630 :       result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
   23148        1630 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23149             :     }
   23150        1630 :     if ( bLocalUseExceptions ) {
   23151         743 :       popErrorHandler();
   23152             :     }
   23153             : #ifndef SED_HACKS
   23154             :     if ( bLocalUseExceptions ) {
   23155             :       CPLErr eclass = CPLGetLastErrorType();
   23156             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23157             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23158             :       }
   23159             :     }
   23160             : #endif
   23161             :   }
   23162        1630 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23163        1630 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23164        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; } }
   23165             :   return resultobj;
   23166           0 : fail:
   23167           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23168             :   return NULL;
   23169             : }
   23170             : 
   23171             : 
   23172         302 : SWIGINTERN PyObject *_wrap_Dataset_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23173         302 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23174         302 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23175         302 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   23176         302 :   void *argp1 = 0 ;
   23177         302 :   int res1 = 0 ;
   23178         302 :   void *argp2 = 0 ;
   23179         302 :   int res2 = 0 ;
   23180         302 :   PyObject *swig_obj[2] ;
   23181         302 :   CPLErr result;
   23182             :   
   23183         302 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   23184         302 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23185         302 :   if (!SWIG_IsOK(res1)) {
   23186           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23187             :   }
   23188         302 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23189         302 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23190         302 :   if (!SWIG_IsOK(res2)) {
   23191           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23192             :   }
   23193         302 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   23194         302 :   {
   23195         302 :     const int bLocalUseExceptions = GetUseExceptions();
   23196         302 :     if ( bLocalUseExceptions ) {
   23197         162 :       pushErrorHandler();
   23198             :     }
   23199         302 :     {
   23200         302 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23201         302 :       result = (CPLErr)GDALDatasetShadow_SetSpatialRef(arg1,arg2);
   23202         302 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23203             :     }
   23204         302 :     if ( bLocalUseExceptions ) {
   23205         162 :       popErrorHandler();
   23206             :     }
   23207             : #ifndef SED_HACKS
   23208             :     if ( bLocalUseExceptions ) {
   23209             :       CPLErr eclass = CPLGetLastErrorType();
   23210             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23211             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23212             :       }
   23213             :     }
   23214             : #endif
   23215             :   }
   23216         302 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23217         302 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23218             :   return resultobj;
   23219             : fail:
   23220             :   return NULL;
   23221             : }
   23222             : 
   23223             : 
   23224        3978 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23225        3978 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23226        3978 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23227        3978 :   double *arg2 ;
   23228        3978 :   int *arg3 = (int *) 0 ;
   23229        3978 :   int *arg4 = (int *) 0 ;
   23230        3978 :   void *argp1 = 0 ;
   23231        3978 :   int res1 = 0 ;
   23232        3978 :   double argout2[6] ;
   23233        3978 :   int isvalid2 ;
   23234        3978 :   int val4 ;
   23235        3978 :   PyObject * obj0 = 0 ;
   23236        3978 :   PyObject * obj1 = 0 ;
   23237        3978 :   char * kwnames[] = {
   23238             :     (char *)"self",  (char *)"can_return_null",  NULL 
   23239             :   };
   23240             :   
   23241        3978 :   {
   23242             :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   23243        3978 :     arg2 = argout2;
   23244        3978 :     arg3 = &isvalid2;
   23245             :   }
   23246        3978 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetGeoTransform", kwnames, &obj0, &obj1)) SWIG_fail;
   23247        3978 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23248        3978 :   if (!SWIG_IsOK(res1)) {
   23249           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23250             :   }
   23251        3978 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23252        3978 :   if (obj1) {
   23253         403 :     {
   23254             :       /* %typemap(in) (int *optional_##int) */
   23255         403 :       if ( obj1 == Py_None ) {
   23256             :         arg4 = 0;
   23257             :       }
   23258         403 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   23259             :         arg4 = (int *) &val4;
   23260             :       }
   23261             :       else {
   23262           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   23263           0 :         SWIG_fail;
   23264             :       }
   23265             :     }
   23266             :   }
   23267        3978 :   {
   23268        3978 :     const int bLocalUseExceptions = GetUseExceptions();
   23269        3978 :     if ( bLocalUseExceptions ) {
   23270        2694 :       pushErrorHandler();
   23271             :     }
   23272        3978 :     {
   23273        3978 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23274        3978 :       GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   23275        3978 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23276             :     }
   23277        3978 :     if ( bLocalUseExceptions ) {
   23278        2694 :       popErrorHandler();
   23279             :     }
   23280             : #ifndef SED_HACKS
   23281             :     if ( bLocalUseExceptions ) {
   23282             :       CPLErr eclass = CPLGetLastErrorType();
   23283             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23284             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23285             :       }
   23286             :     }
   23287             : #endif
   23288             :   }
   23289        3978 :   resultobj = SWIG_Py_Void();
   23290        3978 :   {
   23291             :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   23292        3978 :     PyObject *r;
   23293        3978 :     if ( !*arg3 ) {
   23294         125 :       Py_INCREF(Py_None);
   23295         125 :       r = Py_None;
   23296             :     }
   23297             :     else {
   23298        3853 :       r = CreateTupleFromDoubleArray(arg2, 6);
   23299             :     }
   23300             : #if 0x040001 >= 0x040300
   23301             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23302             : #else
   23303        3978 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23304             : #endif
   23305             :   }
   23306        3978 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23307             :   return resultobj;
   23308             : fail:
   23309             :   return NULL;
   23310             : }
   23311             : 
   23312             : 
   23313        2910 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23314        2910 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23315        2910 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23316        2910 :   double *arg2 ;
   23317        2910 :   void *argp1 = 0 ;
   23318        2910 :   int res1 = 0 ;
   23319        2910 :   double argin2[6] ;
   23320        2910 :   PyObject *swig_obj[2] ;
   23321        2910 :   CPLErr result;
   23322             :   
   23323        2910 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetGeoTransform", 2, 2, swig_obj)) SWIG_fail;
   23324        2910 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23325        2910 :   if (!SWIG_IsOK(res1)) {
   23326           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23327             :   }
   23328        2910 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23329        2910 :   {
   23330             :     /* %typemap(in) (double argin2[ANY]) */
   23331        2910 :     arg2 = argin2;
   23332        2910 :     if (! PySequence_Check(swig_obj[1]) ) {
   23333           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23334           0 :       SWIG_fail;
   23335             :     }
   23336        2910 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
   23337        2910 :     if ( seq_size != 6 ) {
   23338           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   23339           0 :       SWIG_fail;
   23340             :     }
   23341       20370 :     for (unsigned int i=0; i<6; i++) {
   23342       17460 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23343       17460 :       double val;
   23344       17460 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   23345           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   23346           0 :         Py_DECREF(o);
   23347           0 :         SWIG_fail;
   23348             :       }
   23349       17460 :       arg2[i] =  val;
   23350       17460 :       Py_DECREF(o);
   23351             :     }
   23352             :   }
   23353        2910 :   {
   23354        2910 :     const int bLocalUseExceptions = GetUseExceptions();
   23355        2910 :     if ( bLocalUseExceptions ) {
   23356        1750 :       pushErrorHandler();
   23357             :     }
   23358        2910 :     {
   23359        2910 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23360        2910 :       result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
   23361        2910 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23362             :     }
   23363        2910 :     if ( bLocalUseExceptions ) {
   23364        1750 :       popErrorHandler();
   23365             :     }
   23366             : #ifndef SED_HACKS
   23367             :     if ( bLocalUseExceptions ) {
   23368             :       CPLErr eclass = CPLGetLastErrorType();
   23369             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23370             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23371             :       }
   23372             :     }
   23373             : #endif
   23374             :   }
   23375        2910 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23376        2910 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23377             :   return resultobj;
   23378             : fail:
   23379             :   return NULL;
   23380             : }
   23381             : 
   23382             : 
   23383          10 : SWIGINTERN PyObject *_wrap_Dataset_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23384          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23385          10 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23386          10 :   double *arg2 ;
   23387          10 :   int *arg3 = (int *) 0 ;
   23388          10 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) NULL ;
   23389          10 :   void *argp1 = 0 ;
   23390          10 :   int res1 = 0 ;
   23391          10 :   double argout2[4] ;
   23392          10 :   int isvalid2 ;
   23393          10 :   void *argp4 = 0 ;
   23394          10 :   int res4 = 0 ;
   23395          10 :   PyObject * obj0 = 0 ;
   23396          10 :   PyObject * obj1 = 0 ;
   23397          10 :   char * kwnames[] = {
   23398             :     (char *)"self",  (char *)"srs",  NULL 
   23399             :   };
   23400             :   
   23401          10 :   {
   23402             :     /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
   23403          10 :     arg2 = argout2;
   23404          10 :     arg3 = &isvalid2;
   23405             :   }
   23406          10 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetExtent", kwnames, &obj0, &obj1)) SWIG_fail;
   23407          10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23408          10 :   if (!SWIG_IsOK(res1)) {
   23409           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtent" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23410             :   }
   23411          10 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23412          10 :   if (obj1) {
   23413           2 :     res4 = SWIG_ConvertPtr(obj1, &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23414           2 :     if (!SWIG_IsOK(res4)) {
   23415           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_GetExtent" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23416             :     }
   23417           2 :     arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   23418             :   }
   23419          10 :   {
   23420          10 :     const int bLocalUseExceptions = GetUseExceptions();
   23421          10 :     if ( bLocalUseExceptions ) {
   23422           2 :       pushErrorHandler();
   23423             :     }
   23424          10 :     {
   23425          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23426          10 :       GDALDatasetShadow_GetExtent(arg1,arg2,arg3,arg4);
   23427          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23428             :     }
   23429          10 :     if ( bLocalUseExceptions ) {
   23430           2 :       popErrorHandler();
   23431             :     }
   23432             : #ifndef SED_HACKS
   23433             :     if ( bLocalUseExceptions ) {
   23434             :       CPLErr eclass = CPLGetLastErrorType();
   23435             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23436             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23437             :       }
   23438             :     }
   23439             : #endif
   23440             :   }
   23441          10 :   resultobj = SWIG_Py_Void();
   23442          10 :   {
   23443             :     /* %typemap(argout) (double argout[4], int* isvalid)  */
   23444          10 :     PyObject *r;
   23445          10 :     if ( !*arg3 ) {
   23446           3 :       Py_INCREF(Py_None);
   23447           3 :       r = Py_None;
   23448             :     }
   23449             :     else {
   23450           7 :       r = CreateTupleFromDoubleArray(arg2, 4);
   23451             :     }
   23452             : #if 0x040001 >= 0x040300
   23453             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23454             : #else
   23455          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23456             : #endif
   23457             :   }
   23458          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; } }
   23459             :   return resultobj;
   23460             : fail:
   23461             :   return NULL;
   23462             : }
   23463             : 
   23464             : 
   23465           4 : SWIGINTERN PyObject *_wrap_Dataset_GetExtentWGS84LongLat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23466           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23467           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23468           4 :   double *arg2 ;
   23469           4 :   int *arg3 = (int *) 0 ;
   23470           4 :   void *argp1 = 0 ;
   23471           4 :   int res1 = 0 ;
   23472           4 :   double argout2[4] ;
   23473           4 :   int isvalid2 ;
   23474           4 :   PyObject *swig_obj[1] ;
   23475             :   
   23476           4 :   {
   23477             :     /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
   23478           4 :     arg2 = argout2;
   23479           4 :     arg3 = &isvalid2;
   23480             :   }
   23481           4 :   if (!args) SWIG_fail;
   23482           4 :   swig_obj[0] = args;
   23483           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23484           4 :   if (!SWIG_IsOK(res1)) {
   23485           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtentWGS84LongLat" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23486             :   }
   23487           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23488           4 :   {
   23489           4 :     const int bLocalUseExceptions = GetUseExceptions();
   23490           4 :     if ( bLocalUseExceptions ) {
   23491           2 :       pushErrorHandler();
   23492             :     }
   23493           4 :     {
   23494           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23495           4 :       GDALDatasetShadow_GetExtentWGS84LongLat(arg1,arg2,arg3);
   23496           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23497             :     }
   23498           4 :     if ( bLocalUseExceptions ) {
   23499           2 :       popErrorHandler();
   23500             :     }
   23501             : #ifndef SED_HACKS
   23502             :     if ( bLocalUseExceptions ) {
   23503             :       CPLErr eclass = CPLGetLastErrorType();
   23504             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23505             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23506             :       }
   23507             :     }
   23508             : #endif
   23509             :   }
   23510           4 :   resultobj = SWIG_Py_Void();
   23511           4 :   {
   23512             :     /* %typemap(argout) (double argout[4], int* isvalid)  */
   23513           4 :     PyObject *r;
   23514           4 :     if ( !*arg3 ) {
   23515           2 :       Py_INCREF(Py_None);
   23516           2 :       r = Py_None;
   23517             :     }
   23518             :     else {
   23519           2 :       r = CreateTupleFromDoubleArray(arg2, 4);
   23520             :     }
   23521             : #if 0x040001 >= 0x040300
   23522             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23523             : #else
   23524           4 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23525             : #endif
   23526             :   }
   23527           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; } }
   23528             :   return resultobj;
   23529             : fail:
   23530             :   return NULL;
   23531             : }
   23532             : 
   23533             : 
   23534         682 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23535         682 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23536         682 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23537         682 :   char *arg2 = (char *) "NEAREST" ;
   23538         682 :   int arg3 = (int) 0 ;
   23539         682 :   int *arg4 = (int *) 0 ;
   23540         682 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   23541         682 :   void *arg6 = (void *) NULL ;
   23542         682 :   char **arg7 = (char **) NULL ;
   23543         682 :   void *argp1 = 0 ;
   23544         682 :   int res1 = 0 ;
   23545         682 :   int res2 ;
   23546         682 :   char *buf2 = 0 ;
   23547         682 :   int alloc2 = 0 ;
   23548         682 :   PyObject * obj0 = 0 ;
   23549         682 :   PyObject * obj1 = 0 ;
   23550         682 :   PyObject * obj2 = 0 ;
   23551         682 :   PyObject * obj3 = 0 ;
   23552         682 :   PyObject * obj4 = 0 ;
   23553         682 :   PyObject * obj5 = 0 ;
   23554         682 :   char * kwnames[] = {
   23555             :     (char *)"self",  (char *)"resampling",  (char *)"overviewlist",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   23556             :   };
   23557         682 :   int result;
   23558             :   
   23559             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   23560         682 :   PyProgressData *psProgressInfo;
   23561         682 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   23562         682 :   psProgressInfo->nLastReported = -1;
   23563         682 :   psProgressInfo->psPyCallback = NULL;
   23564         682 :   psProgressInfo->psPyCallbackData = NULL;
   23565         682 :   arg6 = psProgressInfo;
   23566         682 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOO:Dataset_BuildOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   23567         682 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23568         682 :   if (!SWIG_IsOK(res1)) {
   23569           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23570             :   }
   23571         682 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23572         682 :   if (obj1) {
   23573         631 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   23574         631 :     if (!SWIG_IsOK(res2)) {
   23575           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   23576             :     }
   23577         631 :     arg2 = reinterpret_cast< char * >(buf2);
   23578             :   }
   23579         682 :   if (obj2) {
   23580         682 :     {
   23581             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   23582         682 :       arg4 = CreateCIntListFromSequence(obj2, &arg3);
   23583         682 :       if( arg3 < 0 ) {
   23584           0 :         SWIG_fail;
   23585             :       }
   23586             :     }
   23587             :   }
   23588         682 :   if (obj3) {
   23589           2 :     {
   23590             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   23591             :       /* callback_func typemap */
   23592             :       
   23593             :       /* In some cases 0 is passed instead of None. */
   23594             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   23595           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   23596             :       {
   23597           0 :         if( PyLong_AsLong(obj3) == 0 )
   23598             :         {
   23599           0 :           obj3 = Py_None;
   23600             :         }
   23601             :       }
   23602             :       
   23603           2 :       if (obj3 && obj3 != Py_None ) {
   23604           2 :         void* cbfunction = NULL;
   23605           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   23606             :             (void**)&cbfunction,
   23607             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   23608             :             SWIG_POINTER_EXCEPTION | 0 ));
   23609             :         
   23610           2 :         if ( cbfunction == GDALTermProgress ) {
   23611             :           arg5 = GDALTermProgress;
   23612             :         } else {
   23613           2 :           if (!PyCallable_Check(obj3)) {
   23614           0 :             PyErr_SetString( PyExc_RuntimeError,
   23615             :               "Object given is not a Python function" );
   23616           0 :             SWIG_fail;
   23617             :           }
   23618           2 :           psProgressInfo->psPyCallback = obj3;
   23619           2 :           arg5 = PyProgressProxy;
   23620             :         }
   23621             :         
   23622             :       }
   23623             :       
   23624             :     }
   23625             :   }
   23626         682 :   if (obj4) {
   23627           2 :     {
   23628             :       /* %typemap(in) ( void* callback_data=NULL)  */
   23629           2 :       psProgressInfo->psPyCallbackData = obj4 ;
   23630             :     }
   23631             :   }
   23632         682 :   if (obj5) {
   23633          14 :     {
   23634             :       /* %typemap(in) char **dict */
   23635          14 :       arg7 = NULL;
   23636          14 :       if ( PySequence_Check( obj5 ) ) {
   23637          14 :         int bErr = FALSE;
   23638          14 :         arg7 = CSLFromPySequence(obj5, &bErr);
   23639          14 :         if ( bErr )
   23640             :         {
   23641           0 :           SWIG_fail;
   23642             :         }
   23643             :       }
   23644           0 :       else if ( PyMapping_Check( obj5 ) ) {
   23645           0 :         int bErr = FALSE;
   23646           0 :         arg7 = CSLFromPyMapping(obj5, &bErr);
   23647           0 :         if ( bErr )
   23648             :         {
   23649           0 :           SWIG_fail;
   23650             :         }
   23651             :       }
   23652             :       else {
   23653           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   23654           0 :         SWIG_fail;
   23655             :       }
   23656             :     }
   23657             :   }
   23658         682 :   {
   23659         682 :     const int bLocalUseExceptions = GetUseExceptions();
   23660         682 :     if ( bLocalUseExceptions ) {
   23661         268 :       pushErrorHandler();
   23662             :     }
   23663         682 :     {
   23664         682 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23665         682 :       result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   23666         682 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23667             :     }
   23668         682 :     if ( bLocalUseExceptions ) {
   23669         268 :       popErrorHandler();
   23670             :     }
   23671             : #ifndef SED_HACKS
   23672             :     if ( bLocalUseExceptions ) {
   23673             :       CPLErr eclass = CPLGetLastErrorType();
   23674             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23675             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23676             :       }
   23677             :     }
   23678             : #endif
   23679             :   }
   23680         682 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23681         682 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23682         682 :   {
   23683             :     /* %typemap(freearg) (int nList, int* pList) */
   23684         682 :     free(arg4);
   23685             :   }
   23686         682 :   {
   23687             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23688             :     
   23689         682 :     CPLFree(psProgressInfo);
   23690             :     
   23691             :   }
   23692         682 :   {
   23693             :     /* %typemap(freearg) char **dict */
   23694         682 :     CSLDestroy( arg7 );
   23695             :   }
   23696         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; } }
   23697             :   return resultobj;
   23698           0 : fail:
   23699           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23700           0 :   {
   23701             :     /* %typemap(freearg) (int nList, int* pList) */
   23702           0 :     free(arg4);
   23703             :   }
   23704           0 :   {
   23705             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23706             :     
   23707           0 :     CPLFree(psProgressInfo);
   23708             :     
   23709             :   }
   23710           0 :   {
   23711             :     /* %typemap(freearg) char **dict */
   23712           0 :     CSLDestroy( arg7 );
   23713             :   }
   23714             :   return NULL;
   23715             : }
   23716             : 
   23717             : 
   23718         117 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23719         117 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23720         117 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23721         117 :   void *argp1 = 0 ;
   23722         117 :   int res1 = 0 ;
   23723         117 :   PyObject *swig_obj[1] ;
   23724         117 :   int result;
   23725             :   
   23726         117 :   if (!args) SWIG_fail;
   23727         117 :   swig_obj[0] = args;
   23728         117 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23729         117 :   if (!SWIG_IsOK(res1)) {
   23730           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23731             :   }
   23732         117 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23733         117 :   {
   23734         117 :     const int bLocalUseExceptions = GetUseExceptions();
   23735         117 :     if ( bLocalUseExceptions ) {
   23736          68 :       pushErrorHandler();
   23737             :     }
   23738         117 :     {
   23739         117 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23740         117 :       result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   23741         117 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23742             :     }
   23743         117 :     if ( bLocalUseExceptions ) {
   23744          68 :       popErrorHandler();
   23745             :     }
   23746             : #ifndef SED_HACKS
   23747             :     if ( bLocalUseExceptions ) {
   23748             :       CPLErr eclass = CPLGetLastErrorType();
   23749             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23750             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23751             :       }
   23752             :     }
   23753             : #endif
   23754             :   }
   23755         117 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23756         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; } }
   23757             :   return resultobj;
   23758             : fail:
   23759             :   return NULL;
   23760             : }
   23761             : 
   23762             : 
   23763         454 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23764         454 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23765         454 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23766         454 :   void *argp1 = 0 ;
   23767         454 :   int res1 = 0 ;
   23768         454 :   PyObject *swig_obj[1] ;
   23769         454 :   char *result = 0 ;
   23770             :   
   23771         454 :   if (!args) SWIG_fail;
   23772         454 :   swig_obj[0] = args;
   23773         454 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23774         454 :   if (!SWIG_IsOK(res1)) {
   23775           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23776             :   }
   23777         454 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23778         454 :   {
   23779         454 :     const int bLocalUseExceptions = GetUseExceptions();
   23780         454 :     if ( bLocalUseExceptions ) {
   23781         436 :       pushErrorHandler();
   23782             :     }
   23783         454 :     {
   23784         454 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23785         454 :       result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   23786         454 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23787             :     }
   23788         454 :     if ( bLocalUseExceptions ) {
   23789         436 :       popErrorHandler();
   23790             :     }
   23791             : #ifndef SED_HACKS
   23792             :     if ( bLocalUseExceptions ) {
   23793             :       CPLErr eclass = CPLGetLastErrorType();
   23794             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23795             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23796             :       }
   23797             :     }
   23798             : #endif
   23799             :   }
   23800         454 :   resultobj = SWIG_FromCharPtr((const char *)result);
   23801         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; } }
   23802             :   return resultobj;
   23803             : fail:
   23804             :   return NULL;
   23805             : }
   23806             : 
   23807             : 
   23808         426 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23809         426 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23810         426 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23811         426 :   void *argp1 = 0 ;
   23812         426 :   int res1 = 0 ;
   23813         426 :   PyObject *swig_obj[1] ;
   23814         426 :   OSRSpatialReferenceShadow *result = 0 ;
   23815             :   
   23816         426 :   if (!args) SWIG_fail;
   23817         426 :   swig_obj[0] = args;
   23818         426 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23819         426 :   if (!SWIG_IsOK(res1)) {
   23820           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23821             :   }
   23822         426 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23823         426 :   {
   23824         426 :     const int bLocalUseExceptions = GetUseExceptions();
   23825         426 :     if ( bLocalUseExceptions ) {
   23826         412 :       pushErrorHandler();
   23827             :     }
   23828         426 :     {
   23829         426 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23830         426 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetGCPSpatialRef(arg1);
   23831         426 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23832             :     }
   23833         426 :     if ( bLocalUseExceptions ) {
   23834         412 :       popErrorHandler();
   23835             :     }
   23836             : #ifndef SED_HACKS
   23837             :     if ( bLocalUseExceptions ) {
   23838             :       CPLErr eclass = CPLGetLastErrorType();
   23839             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23840             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23841             :       }
   23842             :     }
   23843             : #endif
   23844             :   }
   23845         426 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   23846         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; } }
   23847             :   return resultobj;
   23848             : fail:
   23849             :   return NULL;
   23850             : }
   23851             : 
   23852             : 
   23853         528 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23854         528 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23855         528 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23856         528 :   int *arg2 = (int *) 0 ;
   23857         528 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   23858         528 :   void *argp1 = 0 ;
   23859         528 :   int res1 = 0 ;
   23860         528 :   int nGCPs2 = 0 ;
   23861         528 :   GDAL_GCP *pGCPs2 = 0 ;
   23862         528 :   PyObject *swig_obj[1] ;
   23863             :   
   23864         528 :   {
   23865             :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   23866         528 :     arg2 = &nGCPs2;
   23867         528 :     arg3 = &pGCPs2;
   23868             :   }
   23869         528 :   if (!args) SWIG_fail;
   23870         528 :   swig_obj[0] = args;
   23871         528 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23872         528 :   if (!SWIG_IsOK(res1)) {
   23873           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23874             :   }
   23875         528 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23876         528 :   {
   23877         528 :     const int bLocalUseExceptions = GetUseExceptions();
   23878         528 :     if ( bLocalUseExceptions ) {
   23879         495 :       pushErrorHandler();
   23880             :     }
   23881         528 :     {
   23882         528 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23883         528 :       GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   23884         528 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23885             :     }
   23886         528 :     if ( bLocalUseExceptions ) {
   23887         495 :       popErrorHandler();
   23888             :     }
   23889             : #ifndef SED_HACKS
   23890             :     if ( bLocalUseExceptions ) {
   23891             :       CPLErr eclass = CPLGetLastErrorType();
   23892             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23893             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23894             :       }
   23895             :     }
   23896             : #endif
   23897             :   }
   23898         528 :   resultobj = SWIG_Py_Void();
   23899         528 :   {
   23900             :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   23901         528 :     PyObject *dict = PyTuple_New( *arg2 );
   23902        3826 :     for( int i = 0; i < *arg2; i++ ) {
   23903        6596 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   23904             :         (*arg3)[i].dfGCPY,
   23905             :         (*arg3)[i].dfGCPZ,
   23906             :         (*arg3)[i].dfGCPPixel,
   23907             :         (*arg3)[i].dfGCPLine,
   23908        3298 :         (*arg3)[i].pszInfo,
   23909        3298 :         (*arg3)[i].pszId );
   23910             :       
   23911        3298 :       PyTuple_SetItem(dict, i,
   23912             :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   23913             :     }
   23914         528 :     Py_DECREF(resultobj);
   23915         528 :     resultobj = dict;
   23916             :   }
   23917         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; } }
   23918             :   return resultobj;
   23919             : fail:
   23920             :   return NULL;
   23921             : }
   23922             : 
   23923             : 
   23924          28 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23925          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23926          28 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23927          28 :   int arg2 ;
   23928          28 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   23929          28 :   char *arg4 = (char *) 0 ;
   23930          28 :   void *argp1 = 0 ;
   23931          28 :   int res1 = 0 ;
   23932          28 :   GDAL_GCP *tmpGCPList2 ;
   23933          28 :   int res4 ;
   23934          28 :   char *buf4 = 0 ;
   23935          28 :   int alloc4 = 0 ;
   23936          28 :   PyObject *swig_obj[3] ;
   23937          28 :   CPLErr result;
   23938             :   
   23939          28 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs", 3, 3, swig_obj)) SWIG_fail;
   23940          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23941          28 :   if (!SWIG_IsOK(res1)) {
   23942           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23943             :   }
   23944          28 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23945          28 :   {
   23946             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23947             :     /* check if is List */
   23948          28 :     if ( !PySequence_Check(swig_obj[1]) ) {
   23949           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23950           0 :       SWIG_fail;
   23951             :     }
   23952          28 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   23953          28 :     if( size > (Py_ssize_t)INT_MAX ) {
   23954           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   23955           0 :       SWIG_fail;
   23956             :     }
   23957          28 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   23958           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   23959           0 :       SWIG_fail;
   23960             :     }
   23961          28 :     arg2 = (int)size;
   23962          28 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   23963          28 :     if( !tmpGCPList2 ) {
   23964           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   23965           0 :       SWIG_fail;
   23966             :     }
   23967          91 :     arg3 = tmpGCPList2;
   23968          91 :     for( int i = 0; i<arg2; i++ ) {
   23969          63 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23970          63 :       GDAL_GCP *item = 0;
   23971          63 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   23972          63 :       if ( ! item ) {
   23973           0 :         Py_DECREF(o);
   23974           0 :         SWIG_fail;
   23975             :       }
   23976          63 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   23977          63 :       Py_DECREF(o);
   23978             :     }
   23979             :   }
   23980          28 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf4, NULL, &alloc4);
   23981          28 :   if (!SWIG_IsOK(res4)) {
   23982           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs" "', argument " "4"" of type '" "char const *""'");
   23983             :   }
   23984          28 :   arg4 = reinterpret_cast< char * >(buf4);
   23985          28 :   {
   23986          28 :     const int bLocalUseExceptions = GetUseExceptions();
   23987          28 :     if ( bLocalUseExceptions ) {
   23988          14 :       pushErrorHandler();
   23989             :     }
   23990          28 :     {
   23991          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23992          28 :       result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
   23993          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23994             :     }
   23995          28 :     if ( bLocalUseExceptions ) {
   23996          14 :       popErrorHandler();
   23997             :     }
   23998             : #ifndef SED_HACKS
   23999             :     if ( bLocalUseExceptions ) {
   24000             :       CPLErr eclass = CPLGetLastErrorType();
   24001             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24002             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24003             :       }
   24004             :     }
   24005             : #endif
   24006             :   }
   24007          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24008          28 :   {
   24009             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24010          28 :     free( arg3 );
   24011             :   }
   24012          28 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   24013          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; } }
   24014             :   return resultobj;
   24015           0 : fail:
   24016           0 :   {
   24017             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24018           0 :     free( arg3 );
   24019             :   }
   24020           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   24021             :   return NULL;
   24022             : }
   24023             : 
   24024             : 
   24025           9 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24026           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24027           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24028           9 :   int arg2 ;
   24029           9 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   24030           9 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   24031           9 :   void *argp1 = 0 ;
   24032           9 :   int res1 = 0 ;
   24033           9 :   GDAL_GCP *tmpGCPList2 ;
   24034           9 :   void *argp4 = 0 ;
   24035           9 :   int res4 = 0 ;
   24036           9 :   PyObject *swig_obj[3] ;
   24037           9 :   CPLErr result;
   24038             :   
   24039           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs2", 3, 3, swig_obj)) SWIG_fail;
   24040           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24041           9 :   if (!SWIG_IsOK(res1)) {
   24042           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs2" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24043             :   }
   24044           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24045           9 :   {
   24046             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24047             :     /* check if is List */
   24048           9 :     if ( !PySequence_Check(swig_obj[1]) ) {
   24049           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   24050           0 :       SWIG_fail;
   24051             :     }
   24052           9 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   24053           9 :     if( size > (Py_ssize_t)INT_MAX ) {
   24054           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   24055           0 :       SWIG_fail;
   24056             :     }
   24057           9 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   24058           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   24059           0 :       SWIG_fail;
   24060             :     }
   24061           9 :     arg2 = (int)size;
   24062           9 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   24063           9 :     if( !tmpGCPList2 ) {
   24064           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   24065           0 :       SWIG_fail;
   24066             :     }
   24067       21871 :     arg3 = tmpGCPList2;
   24068       21871 :     for( int i = 0; i<arg2; i++ ) {
   24069       21862 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   24070       21862 :       GDAL_GCP *item = 0;
   24071       21862 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   24072       21862 :       if ( ! item ) {
   24073           0 :         Py_DECREF(o);
   24074           0 :         SWIG_fail;
   24075             :       }
   24076       21862 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   24077       21862 :       Py_DECREF(o);
   24078             :     }
   24079             :   }
   24080           9 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   24081           9 :   if (!SWIG_IsOK(res4)) {
   24082           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs2" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   24083             :   }
   24084           9 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   24085           9 :   {
   24086           9 :     const int bLocalUseExceptions = GetUseExceptions();
   24087           9 :     if ( bLocalUseExceptions ) {
   24088           1 :       pushErrorHandler();
   24089             :     }
   24090           9 :     {
   24091           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24092           9 :       result = (CPLErr)GDALDatasetShadow_SetGCPs2(arg1,arg2,(GDAL_GCP const *)arg3,arg4);
   24093           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24094             :     }
   24095           9 :     if ( bLocalUseExceptions ) {
   24096           1 :       popErrorHandler();
   24097             :     }
   24098             : #ifndef SED_HACKS
   24099             :     if ( bLocalUseExceptions ) {
   24100             :       CPLErr eclass = CPLGetLastErrorType();
   24101             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24102             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24103             :       }
   24104             :     }
   24105             : #endif
   24106             :   }
   24107           9 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24108           9 :   {
   24109             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24110           9 :     free( arg3 );
   24111             :   }
   24112           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; } }
   24113             :   return resultobj;
   24114           0 : fail:
   24115           0 :   {
   24116             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24117           0 :     free( arg3 );
   24118             :   }
   24119           0 :   return NULL;
   24120             : }
   24121             : 
   24122             : 
   24123        1623 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24124        1623 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24125        1623 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24126        1623 :   void *argp1 = 0 ;
   24127        1623 :   int res1 = 0 ;
   24128        1623 :   PyObject *swig_obj[1] ;
   24129        1623 :   CPLErr result;
   24130             :   
   24131        1623 :   if (!args) SWIG_fail;
   24132        1623 :   swig_obj[0] = args;
   24133        1623 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24134        1623 :   if (!SWIG_IsOK(res1)) {
   24135           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24136             :   }
   24137        1623 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24138        1623 :   {
   24139        1623 :     const int bLocalUseExceptions = GetUseExceptions();
   24140        1623 :     if ( bLocalUseExceptions ) {
   24141         399 :       pushErrorHandler();
   24142             :     }
   24143        1623 :     {
   24144        1623 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24145        1623 :       result = (CPLErr)GDALDatasetShadow_FlushCache(arg1);
   24146        1623 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24147             :     }
   24148        1623 :     if ( bLocalUseExceptions ) {
   24149         399 :       popErrorHandler();
   24150             :     }
   24151             : #ifndef SED_HACKS
   24152             :     if ( bLocalUseExceptions ) {
   24153             :       CPLErr eclass = CPLGetLastErrorType();
   24154             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24155             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24156             :       }
   24157             :     }
   24158             : #endif
   24159             :   }
   24160        1623 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24161        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; } }
   24162             :   return resultobj;
   24163             : fail:
   24164             :   return NULL;
   24165             : }
   24166             : 
   24167             : 
   24168          32 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24169          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24170          32 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24171          32 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   24172          32 :   char **arg3 = (char **) 0 ;
   24173          32 :   void *argp1 = 0 ;
   24174          32 :   int res1 = 0 ;
   24175          32 :   PyObject * obj0 = 0 ;
   24176          32 :   PyObject * obj1 = 0 ;
   24177          32 :   PyObject * obj2 = 0 ;
   24178          32 :   char * kwnames[] = {
   24179             :     (char *)"self",  (char *)"datatype",  (char *)"options",  NULL 
   24180             :   };
   24181          32 :   CPLErr result;
   24182             :   
   24183          32 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Dataset_AddBand", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   24184          32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24185          32 :   if (!SWIG_IsOK(res1)) {
   24186           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24187             :   }
   24188          32 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24189          32 :   if (obj1) {
   24190          26 :     {
   24191             :       // %typemap(in) GDALDataType
   24192          26 :       int val = 0;
   24193          26 :       int ecode = SWIG_AsVal_int(obj1, &val);
   24194          26 :       if (!SWIG_IsOK(ecode)) {
   24195           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24196             :       }
   24197          26 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   24198             :       {
   24199           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24200             :       }
   24201             :       arg2 = static_cast<GDALDataType>(val);
   24202             :     }
   24203             :   }
   24204          32 :   if (obj2) {
   24205          15 :     {
   24206             :       /* %typemap(in) char **dict */
   24207          15 :       arg3 = NULL;
   24208          15 :       if ( PySequence_Check( obj2 ) ) {
   24209          15 :         int bErr = FALSE;
   24210          15 :         arg3 = CSLFromPySequence(obj2, &bErr);
   24211          15 :         if ( bErr )
   24212             :         {
   24213           0 :           SWIG_fail;
   24214             :         }
   24215             :       }
   24216           0 :       else if ( PyMapping_Check( obj2 ) ) {
   24217           0 :         int bErr = FALSE;
   24218           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   24219           0 :         if ( bErr )
   24220             :         {
   24221           0 :           SWIG_fail;
   24222             :         }
   24223             :       }
   24224             :       else {
   24225           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24226           0 :         SWIG_fail;
   24227             :       }
   24228             :     }
   24229             :   }
   24230          32 :   {
   24231          32 :     const int bLocalUseExceptions = GetUseExceptions();
   24232          32 :     if ( bLocalUseExceptions ) {
   24233          22 :       pushErrorHandler();
   24234             :     }
   24235          32 :     {
   24236          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24237          32 :       result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
   24238          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24239             :     }
   24240          32 :     if ( bLocalUseExceptions ) {
   24241          22 :       popErrorHandler();
   24242             :     }
   24243             : #ifndef SED_HACKS
   24244             :     if ( bLocalUseExceptions ) {
   24245             :       CPLErr eclass = CPLGetLastErrorType();
   24246             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24247             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24248             :       }
   24249             :     }
   24250             : #endif
   24251             :   }
   24252          32 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24253          32 :   {
   24254             :     /* %typemap(freearg) char **dict */
   24255          32 :     CSLDestroy( arg3 );
   24256             :   }
   24257          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; } }
   24258             :   return resultobj;
   24259           0 : fail:
   24260           0 :   {
   24261             :     /* %typemap(freearg) char **dict */
   24262           0 :     CSLDestroy( arg3 );
   24263             :   }
   24264             :   return NULL;
   24265             : }
   24266             : 
   24267             : 
   24268          59 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24269          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24270          59 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24271          59 :   int arg2 ;
   24272          59 :   void *argp1 = 0 ;
   24273          59 :   int res1 = 0 ;
   24274          59 :   int val2 ;
   24275          59 :   int ecode2 = 0 ;
   24276          59 :   PyObject *swig_obj[2] ;
   24277          59 :   CPLErr result;
   24278             :   
   24279          59 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   24280          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24281          59 :   if (!SWIG_IsOK(res1)) {
   24282           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24283             :   }
   24284          59 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24285          59 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   24286          59 :   if (!SWIG_IsOK(ecode2)) {
   24287           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   24288             :   } 
   24289          59 :   arg2 = static_cast< int >(val2);
   24290          59 :   {
   24291          59 :     const int bLocalUseExceptions = GetUseExceptions();
   24292          59 :     if ( bLocalUseExceptions ) {
   24293          21 :       pushErrorHandler();
   24294             :     }
   24295          59 :     {
   24296          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24297          59 :       result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
   24298          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24299             :     }
   24300          59 :     if ( bLocalUseExceptions ) {
   24301          21 :       popErrorHandler();
   24302             :     }
   24303             : #ifndef SED_HACKS
   24304             :     if ( bLocalUseExceptions ) {
   24305             :       CPLErr eclass = CPLGetLastErrorType();
   24306             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24307             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24308             :       }
   24309             :     }
   24310             : #endif
   24311             :   }
   24312          59 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24313          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; } }
   24314             :   return resultobj;
   24315             : fail:
   24316             :   return NULL;
   24317             : }
   24318             : 
   24319             : 
   24320         460 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24321         460 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24322         460 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24323         460 :   void *argp1 = 0 ;
   24324         460 :   int res1 = 0 ;
   24325         460 :   PyObject *swig_obj[1] ;
   24326         460 :   char **result = 0 ;
   24327             :   
   24328         460 :   if (!args) SWIG_fail;
   24329         460 :   swig_obj[0] = args;
   24330         460 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24331         460 :   if (!SWIG_IsOK(res1)) {
   24332           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24333             :   }
   24334         460 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24335         460 :   {
   24336         460 :     const int bLocalUseExceptions = GetUseExceptions();
   24337         460 :     if ( bLocalUseExceptions ) {
   24338         315 :       pushErrorHandler();
   24339             :     }
   24340         460 :     {
   24341         460 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24342         460 :       result = (char **)GDALDatasetShadow_GetFileList(arg1);
   24343         460 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24344             :     }
   24345         460 :     if ( bLocalUseExceptions ) {
   24346         315 :       popErrorHandler();
   24347             :     }
   24348             : #ifndef SED_HACKS
   24349             :     if ( bLocalUseExceptions ) {
   24350             :       CPLErr eclass = CPLGetLastErrorType();
   24351             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24352             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24353             :       }
   24354             :     }
   24355             : #endif
   24356             :   }
   24357         460 :   {
   24358             :     /* %typemap(out) char **CSL -> ( string ) */
   24359         460 :     bool bErr = false;
   24360         460 :     resultobj = CSLToList(result, &bErr);
   24361         460 :     CSLDestroy(result);
   24362         460 :     if( bErr ) {
   24363           0 :       SWIG_fail;
   24364             :     }
   24365             :   }
   24366         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; } }
   24367             :   return resultobj;
   24368             : fail:
   24369             :   return NULL;
   24370             : }
   24371             : 
   24372             : 
   24373      176516 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24374      176516 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24375      176516 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24376      176516 :   int arg2 ;
   24377      176516 :   int arg3 ;
   24378      176516 :   int arg4 ;
   24379      176516 :   int arg5 ;
   24380      176516 :   GIntBig arg6 ;
   24381      176516 :   char *arg7 = (char *) 0 ;
   24382      176516 :   int *arg8 = (int *) 0 ;
   24383      176516 :   int *arg9 = (int *) 0 ;
   24384      176516 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   24385      176516 :   int arg11 = (int) 0 ;
   24386      176516 :   int *arg12 = (int *) 0 ;
   24387      176516 :   GIntBig *arg13 = (GIntBig *) 0 ;
   24388      176516 :   GIntBig *arg14 = (GIntBig *) 0 ;
   24389      176516 :   GIntBig *arg15 = (GIntBig *) 0 ;
   24390      176516 :   void *argp1 = 0 ;
   24391      176516 :   int res1 = 0 ;
   24392      176516 :   int val2 ;
   24393      176516 :   int ecode2 = 0 ;
   24394      176516 :   int val3 ;
   24395      176516 :   int ecode3 = 0 ;
   24396      176516 :   int val4 ;
   24397      176516 :   int ecode4 = 0 ;
   24398      176516 :   int val5 ;
   24399      176516 :   int ecode5 = 0 ;
   24400      176516 :   int alloc6 = 0 ;
   24401      176516 :   bool viewIsValid6 = false ;
   24402      176516 :   Py_buffer view6 ;
   24403      176516 :   int val8 ;
   24404      176516 :   int val9 ;
   24405      176516 :   GDALDataType val10 ;
   24406      176516 :   GIntBig val13 ;
   24407      176516 :   GIntBig val14 ;
   24408      176516 :   GIntBig val15 ;
   24409      176516 :   PyObject * obj0 = 0 ;
   24410      176516 :   PyObject * obj1 = 0 ;
   24411      176516 :   PyObject * obj2 = 0 ;
   24412      176516 :   PyObject * obj3 = 0 ;
   24413      176516 :   PyObject * obj4 = 0 ;
   24414      176516 :   PyObject * obj5 = 0 ;
   24415      176516 :   PyObject * obj6 = 0 ;
   24416      176516 :   PyObject * obj7 = 0 ;
   24417      176516 :   PyObject * obj8 = 0 ;
   24418      176516 :   PyObject * obj9 = 0 ;
   24419      176516 :   PyObject * obj10 = 0 ;
   24420      176516 :   PyObject * obj11 = 0 ;
   24421      176516 :   PyObject * obj12 = 0 ;
   24422      176516 :   char * kwnames[] = {
   24423             :     (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 
   24424             :   };
   24425      176516 :   CPLErr result;
   24426             :   
   24427      176516 :   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;
   24428      176516 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24429      176516 :   if (!SWIG_IsOK(res1)) {
   24430           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24431             :   }
   24432      176516 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24433      176516 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24434      176516 :   if (!SWIG_IsOK(ecode2)) {
   24435           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   24436             :   } 
   24437      176516 :   arg2 = static_cast< int >(val2);
   24438      176516 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24439      176516 :   if (!SWIG_IsOK(ecode3)) {
   24440           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   24441             :   } 
   24442      176516 :   arg3 = static_cast< int >(val3);
   24443      176516 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24444      176516 :   if (!SWIG_IsOK(ecode4)) {
   24445           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   24446             :   } 
   24447      176516 :   arg4 = static_cast< int >(val4);
   24448      176516 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24449      176516 :   if (!SWIG_IsOK(ecode5)) {
   24450           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   24451             :   } 
   24452      176516 :   arg5 = static_cast< int >(val5);
   24453      176516 :   {
   24454             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   24455      176516 :     char* ptr = NULL;
   24456      176516 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   24457           1 :       SWIG_fail;
   24458             :     }
   24459      176515 :     arg7 = (char *)ptr;
   24460             :   }
   24461      176515 :   if (obj6) {
   24462      176515 :     {
   24463             :       /* %typemap(in) (int *optional_##int) */
   24464      176515 :       if ( obj6 == Py_None ) {
   24465             :         arg8 = 0;
   24466             :       }
   24467      176515 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   24468             :         arg8 = (int *) &val8;
   24469             :       }
   24470             :       else {
   24471           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24472           0 :         SWIG_fail;
   24473             :       }
   24474             :     }
   24475             :   }
   24476      176515 :   if (obj7) {
   24477      176515 :     {
   24478             :       /* %typemap(in) (int *optional_##int) */
   24479      176515 :       if ( obj7 == Py_None ) {
   24480             :         arg9 = 0;
   24481             :       }
   24482      176515 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   24483             :         arg9 = (int *) &val9;
   24484             :       }
   24485             :       else {
   24486           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24487           0 :         SWIG_fail;
   24488             :       }
   24489             :     }
   24490             :   }
   24491      176515 :   if (obj8) {
   24492      176515 :     {
   24493             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   24494      176515 :       int intval = 0;
   24495      176515 :       if ( obj8 == Py_None ) {
   24496             :         arg10 = NULL;
   24497             :       }
   24498      353030 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   24499      176515 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   24500             :         {
   24501           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24502             :         }
   24503      176515 :         val10 = static_cast<GDALDataType>(intval);
   24504      176515 :         arg10 = &val10;
   24505             :       }
   24506             :       else {
   24507           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24508           0 :         SWIG_fail;
   24509             :       }
   24510             :     }
   24511             :   }
   24512      176515 :   if (obj9) {
   24513      176515 :     {
   24514             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24515      176515 :       arg12 = CreateCIntListFromSequence(obj9, &arg11);
   24516      176515 :       if( arg11 < 0 ) {
   24517           0 :         SWIG_fail;
   24518             :       }
   24519             :     }
   24520             :   }
   24521      176515 :   if (obj10) {
   24522      176515 :     {
   24523             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24524      176515 :       if ( obj10 == Py_None ) {
   24525             :         arg13 = 0;
   24526             :       }
   24527          24 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   24528             :         arg13 = (GIntBig *) &val13;
   24529             :       }
   24530             :       else {
   24531           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24532           0 :         SWIG_fail;
   24533             :       }
   24534             :     }
   24535             :   }
   24536      176515 :   if (obj11) {
   24537      176515 :     {
   24538             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24539      176515 :       if ( obj11 == Py_None ) {
   24540             :         arg14 = 0;
   24541             :       }
   24542          12 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   24543             :         arg14 = (GIntBig *) &val14;
   24544             :       }
   24545             :       else {
   24546           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24547           0 :         SWIG_fail;
   24548             :       }
   24549             :     }
   24550             :   }
   24551      176515 :   if (obj12) {
   24552      176515 :     {
   24553             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24554      176515 :       if ( obj12 == Py_None ) {
   24555             :         arg15 = 0;
   24556             :       }
   24557          24 :       else if ( PyArg_Parse( obj12,"L" ,&val15 ) ) {
   24558             :         arg15 = (GIntBig *) &val15;
   24559             :       }
   24560             :       else {
   24561           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24562           0 :         SWIG_fail;
   24563             :       }
   24564             :     }
   24565             :   }
   24566      176515 :   {
   24567      176515 :     const int bLocalUseExceptions = GetUseExceptions();
   24568      176515 :     if ( bLocalUseExceptions ) {
   24569      172462 :       pushErrorHandler();
   24570             :     }
   24571      176515 :     {
   24572      176515 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24573      176515 :       result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   24574      176515 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24575             :     }
   24576      176515 :     if ( bLocalUseExceptions ) {
   24577      172462 :       popErrorHandler();
   24578             :     }
   24579             : #ifndef SED_HACKS
   24580             :     if ( bLocalUseExceptions ) {
   24581             :       CPLErr eclass = CPLGetLastErrorType();
   24582             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24583             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24584             :       }
   24585             :     }
   24586             : #endif
   24587             :   }
   24588      176515 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24589      176515 :   {
   24590             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24591      176515 :     if( viewIsValid6 ) {
   24592      175505 :       PyBuffer_Release(&view6);
   24593             :     }
   24594        1010 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24595        1010 :       delete[] arg7;
   24596             :     }
   24597             :   }
   24598      176515 :   {
   24599             :     /* %typemap(freearg) (int nList, int* pList) */
   24600      176515 :     free(arg12);
   24601             :   }
   24602      176518 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24603             :   return resultobj;
   24604           1 : fail:
   24605           1 :   {
   24606             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24607           1 :     if( viewIsValid6 ) {
   24608           0 :       PyBuffer_Release(&view6);
   24609             :     }
   24610           1 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24611           0 :       delete[] arg7;
   24612             :     }
   24613             :   }
   24614           1 :   {
   24615             :     /* %typemap(freearg) (int nList, int* pList) */
   24616           1 :     free(arg12);
   24617             :   }
   24618           1 :   return NULL;
   24619             : }
   24620             : 
   24621             : 
   24622           1 : SWIGINTERN PyObject *_wrap_Dataset_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24623           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24624           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24625           1 :   int arg2 ;
   24626           1 :   int arg3 ;
   24627           1 :   int arg4 ;
   24628           1 :   int arg5 ;
   24629           1 :   int *arg6 = (int *) 0 ;
   24630           1 :   int *arg7 = (int *) 0 ;
   24631           1 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   24632           1 :   int arg9 = (int) 0 ;
   24633           1 :   int *arg10 = (int *) 0 ;
   24634           1 :   char **arg11 = (char **) NULL ;
   24635           1 :   void *argp1 = 0 ;
   24636           1 :   int res1 = 0 ;
   24637           1 :   int val2 ;
   24638           1 :   int ecode2 = 0 ;
   24639           1 :   int val3 ;
   24640           1 :   int ecode3 = 0 ;
   24641           1 :   int val4 ;
   24642           1 :   int ecode4 = 0 ;
   24643           1 :   int val5 ;
   24644           1 :   int ecode5 = 0 ;
   24645           1 :   void *argp6 = 0 ;
   24646           1 :   int res6 = 0 ;
   24647           1 :   void *argp7 = 0 ;
   24648           1 :   int res7 = 0 ;
   24649           1 :   int val8 ;
   24650           1 :   PyObject *swig_obj[10] ;
   24651           1 :   CPLErr result;
   24652             :   
   24653           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AdviseRead", 5, 10, swig_obj)) SWIG_fail;
   24654           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24655           1 :   if (!SWIG_IsOK(res1)) {
   24656           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AdviseRead" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24657             :   }
   24658           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24659           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   24660           1 :   if (!SWIG_IsOK(ecode2)) {
   24661           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AdviseRead" "', argument " "2"" of type '" "int""'");
   24662             :   } 
   24663           1 :   arg2 = static_cast< int >(val2);
   24664           1 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   24665           1 :   if (!SWIG_IsOK(ecode3)) {
   24666           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_AdviseRead" "', argument " "3"" of type '" "int""'");
   24667             :   } 
   24668           1 :   arg3 = static_cast< int >(val3);
   24669           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   24670           1 :   if (!SWIG_IsOK(ecode4)) {
   24671           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_AdviseRead" "', argument " "4"" of type '" "int""'");
   24672             :   } 
   24673           1 :   arg4 = static_cast< int >(val4);
   24674           1 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   24675           1 :   if (!SWIG_IsOK(ecode5)) {
   24676           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_AdviseRead" "', argument " "5"" of type '" "int""'");
   24677             :   } 
   24678           1 :   arg5 = static_cast< int >(val5);
   24679           1 :   if (swig_obj[5]) {
   24680           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   24681           0 :     if (!SWIG_IsOK(res6)) {
   24682           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Dataset_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   24683             :     }
   24684           0 :     arg6 = reinterpret_cast< int * >(argp6);
   24685             :   }
   24686           1 :   if (swig_obj[6]) {
   24687           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   24688           0 :     if (!SWIG_IsOK(res7)) {
   24689           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Dataset_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   24690             :     }
   24691           0 :     arg7 = reinterpret_cast< int * >(argp7);
   24692             :   }
   24693           1 :   if (swig_obj[7]) {
   24694           0 :     {
   24695             :       /* %typemap(in) (int *optional_##int) */
   24696           0 :       if ( swig_obj[7] == Py_None ) {
   24697             :         arg8 = 0;
   24698             :       }
   24699           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   24700             :         arg8 = (GDALDataType *) &val8;
   24701             :       }
   24702             :       else {
   24703           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24704           0 :         SWIG_fail;
   24705             :       }
   24706             :     }
   24707             :   }
   24708           1 :   if (swig_obj[8]) {
   24709           0 :     {
   24710             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24711           0 :       arg10 = CreateCIntListFromSequence(swig_obj[8], &arg9);
   24712           0 :       if( arg9 < 0 ) {
   24713           0 :         SWIG_fail;
   24714             :       }
   24715             :     }
   24716             :   }
   24717           1 :   if (swig_obj[9]) {
   24718           0 :     {
   24719             :       /* %typemap(in) char **dict */
   24720           0 :       arg11 = NULL;
   24721           0 :       if ( PySequence_Check( swig_obj[9] ) ) {
   24722           0 :         int bErr = FALSE;
   24723           0 :         arg11 = CSLFromPySequence(swig_obj[9], &bErr);
   24724           0 :         if ( bErr )
   24725             :         {
   24726           0 :           SWIG_fail;
   24727             :         }
   24728             :       }
   24729           0 :       else if ( PyMapping_Check( swig_obj[9] ) ) {
   24730           0 :         int bErr = FALSE;
   24731           0 :         arg11 = CSLFromPyMapping(swig_obj[9], &bErr);
   24732           0 :         if ( bErr )
   24733             :         {
   24734           0 :           SWIG_fail;
   24735             :         }
   24736             :       }
   24737             :       else {
   24738           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24739           0 :         SWIG_fail;
   24740             :       }
   24741             :     }
   24742             :   }
   24743           1 :   {
   24744           1 :     const int bLocalUseExceptions = GetUseExceptions();
   24745           1 :     if ( bLocalUseExceptions ) {
   24746           0 :       pushErrorHandler();
   24747             :     }
   24748           1 :     {
   24749           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24750           1 :       result = (CPLErr)GDALDatasetShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   24751           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24752             :     }
   24753           1 :     if ( bLocalUseExceptions ) {
   24754           0 :       popErrorHandler();
   24755             :     }
   24756             : #ifndef SED_HACKS
   24757             :     if ( bLocalUseExceptions ) {
   24758             :       CPLErr eclass = CPLGetLastErrorType();
   24759             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24760             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24761             :       }
   24762             :     }
   24763             : #endif
   24764             :   }
   24765           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24766           1 :   {
   24767             :     /* %typemap(freearg) (int nList, int* pList) */
   24768           1 :     free(arg10);
   24769             :   }
   24770           1 :   {
   24771             :     /* %typemap(freearg) char **dict */
   24772           1 :     CSLDestroy( arg11 );
   24773             :   }
   24774           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; } }
   24775             :   return resultobj;
   24776           0 : fail:
   24777           0 :   {
   24778             :     /* %typemap(freearg) (int nList, int* pList) */
   24779           0 :     free(arg10);
   24780             :   }
   24781           0 :   {
   24782             :     /* %typemap(freearg) char **dict */
   24783           0 :     CSLDestroy( arg11 );
   24784             :   }
   24785             :   return NULL;
   24786             : }
   24787             : 
   24788             : 
   24789           2 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24790           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24791           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24792           2 :   int arg2 ;
   24793           2 :   int arg3 ;
   24794           2 :   int arg4 ;
   24795           2 :   int arg5 ;
   24796           2 :   size_t arg6 ;
   24797           2 :   char *arg7 = (char *) 0 ;
   24798           2 :   void *arg8 = (void *) 0 ;
   24799           2 :   int arg9 ;
   24800           2 :   int arg10 ;
   24801           2 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   24802           2 :   int arg12 = (int) 0 ;
   24803           2 :   int *arg13 = (int *) 0 ;
   24804           2 :   int arg14 = (int) 0 ;
   24805           2 :   int arg15 = (int) 0 ;
   24806           2 :   int arg16 = (int) 0 ;
   24807           2 :   char **arg17 = (char **) 0 ;
   24808           2 :   void *argp1 = 0 ;
   24809           2 :   int res1 = 0 ;
   24810           2 :   int val2 ;
   24811           2 :   int ecode2 = 0 ;
   24812           2 :   int val3 ;
   24813           2 :   int ecode3 = 0 ;
   24814           2 :   int val4 ;
   24815           2 :   int ecode4 = 0 ;
   24816           2 :   int val5 ;
   24817           2 :   int ecode5 = 0 ;
   24818           2 :   int val9 ;
   24819           2 :   int ecode9 = 0 ;
   24820           2 :   int val10 ;
   24821           2 :   int ecode10 = 0 ;
   24822           2 :   int val14 ;
   24823           2 :   int ecode14 = 0 ;
   24824           2 :   int val15 ;
   24825           2 :   int ecode15 = 0 ;
   24826           2 :   int val16 ;
   24827           2 :   int ecode16 = 0 ;
   24828           2 :   PyObject * obj0 = 0 ;
   24829           2 :   PyObject * obj1 = 0 ;
   24830           2 :   PyObject * obj2 = 0 ;
   24831           2 :   PyObject * obj3 = 0 ;
   24832           2 :   PyObject * obj4 = 0 ;
   24833           2 :   PyObject * obj5 = 0 ;
   24834           2 :   PyObject * obj6 = 0 ;
   24835           2 :   PyObject * obj7 = 0 ;
   24836           2 :   PyObject * obj8 = 0 ;
   24837           2 :   PyObject * obj9 = 0 ;
   24838           2 :   PyObject * obj10 = 0 ;
   24839           2 :   PyObject * obj11 = 0 ;
   24840           2 :   PyObject * obj12 = 0 ;
   24841           2 :   PyObject * obj13 = 0 ;
   24842           2 :   char * kwnames[] = {
   24843             :     (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 
   24844             :   };
   24845           2 :   GDALAsyncReaderShadow *result = 0 ;
   24846             :   
   24847           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;
   24848           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24849           2 :   if (!SWIG_IsOK(res1)) {
   24850           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24851             :   }
   24852           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24853           2 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24854           2 :   if (!SWIG_IsOK(ecode2)) {
   24855           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   24856             :   } 
   24857           2 :   arg2 = static_cast< int >(val2);
   24858           2 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24859           2 :   if (!SWIG_IsOK(ecode3)) {
   24860           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   24861             :   } 
   24862           2 :   arg3 = static_cast< int >(val3);
   24863           2 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24864           2 :   if (!SWIG_IsOK(ecode4)) {
   24865           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   24866             :   } 
   24867           2 :   arg4 = static_cast< int >(val4);
   24868           2 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24869           2 :   if (!SWIG_IsOK(ecode5)) {
   24870           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   24871             :   } 
   24872           2 :   arg5 = static_cast< int >(val5);
   24873           2 :   {
   24874             :     /* %typemap(in,numinputs=1) (size_t nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   24875           2 :     if (PyBytes_Check(obj5))
   24876             :     {
   24877           2 :       Py_ssize_t safeLen = 0;
   24878           2 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   24879           2 :       arg6 = safeLen;
   24880           2 :       arg8 = obj5;
   24881             :     }
   24882             :     else
   24883             :     {
   24884           0 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   24885           0 :       SWIG_fail;
   24886             :     }
   24887             :   }
   24888           2 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   24889           2 :   if (!SWIG_IsOK(ecode9)) {
   24890           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   24891             :   } 
   24892           2 :   arg9 = static_cast< int >(val9);
   24893           2 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   24894           2 :   if (!SWIG_IsOK(ecode10)) {
   24895           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   24896             :   } 
   24897           2 :   arg10 = static_cast< int >(val10);
   24898           2 :   if (obj8) {
   24899           2 :     {
   24900             :       // %typemap(in) GDALDataType
   24901           2 :       int val = 0;
   24902           2 :       int ecode = SWIG_AsVal_int(obj8, &val);
   24903           2 :       if (!SWIG_IsOK(ecode)) {
   24904           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24905             :       }
   24906           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   24907             :       {
   24908           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24909             :       }
   24910             :       arg11 = static_cast<GDALDataType>(val);
   24911             :     }
   24912             :   }
   24913           2 :   if (obj9) {
   24914           2 :     {
   24915             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24916           2 :       arg13 = CreateCIntListFromSequence(obj9, &arg12);
   24917           2 :       if( arg12 < 0 ) {
   24918           0 :         SWIG_fail;
   24919             :       }
   24920             :     }
   24921             :   }
   24922           2 :   if (obj10) {
   24923           2 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   24924           2 :     if (!SWIG_IsOK(ecode14)) {
   24925           0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   24926             :     } 
   24927             :     arg14 = static_cast< int >(val14);
   24928             :   }
   24929           2 :   if (obj11) {
   24930           2 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   24931           2 :     if (!SWIG_IsOK(ecode15)) {
   24932           0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   24933             :     } 
   24934             :     arg15 = static_cast< int >(val15);
   24935             :   }
   24936           2 :   if (obj12) {
   24937           2 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   24938           2 :     if (!SWIG_IsOK(ecode16)) {
   24939           0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   24940             :     } 
   24941             :     arg16 = static_cast< int >(val16);
   24942             :   }
   24943           2 :   if (obj13) {
   24944           2 :     {
   24945             :       /* %typemap(in) char **dict */
   24946           2 :       arg17 = NULL;
   24947           2 :       if ( PySequence_Check( obj13 ) ) {
   24948           2 :         int bErr = FALSE;
   24949           2 :         arg17 = CSLFromPySequence(obj13, &bErr);
   24950           2 :         if ( bErr )
   24951             :         {
   24952           0 :           SWIG_fail;
   24953             :         }
   24954             :       }
   24955           0 :       else if ( PyMapping_Check( obj13 ) ) {
   24956           0 :         int bErr = FALSE;
   24957           0 :         arg17 = CSLFromPyMapping(obj13, &bErr);
   24958           0 :         if ( bErr )
   24959             :         {
   24960           0 :           SWIG_fail;
   24961             :         }
   24962             :       }
   24963             :       else {
   24964           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24965           0 :         SWIG_fail;
   24966             :       }
   24967             :     }
   24968             :   }
   24969           2 :   {
   24970           2 :     const int bLocalUseExceptions = GetUseExceptions();
   24971           2 :     if ( bLocalUseExceptions ) {
   24972           2 :       pushErrorHandler();
   24973             :     }
   24974           2 :     {
   24975           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24976           2 :       result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   24977           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24978             :     }
   24979           2 :     if ( bLocalUseExceptions ) {
   24980           2 :       popErrorHandler();
   24981             :     }
   24982             : #ifndef SED_HACKS
   24983             :     if ( bLocalUseExceptions ) {
   24984             :       CPLErr eclass = CPLGetLastErrorType();
   24985             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24986             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24987             :       }
   24988             :     }
   24989             : #endif
   24990             :   }
   24991           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   24992           2 :   {
   24993             :     /* %typemap(freearg) (int nList, int* pList) */
   24994           2 :     free(arg13);
   24995             :   }
   24996           2 :   {
   24997             :     /* %typemap(freearg) char **dict */
   24998           2 :     CSLDestroy( arg17 );
   24999             :   }
   25000           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; } }
   25001             :   return resultobj;
   25002           0 : fail:
   25003           0 :   {
   25004             :     /* %typemap(freearg) (int nList, int* pList) */
   25005           0 :     free(arg13);
   25006             :   }
   25007           0 :   {
   25008             :     /* %typemap(freearg) char **dict */
   25009           0 :     CSLDestroy( arg17 );
   25010             :   }
   25011             :   return NULL;
   25012             : }
   25013             : 
   25014             : 
   25015           1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25016           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25017           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25018           1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   25019           1 :   void *argp1 = 0 ;
   25020           1 :   int res1 = 0 ;
   25021           1 :   void *argp2 = 0 ;
   25022           1 :   int res2 = 0 ;
   25023           1 :   PyObject *swig_obj[2] ;
   25024             :   
   25025           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_EndAsyncReader", 2, 2, swig_obj)) SWIG_fail;
   25026           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25027           1 :   if (!SWIG_IsOK(res1)) {
   25028           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25029             :   }
   25030           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25031           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   25032           1 :   if (!SWIG_IsOK(res2)) {
   25033           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   25034             :   }
   25035           1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   25036           1 :   {
   25037           1 :     const int bLocalUseExceptions = GetUseExceptions();
   25038           1 :     if ( bLocalUseExceptions ) {
   25039           1 :       pushErrorHandler();
   25040             :     }
   25041           1 :     {
   25042           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25043           1 :       GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   25044           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25045             :     }
   25046           1 :     if ( bLocalUseExceptions ) {
   25047           1 :       popErrorHandler();
   25048             :     }
   25049             : #ifndef SED_HACKS
   25050             :     if ( bLocalUseExceptions ) {
   25051             :       CPLErr eclass = CPLGetLastErrorType();
   25052             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25053             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25054             :       }
   25055             :     }
   25056             : #endif
   25057             :   }
   25058           1 :   resultobj = SWIG_Py_Void();
   25059           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; } }
   25060             :   return resultobj;
   25061             : fail:
   25062             :   return NULL;
   25063             : }
   25064             : 
   25065             : 
   25066           3 : SWIGINTERN PyObject *_wrap_Dataset_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25067           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25068           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25069           3 :   GDALRWFlag arg2 ;
   25070           3 :   int arg3 ;
   25071           3 :   int arg4 ;
   25072           3 :   int arg5 ;
   25073           3 :   int arg6 ;
   25074           3 :   int arg7 ;
   25075           3 :   int arg8 ;
   25076           3 :   GDALDataType arg9 ;
   25077           3 :   int arg10 ;
   25078           3 :   int *arg11 = (int *) 0 ;
   25079           3 :   int arg12 ;
   25080           3 :   size_t arg13 ;
   25081           3 :   size_t arg14 ;
   25082           3 :   char **arg15 = (char **) NULL ;
   25083           3 :   void *argp1 = 0 ;
   25084           3 :   int res1 = 0 ;
   25085           3 :   int val2 ;
   25086           3 :   int ecode2 = 0 ;
   25087           3 :   int val3 ;
   25088           3 :   int ecode3 = 0 ;
   25089           3 :   int val4 ;
   25090           3 :   int ecode4 = 0 ;
   25091           3 :   int val5 ;
   25092           3 :   int ecode5 = 0 ;
   25093           3 :   int val6 ;
   25094           3 :   int ecode6 = 0 ;
   25095           3 :   int val7 ;
   25096           3 :   int ecode7 = 0 ;
   25097           3 :   int val8 ;
   25098           3 :   int ecode8 = 0 ;
   25099           3 :   int val12 ;
   25100           3 :   int ecode12 = 0 ;
   25101           3 :   size_t val13 ;
   25102           3 :   int ecode13 = 0 ;
   25103           3 :   size_t val14 ;
   25104           3 :   int ecode14 = 0 ;
   25105           3 :   PyObject * obj0 = 0 ;
   25106           3 :   PyObject * obj1 = 0 ;
   25107           3 :   PyObject * obj2 = 0 ;
   25108           3 :   PyObject * obj3 = 0 ;
   25109           3 :   PyObject * obj4 = 0 ;
   25110           3 :   PyObject * obj5 = 0 ;
   25111           3 :   PyObject * obj6 = 0 ;
   25112           3 :   PyObject * obj7 = 0 ;
   25113           3 :   PyObject * obj8 = 0 ;
   25114           3 :   PyObject * obj9 = 0 ;
   25115           3 :   PyObject * obj10 = 0 ;
   25116           3 :   PyObject * obj11 = 0 ;
   25117           3 :   PyObject * obj12 = 0 ;
   25118           3 :   PyObject * obj13 = 0 ;
   25119           3 :   char * kwnames[] = {
   25120             :     (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 
   25121             :   };
   25122           3 :   CPLVirtualMemShadow *result = 0 ;
   25123             :   
   25124           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;
   25125           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25126           3 :   if (!SWIG_IsOK(res1)) {
   25127           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25128             :   }
   25129           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25130           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   25131           3 :   if (!SWIG_IsOK(ecode2)) {
   25132           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   25133             :   } 
   25134           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   25135           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   25136           3 :   if (!SWIG_IsOK(ecode3)) {
   25137           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   25138             :   } 
   25139           3 :   arg3 = static_cast< int >(val3);
   25140           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   25141           3 :   if (!SWIG_IsOK(ecode4)) {
   25142           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   25143             :   } 
   25144           3 :   arg4 = static_cast< int >(val4);
   25145           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   25146           3 :   if (!SWIG_IsOK(ecode5)) {
   25147           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   25148             :   } 
   25149           3 :   arg5 = static_cast< int >(val5);
   25150           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   25151           3 :   if (!SWIG_IsOK(ecode6)) {
   25152           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   25153             :   } 
   25154           3 :   arg6 = static_cast< int >(val6);
   25155           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   25156           3 :   if (!SWIG_IsOK(ecode7)) {
   25157           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   25158             :   } 
   25159           3 :   arg7 = static_cast< int >(val7);
   25160           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   25161           3 :   if (!SWIG_IsOK(ecode8)) {
   25162           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   25163             :   } 
   25164           3 :   arg8 = static_cast< int >(val8);
   25165           3 :   {
   25166             :     // %typemap(in) GDALDataType
   25167           3 :     int val = 0;
   25168           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   25169           3 :     if (!SWIG_IsOK(ecode)) {
   25170           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   25171             :     }
   25172           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   25173             :     {
   25174           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   25175             :     }
   25176           3 :     arg9 = static_cast<GDALDataType>(val);
   25177             :   }
   25178           3 :   {
   25179             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   25180           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   25181           3 :     if( arg10 < 0 ) {
   25182           0 :       SWIG_fail;
   25183             :     }
   25184             :   }
   25185           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   25186           3 :   if (!SWIG_IsOK(ecode12)) {
   25187           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetVirtualMem" "', argument " "12"" of type '" "int""'");
   25188             :   } 
   25189           3 :   arg12 = static_cast< int >(val12);
   25190           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   25191           3 :   if (!SWIG_IsOK(ecode13)) {
   25192           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetVirtualMem" "', argument " "13"" of type '" "size_t""'");
   25193             :   } 
   25194           3 :   arg13 = static_cast< size_t >(val13);
   25195           3 :   ecode14 = SWIG_AsVal_size_t(obj12, &val14);
   25196           3 :   if (!SWIG_IsOK(ecode14)) {
   25197           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_GetVirtualMem" "', argument " "14"" of type '" "size_t""'");
   25198             :   } 
   25199           3 :   arg14 = static_cast< size_t >(val14);
   25200           3 :   if (obj13) {
   25201           0 :     {
   25202             :       /* %typemap(in) char **dict */
   25203           0 :       arg15 = NULL;
   25204           0 :       if ( PySequence_Check( obj13 ) ) {
   25205           0 :         int bErr = FALSE;
   25206           0 :         arg15 = CSLFromPySequence(obj13, &bErr);
   25207           0 :         if ( bErr )
   25208             :         {
   25209           0 :           SWIG_fail;
   25210             :         }
   25211             :       }
   25212           0 :       else if ( PyMapping_Check( obj13 ) ) {
   25213           0 :         int bErr = FALSE;
   25214           0 :         arg15 = CSLFromPyMapping(obj13, &bErr);
   25215           0 :         if ( bErr )
   25216             :         {
   25217           0 :           SWIG_fail;
   25218             :         }
   25219             :       }
   25220             :       else {
   25221           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25222           0 :         SWIG_fail;
   25223             :       }
   25224             :     }
   25225             :   }
   25226           3 :   {
   25227           3 :     const int bLocalUseExceptions = GetUseExceptions();
   25228           3 :     if ( bLocalUseExceptions ) {
   25229           3 :       pushErrorHandler();
   25230             :     }
   25231           3 :     {
   25232           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25233           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   25234           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25235             :     }
   25236           3 :     if ( bLocalUseExceptions ) {
   25237           3 :       popErrorHandler();
   25238             :     }
   25239             : #ifndef SED_HACKS
   25240             :     if ( bLocalUseExceptions ) {
   25241             :       CPLErr eclass = CPLGetLastErrorType();
   25242             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25243             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25244             :       }
   25245             :     }
   25246             : #endif
   25247             :   }
   25248           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   25249           3 :   {
   25250             :     /* %typemap(freearg) (int nList, int* pList) */
   25251           3 :     free(arg11);
   25252             :   }
   25253           3 :   {
   25254             :     /* %typemap(freearg) char **dict */
   25255           3 :     CSLDestroy( arg15 );
   25256             :   }
   25257           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; } }
   25258             :   return resultobj;
   25259           0 : fail:
   25260           0 :   {
   25261             :     /* %typemap(freearg) (int nList, int* pList) */
   25262           0 :     free(arg11);
   25263             :   }
   25264           0 :   {
   25265             :     /* %typemap(freearg) char **dict */
   25266           0 :     CSLDestroy( arg15 );
   25267             :   }
   25268             :   return NULL;
   25269             : }
   25270             : 
   25271             : 
   25272           3 : SWIGINTERN PyObject *_wrap_Dataset_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25273           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25274           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25275           3 :   GDALRWFlag arg2 ;
   25276           3 :   int arg3 ;
   25277           3 :   int arg4 ;
   25278           3 :   int arg5 ;
   25279           3 :   int arg6 ;
   25280           3 :   int arg7 ;
   25281           3 :   int arg8 ;
   25282           3 :   GDALDataType arg9 ;
   25283           3 :   int arg10 ;
   25284           3 :   int *arg11 = (int *) 0 ;
   25285           3 :   GDALTileOrganization arg12 ;
   25286           3 :   size_t arg13 ;
   25287           3 :   char **arg14 = (char **) NULL ;
   25288           3 :   void *argp1 = 0 ;
   25289           3 :   int res1 = 0 ;
   25290           3 :   int val2 ;
   25291           3 :   int ecode2 = 0 ;
   25292           3 :   int val3 ;
   25293           3 :   int ecode3 = 0 ;
   25294           3 :   int val4 ;
   25295           3 :   int ecode4 = 0 ;
   25296           3 :   int val5 ;
   25297           3 :   int ecode5 = 0 ;
   25298           3 :   int val6 ;
   25299           3 :   int ecode6 = 0 ;
   25300           3 :   int val7 ;
   25301           3 :   int ecode7 = 0 ;
   25302           3 :   int val8 ;
   25303           3 :   int ecode8 = 0 ;
   25304           3 :   int val12 ;
   25305           3 :   int ecode12 = 0 ;
   25306           3 :   size_t val13 ;
   25307           3 :   int ecode13 = 0 ;
   25308           3 :   PyObject * obj0 = 0 ;
   25309           3 :   PyObject * obj1 = 0 ;
   25310           3 :   PyObject * obj2 = 0 ;
   25311           3 :   PyObject * obj3 = 0 ;
   25312           3 :   PyObject * obj4 = 0 ;
   25313           3 :   PyObject * obj5 = 0 ;
   25314           3 :   PyObject * obj6 = 0 ;
   25315           3 :   PyObject * obj7 = 0 ;
   25316           3 :   PyObject * obj8 = 0 ;
   25317           3 :   PyObject * obj9 = 0 ;
   25318           3 :   PyObject * obj10 = 0 ;
   25319           3 :   PyObject * obj11 = 0 ;
   25320           3 :   PyObject * obj12 = 0 ;
   25321           3 :   char * kwnames[] = {
   25322             :     (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 
   25323             :   };
   25324           3 :   CPLVirtualMemShadow *result = 0 ;
   25325             :   
   25326           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;
   25327           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25328           3 :   if (!SWIG_IsOK(res1)) {
   25329           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25330             :   }
   25331           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25332           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   25333           3 :   if (!SWIG_IsOK(ecode2)) {
   25334           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   25335             :   } 
   25336           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   25337           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   25338           3 :   if (!SWIG_IsOK(ecode3)) {
   25339           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   25340             :   } 
   25341           3 :   arg3 = static_cast< int >(val3);
   25342           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   25343           3 :   if (!SWIG_IsOK(ecode4)) {
   25344           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   25345             :   } 
   25346           3 :   arg4 = static_cast< int >(val4);
   25347           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   25348           3 :   if (!SWIG_IsOK(ecode5)) {
   25349           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   25350             :   } 
   25351           3 :   arg5 = static_cast< int >(val5);
   25352           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   25353           3 :   if (!SWIG_IsOK(ecode6)) {
   25354           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   25355             :   } 
   25356           3 :   arg6 = static_cast< int >(val6);
   25357           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   25358           3 :   if (!SWIG_IsOK(ecode7)) {
   25359           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   25360             :   } 
   25361           3 :   arg7 = static_cast< int >(val7);
   25362           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   25363           3 :   if (!SWIG_IsOK(ecode8)) {
   25364           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   25365             :   } 
   25366           3 :   arg8 = static_cast< int >(val8);
   25367           3 :   {
   25368             :     // %typemap(in) GDALDataType
   25369           3 :     int val = 0;
   25370           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   25371           3 :     if (!SWIG_IsOK(ecode)) {
   25372           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   25373             :     }
   25374           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   25375             :     {
   25376           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   25377             :     }
   25378           3 :     arg9 = static_cast<GDALDataType>(val);
   25379             :   }
   25380           3 :   {
   25381             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   25382           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   25383           3 :     if( arg10 < 0 ) {
   25384           0 :       SWIG_fail;
   25385             :     }
   25386             :   }
   25387           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   25388           3 :   if (!SWIG_IsOK(ecode12)) {
   25389           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "12"" of type '" "GDALTileOrganization""'");
   25390             :   } 
   25391           3 :   arg12 = static_cast< GDALTileOrganization >(val12);
   25392           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   25393           3 :   if (!SWIG_IsOK(ecode13)) {
   25394           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "13"" of type '" "size_t""'");
   25395             :   } 
   25396           3 :   arg13 = static_cast< size_t >(val13);
   25397           3 :   if (obj12) {
   25398           0 :     {
   25399             :       /* %typemap(in) char **dict */
   25400           0 :       arg14 = NULL;
   25401           0 :       if ( PySequence_Check( obj12 ) ) {
   25402           0 :         int bErr = FALSE;
   25403           0 :         arg14 = CSLFromPySequence(obj12, &bErr);
   25404           0 :         if ( bErr )
   25405             :         {
   25406           0 :           SWIG_fail;
   25407             :         }
   25408             :       }
   25409           0 :       else if ( PyMapping_Check( obj12 ) ) {
   25410           0 :         int bErr = FALSE;
   25411           0 :         arg14 = CSLFromPyMapping(obj12, &bErr);
   25412           0 :         if ( bErr )
   25413             :         {
   25414           0 :           SWIG_fail;
   25415             :         }
   25416             :       }
   25417             :       else {
   25418           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25419           0 :         SWIG_fail;
   25420             :       }
   25421             :     }
   25422             :   }
   25423           3 :   {
   25424           3 :     const int bLocalUseExceptions = GetUseExceptions();
   25425           3 :     if ( bLocalUseExceptions ) {
   25426           3 :       pushErrorHandler();
   25427             :     }
   25428           3 :     {
   25429           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25430           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   25431           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25432             :     }
   25433           3 :     if ( bLocalUseExceptions ) {
   25434           3 :       popErrorHandler();
   25435             :     }
   25436             : #ifndef SED_HACKS
   25437             :     if ( bLocalUseExceptions ) {
   25438             :       CPLErr eclass = CPLGetLastErrorType();
   25439             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25440             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25441             :       }
   25442             :     }
   25443             : #endif
   25444             :   }
   25445           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   25446           3 :   {
   25447             :     /* %typemap(freearg) (int nList, int* pList) */
   25448           3 :     free(arg11);
   25449             :   }
   25450           3 :   {
   25451             :     /* %typemap(freearg) char **dict */
   25452           3 :     CSLDestroy( arg14 );
   25453             :   }
   25454           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; } }
   25455             :   return resultobj;
   25456           0 : fail:
   25457           0 :   {
   25458             :     /* %typemap(freearg) (int nList, int* pList) */
   25459           0 :     free(arg11);
   25460             :   }
   25461           0 :   {
   25462             :     /* %typemap(freearg) char **dict */
   25463           0 :     CSLDestroy( arg14 );
   25464             :   }
   25465             :   return NULL;
   25466             : }
   25467             : 
   25468             : 
   25469        6096 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25470        6096 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25471        6096 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25472        6096 :   char *arg2 = (char *) 0 ;
   25473        6096 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
   25474        6096 :   OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
   25475        6096 :   char **arg5 = (char **) 0 ;
   25476        6096 :   void *argp1 = 0 ;
   25477        6096 :   int res1 = 0 ;
   25478        6096 :   int res2 ;
   25479        6096 :   char *buf2 = 0 ;
   25480        6096 :   int alloc2 = 0 ;
   25481        6096 :   void *argp3 = 0 ;
   25482        6096 :   int res3 = 0 ;
   25483        6096 :   int val4 ;
   25484        6096 :   int ecode4 = 0 ;
   25485        6096 :   PyObject * obj0 = 0 ;
   25486        6096 :   PyObject * obj1 = 0 ;
   25487        6096 :   PyObject * obj2 = 0 ;
   25488        6096 :   PyObject * obj3 = 0 ;
   25489        6096 :   PyObject * obj4 = 0 ;
   25490        6096 :   char * kwnames[] = {
   25491             :     (char *)"self",  (char *)"name",  (char *)"srs",  (char *)"geom_type",  (char *)"options",  NULL 
   25492             :   };
   25493        6096 :   OGRLayerShadow *result = 0 ;
   25494             :   
   25495        6096 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Dataset_CreateLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25496        6096 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25497        6096 :   if (!SWIG_IsOK(res1)) {
   25498           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25499             :   }
   25500        6096 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25501        6096 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   25502        6096 :   if (!SWIG_IsOK(res2)) {
   25503           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayer" "', argument " "2"" of type '" "char const *""'");
   25504             :   }
   25505        6096 :   arg2 = reinterpret_cast< char * >(buf2);
   25506        6096 :   if (obj2) {
   25507        1225 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   25508        1225 :     if (!SWIG_IsOK(res3)) {
   25509           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
   25510             :     }
   25511        1225 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
   25512             :   }
   25513        6096 :   if (obj3) {
   25514        1819 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   25515        1819 :     if (!SWIG_IsOK(ecode4)) {
   25516           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
   25517             :     } 
   25518        1819 :     arg4 = static_cast< OGRwkbGeometryType >(val4);
   25519             :   }
   25520        6096 :   if (obj4) {
   25521        1227 :     {
   25522             :       /* %typemap(in) char **dict */
   25523        1227 :       arg5 = NULL;
   25524        1227 :       if ( PySequence_Check( obj4 ) ) {
   25525        1195 :         int bErr = FALSE;
   25526        1195 :         arg5 = CSLFromPySequence(obj4, &bErr);
   25527        1195 :         if ( bErr )
   25528             :         {
   25529           0 :           SWIG_fail;
   25530             :         }
   25531             :       }
   25532          32 :       else if ( PyMapping_Check( obj4 ) ) {
   25533          32 :         int bErr = FALSE;
   25534          32 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   25535          32 :         if ( bErr )
   25536             :         {
   25537           0 :           SWIG_fail;
   25538             :         }
   25539             :       }
   25540             :       else {
   25541           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25542           0 :         SWIG_fail;
   25543             :       }
   25544             :     }
   25545             :   }
   25546        6096 :   {
   25547        6096 :     const int bLocalUseExceptions = GetUseExceptions();
   25548        6096 :     if ( bLocalUseExceptions ) {
   25549        2035 :       pushErrorHandler();
   25550             :     }
   25551        6096 :     {
   25552        6096 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25553        6096 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
   25554        6096 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25555             :     }
   25556        6096 :     if ( bLocalUseExceptions ) {
   25557        2035 :       popErrorHandler();
   25558             :     }
   25559             : #ifndef SED_HACKS
   25560             :     if ( bLocalUseExceptions ) {
   25561             :       CPLErr eclass = CPLGetLastErrorType();
   25562             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25563             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25564             :       }
   25565             :     }
   25566             : #endif
   25567             :   }
   25568        6096 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25569        6096 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25570        6096 :   {
   25571             :     /* %typemap(freearg) char **dict */
   25572        6096 :     CSLDestroy( arg5 );
   25573             :   }
   25574        6156 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25575             :   return resultobj;
   25576           0 : fail:
   25577           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25578           0 :   {
   25579             :     /* %typemap(freearg) char **dict */
   25580           0 :     CSLDestroy( arg5 );
   25581             :   }
   25582             :   return NULL;
   25583             : }
   25584             : 
   25585             : 
   25586          14 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayerFromGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25587          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25588          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25589          14 :   char *arg2 = (char *) 0 ;
   25590          14 :   OGRGeomFieldDefnShadow *arg3 = (OGRGeomFieldDefnShadow *) 0 ;
   25591          14 :   char **arg4 = (char **) 0 ;
   25592          14 :   void *argp1 = 0 ;
   25593          14 :   int res1 = 0 ;
   25594          14 :   int res2 ;
   25595          14 :   char *buf2 = 0 ;
   25596          14 :   int alloc2 = 0 ;
   25597          14 :   void *argp3 = 0 ;
   25598          14 :   int res3 = 0 ;
   25599          14 :   PyObject *swig_obj[4] ;
   25600          14 :   OGRLayerShadow *result = 0 ;
   25601             :   
   25602          14 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateLayerFromGeomFieldDefn", 3, 4, swig_obj)) SWIG_fail;
   25603          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25604          14 :   if (!SWIG_IsOK(res1)) {
   25605           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25606             :   }
   25607          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25608          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   25609          14 :   if (!SWIG_IsOK(res2)) {
   25610           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "2"" of type '" "char const *""'");
   25611             :   }
   25612          14 :   arg2 = reinterpret_cast< char * >(buf2);
   25613          14 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
   25614          14 :   if (!SWIG_IsOK(res3)) {
   25615           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow *""'"); 
   25616             :   }
   25617          14 :   arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
   25618          14 :   if (swig_obj[3]) {
   25619           7 :     {
   25620             :       /* %typemap(in) char **dict */
   25621           7 :       arg4 = NULL;
   25622           7 :       if ( PySequence_Check( swig_obj[3] ) ) {
   25623           7 :         int bErr = FALSE;
   25624           7 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   25625           7 :         if ( bErr )
   25626             :         {
   25627           0 :           SWIG_fail;
   25628             :         }
   25629             :       }
   25630           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   25631           0 :         int bErr = FALSE;
   25632           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   25633           0 :         if ( bErr )
   25634             :         {
   25635           0 :           SWIG_fail;
   25636             :         }
   25637             :       }
   25638             :       else {
   25639           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25640           0 :         SWIG_fail;
   25641             :       }
   25642             :     }
   25643             :   }
   25644          14 :   {
   25645          14 :     const int bLocalUseExceptions = GetUseExceptions();
   25646          14 :     if ( bLocalUseExceptions ) {
   25647           9 :       pushErrorHandler();
   25648             :     }
   25649          14 :     {
   25650          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25651          14 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayerFromGeomFieldDefn(arg1,(char const *)arg2,arg3,arg4);
   25652          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25653             :     }
   25654          14 :     if ( bLocalUseExceptions ) {
   25655           9 :       popErrorHandler();
   25656             :     }
   25657             : #ifndef SED_HACKS
   25658             :     if ( bLocalUseExceptions ) {
   25659             :       CPLErr eclass = CPLGetLastErrorType();
   25660             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25661             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25662             :       }
   25663             :     }
   25664             : #endif
   25665             :   }
   25666          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25667          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25668          14 :   {
   25669             :     /* %typemap(freearg) char **dict */
   25670          14 :     CSLDestroy( arg4 );
   25671             :   }
   25672          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; } }
   25673             :   return resultobj;
   25674           0 : fail:
   25675           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25676           0 :   {
   25677             :     /* %typemap(freearg) char **dict */
   25678           0 :     CSLDestroy( arg4 );
   25679             :   }
   25680             :   return NULL;
   25681             : }
   25682             : 
   25683             : 
   25684          18 : SWIGINTERN PyObject *_wrap_Dataset_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25685          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25686          18 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25687          18 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   25688          18 :   char *arg3 = (char *) 0 ;
   25689          18 :   char **arg4 = (char **) 0 ;
   25690          18 :   void *argp1 = 0 ;
   25691          18 :   int res1 = 0 ;
   25692          18 :   void *argp2 = 0 ;
   25693          18 :   int res2 = 0 ;
   25694          18 :   int res3 ;
   25695          18 :   char *buf3 = 0 ;
   25696          18 :   int alloc3 = 0 ;
   25697          18 :   PyObject * obj0 = 0 ;
   25698          18 :   PyObject * obj1 = 0 ;
   25699          18 :   PyObject * obj2 = 0 ;
   25700          18 :   PyObject * obj3 = 0 ;
   25701          18 :   char * kwnames[] = {
   25702             :     (char *)"self",  (char *)"src_layer",  (char *)"new_name",  (char *)"options",  NULL 
   25703             :   };
   25704          18 :   OGRLayerShadow *result = 0 ;
   25705             :   
   25706          18 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Dataset_CopyLayer", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   25707          18 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25708          18 :   if (!SWIG_IsOK(res1)) {
   25709           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CopyLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25710             :   }
   25711          18 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25712          18 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25713          18 :   if (!SWIG_IsOK(res2)) {
   25714           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   25715             :   }
   25716          18 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   25717          18 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   25718          18 :   if (!SWIG_IsOK(res3)) {
   25719           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CopyLayer" "', argument " "3"" of type '" "char const *""'");
   25720             :   }
   25721          18 :   arg3 = reinterpret_cast< char * >(buf3);
   25722          18 :   if (obj3) {
   25723           4 :     {
   25724             :       /* %typemap(in) char **dict */
   25725           4 :       arg4 = NULL;
   25726           4 :       if ( PySequence_Check( obj3 ) ) {
   25727           4 :         int bErr = FALSE;
   25728           4 :         arg4 = CSLFromPySequence(obj3, &bErr);
   25729           4 :         if ( bErr )
   25730             :         {
   25731           0 :           SWIG_fail;
   25732             :         }
   25733             :       }
   25734           0 :       else if ( PyMapping_Check( obj3 ) ) {
   25735           0 :         int bErr = FALSE;
   25736           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   25737           0 :         if ( bErr )
   25738             :         {
   25739           0 :           SWIG_fail;
   25740             :         }
   25741             :       }
   25742             :       else {
   25743           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25744           0 :         SWIG_fail;
   25745             :       }
   25746             :     }
   25747             :   }
   25748          18 :   {
   25749          18 :     if (!arg2) {
   25750           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   25751             :     }
   25752             :   }
   25753          18 :   {
   25754          18 :     const int bLocalUseExceptions = GetUseExceptions();
   25755          18 :     if ( bLocalUseExceptions ) {
   25756          14 :       pushErrorHandler();
   25757             :     }
   25758          18 :     {
   25759          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25760          18 :       result = (OGRLayerShadow *)GDALDatasetShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
   25761          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25762             :     }
   25763          18 :     if ( bLocalUseExceptions ) {
   25764          14 :       popErrorHandler();
   25765             :     }
   25766             : #ifndef SED_HACKS
   25767             :     if ( bLocalUseExceptions ) {
   25768             :       CPLErr eclass = CPLGetLastErrorType();
   25769             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25770             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25771             :       }
   25772             :     }
   25773             : #endif
   25774             :   }
   25775          18 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25776          18 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25777          18 :   {
   25778             :     /* %typemap(freearg) char **dict */
   25779          18 :     CSLDestroy( arg4 );
   25780             :   }
   25781          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; } }
   25782             :   return resultobj;
   25783           0 : fail:
   25784           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25785           0 :   {
   25786             :     /* %typemap(freearg) char **dict */
   25787           0 :     CSLDestroy( arg4 );
   25788             :   }
   25789             :   return NULL;
   25790             : }
   25791             : 
   25792             : 
   25793          41 : SWIGINTERN PyObject *_wrap_Dataset_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25794          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25795          41 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25796          41 :   int arg2 ;
   25797          41 :   void *argp1 = 0 ;
   25798          41 :   int res1 = 0 ;
   25799          41 :   int val2 ;
   25800          41 :   int ecode2 = 0 ;
   25801          41 :   PyObject *swig_obj[2] ;
   25802          41 :   OGRErr result;
   25803             :   
   25804          41 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteLayer", 2, 2, swig_obj)) SWIG_fail;
   25805          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25806          41 :   if (!SWIG_IsOK(res1)) {
   25807           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25808             :   }
   25809          41 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25810          41 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25811          41 :   if (!SWIG_IsOK(ecode2)) {
   25812           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_DeleteLayer" "', argument " "2"" of type '" "int""'");
   25813             :   } 
   25814          41 :   arg2 = static_cast< int >(val2);
   25815          41 :   {
   25816          41 :     const int bLocalUseExceptions = GetUseExceptions();
   25817          41 :     if ( bLocalUseExceptions ) {
   25818           7 :       pushErrorHandler();
   25819             :     }
   25820          41 :     {
   25821          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25822          41 :       result = (OGRErr)GDALDatasetShadow_DeleteLayer(arg1,arg2);
   25823          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25824             :     }
   25825          41 :     if ( bLocalUseExceptions ) {
   25826           7 :       popErrorHandler();
   25827             :     }
   25828             : #ifndef SED_HACKS
   25829             :     if ( bLocalUseExceptions ) {
   25830             :       CPLErr eclass = CPLGetLastErrorType();
   25831             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25832             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25833             :       }
   25834             :     }
   25835             : #endif
   25836             :   }
   25837          41 :   {
   25838             :     /* %typemap(out) OGRErr */
   25839          59 :     if ( result != 0 && GetUseExceptions()) {
   25840           2 :       const char* pszMessage = CPLGetLastErrorMsg();
   25841           2 :       if( pszMessage[0] != '\0' )
   25842           2 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   25843             :       else
   25844           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   25845           2 :       SWIG_fail;
   25846             :     }
   25847             :   }
   25848          39 :   {
   25849             :     /* %typemap(ret) OGRErr */
   25850          39 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   25851          39 :       resultobj = PyInt_FromLong( result );
   25852             :     }
   25853             :   }
   25854          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; } }
   25855             :   return resultobj;
   25856             : fail:
   25857             :   return NULL;
   25858             : }
   25859             : 
   25860             : 
   25861          91 : SWIGINTERN PyObject *_wrap_Dataset_IsLayerPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25862          91 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25863          91 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25864          91 :   int arg2 ;
   25865          91 :   void *argp1 = 0 ;
   25866          91 :   int res1 = 0 ;
   25867          91 :   int val2 ;
   25868          91 :   int ecode2 = 0 ;
   25869          91 :   PyObject *swig_obj[2] ;
   25870          91 :   bool result;
   25871             :   
   25872          91 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsLayerPrivate", 2, 2, swig_obj)) SWIG_fail;
   25873          91 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25874          91 :   if (!SWIG_IsOK(res1)) {
   25875           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsLayerPrivate" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25876             :   }
   25877          91 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25878          91 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25879          91 :   if (!SWIG_IsOK(ecode2)) {
   25880           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsLayerPrivate" "', argument " "2"" of type '" "int""'");
   25881             :   } 
   25882          91 :   arg2 = static_cast< int >(val2);
   25883          91 :   {
   25884          91 :     const int bLocalUseExceptions = GetUseExceptions();
   25885          91 :     if ( bLocalUseExceptions ) {
   25886          85 :       pushErrorHandler();
   25887             :     }
   25888          91 :     {
   25889          91 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25890          91 :       result = (bool)GDALDatasetShadow_IsLayerPrivate(arg1,arg2);
   25891          91 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25892             :     }
   25893          91 :     if ( bLocalUseExceptions ) {
   25894          85 :       popErrorHandler();
   25895             :     }
   25896             : #ifndef SED_HACKS
   25897             :     if ( bLocalUseExceptions ) {
   25898             :       CPLErr eclass = CPLGetLastErrorType();
   25899             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25900             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25901             :       }
   25902             :     }
   25903             : #endif
   25904             :   }
   25905          91 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   25906          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; } }
   25907             :   return resultobj;
   25908             : fail:
   25909             :   return NULL;
   25910             : }
   25911             : 
   25912             : 
   25913        1917 : SWIGINTERN PyObject *_wrap_Dataset_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25914        1917 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25915        1917 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25916        1917 :   bool arg2 = (bool) true ;
   25917        1917 :   bool arg3 = (bool) false ;
   25918        1917 :   OGRLayerShadow **arg4 = (OGRLayerShadow **) NULL ;
   25919        1917 :   double *arg5 = (double *) NULL ;
   25920        1917 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   25921        1917 :   void *arg7 = (void *) NULL ;
   25922        1917 :   void *argp1 = 0 ;
   25923        1917 :   int res1 = 0 ;
   25924        1917 :   bool val2 ;
   25925        1917 :   int ecode2 = 0 ;
   25926        1917 :   bool val3 ;
   25927        1917 :   int ecode3 = 0 ;
   25928        1917 :   OGRLayerShadow *poBelongingLayer4 = NULL ;
   25929        1917 :   double dfProgressPct4 = 0 ;
   25930        1917 :   PyObject * obj0 = 0 ;
   25931        1917 :   PyObject * obj1 = 0 ;
   25932        1917 :   PyObject * obj2 = 0 ;
   25933        1917 :   PyObject * obj3 = 0 ;
   25934        1917 :   PyObject * obj4 = 0 ;
   25935        1917 :   char * kwnames[] = {
   25936             :     (char *)"self",  (char *)"include_layer",  (char *)"include_pct",  (char *)"callback",  (char *)"callback_data",  NULL 
   25937             :   };
   25938        1917 :   OGRFeatureShadow *result = 0 ;
   25939             :   
   25940             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   25941        1917 :   PyProgressData *psProgressInfo;
   25942        1917 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   25943        1917 :   psProgressInfo->nLastReported = -1;
   25944        1917 :   psProgressInfo->psPyCallback = NULL;
   25945        1917 :   psProgressInfo->psPyCallbackData = NULL;
   25946        1917 :   arg7 = psProgressInfo;
   25947        1917 :   {
   25948             :     /* %typemap(in) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25949        1917 :     arg4 = &poBelongingLayer4;
   25950        1917 :     arg5 = &dfProgressPct4;
   25951             :   }
   25952        1917 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Dataset_GetNextFeature", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25953        1917 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25954        1917 :   if (!SWIG_IsOK(res1)) {
   25955           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetNextFeature" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25956             :   }
   25957        1917 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25958        1917 :   if (obj1) {
   25959           6 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   25960           6 :     if (!SWIG_IsOK(ecode2)) {
   25961           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetNextFeature" "', argument " "2"" of type '" "bool""'");
   25962             :     } 
   25963             :     arg2 = static_cast< bool >(val2);
   25964             :   }
   25965        1917 :   if (obj2) {
   25966          76 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   25967          76 :     if (!SWIG_IsOK(ecode3)) {
   25968           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetNextFeature" "', argument " "3"" of type '" "bool""'");
   25969             :     } 
   25970             :     arg3 = static_cast< bool >(val3);
   25971             :   }
   25972        1917 :   if (obj3) {
   25973           2 :     {
   25974             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   25975             :       /* callback_func typemap */
   25976             :       
   25977             :       /* In some cases 0 is passed instead of None. */
   25978             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   25979           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   25980             :       {
   25981           0 :         if( PyLong_AsLong(obj3) == 0 )
   25982             :         {
   25983           0 :           obj3 = Py_None;
   25984             :         }
   25985             :       }
   25986             :       
   25987           2 :       if (obj3 && obj3 != Py_None ) {
   25988           2 :         void* cbfunction = NULL;
   25989           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   25990             :             (void**)&cbfunction,
   25991             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   25992             :             SWIG_POINTER_EXCEPTION | 0 ));
   25993             :         
   25994           2 :         if ( cbfunction == GDALTermProgress ) {
   25995             :           arg6 = GDALTermProgress;
   25996             :         } else {
   25997           2 :           if (!PyCallable_Check(obj3)) {
   25998           0 :             PyErr_SetString( PyExc_RuntimeError,
   25999             :               "Object given is not a Python function" );
   26000           0 :             SWIG_fail;
   26001             :           }
   26002           2 :           psProgressInfo->psPyCallback = obj3;
   26003           2 :           arg6 = PyProgressProxy;
   26004             :         }
   26005             :         
   26006             :       }
   26007             :       
   26008             :     }
   26009             :   }
   26010        1917 :   if (obj4) {
   26011           1 :     {
   26012             :       /* %typemap(in) ( void* callback_data=NULL)  */
   26013           1 :       psProgressInfo->psPyCallbackData = obj4 ;
   26014             :     }
   26015             :   }
   26016        1917 :   {
   26017             :     /* %typemap(check) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   26018        1917 :     if( !arg3 )
   26019        1841 :     arg5 = NULL;
   26020             :   }
   26021        1917 :   {
   26022        1917 :     const int bLocalUseExceptions = GetUseExceptions();
   26023        1917 :     if ( bLocalUseExceptions ) {
   26024         104 :       pushErrorHandler();
   26025             :     }
   26026        1917 :     {
   26027        1917 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26028        1917 :       result = (OGRFeatureShadow *)GDALDatasetShadow_GetNextFeature(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   26029        1917 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26030             :     }
   26031        1917 :     if ( bLocalUseExceptions ) {
   26032         104 :       popErrorHandler();
   26033             :     }
   26034             : #ifndef SED_HACKS
   26035             :     if ( bLocalUseExceptions ) {
   26036             :       CPLErr eclass = CPLGetLastErrorType();
   26037             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26038             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26039             :       }
   26040             :     }
   26041             : #endif
   26042             :   }
   26043        1917 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
   26044        1917 :   {
   26045             :     /* %typemap(argout) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   26046             :     
   26047        1917 :     if( arg2 )
   26048             :     {
   26049        1911 :       if( resultobj == Py_None )
   26050             :       {
   26051          35 :         resultobj = PyList_New(1);
   26052          35 :         PyList_SetItem(resultobj, 0, Py_None);
   26053             :       }
   26054             :       
   26055        1911 :       PyObject* r;
   26056        1911 :       if ( !*arg4 ) {
   26057          35 :         r = Py_None;
   26058          35 :         Py_INCREF(Py_None);
   26059             :       }
   26060             :       else {
   26061        1876 :         r = SWIG_NewPointerObj(SWIG_as_voidptr( *arg4), SWIGTYPE_p_OGRLayerShadow, 0 );
   26062             :       }
   26063             : #if SWIG_VERSION >= 0x040300
   26064             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   26065             : #else
   26066        1911 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   26067             : #endif
   26068             :     }
   26069             :     
   26070        1917 :     if( arg3 )
   26071             :     {
   26072          76 :       if( resultobj == Py_None )
   26073             :       {
   26074           2 :         resultobj = PyList_New(1);
   26075           2 :         PyList_SetItem(resultobj, 0, Py_None);
   26076             :       }
   26077          76 :       PyObject* r = PyFloat_FromDouble( *arg5);
   26078             : #if SWIG_VERSION >= 0x040300
   26079             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   26080             : #else
   26081          76 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   26082             : #endif
   26083             :     }
   26084             :     
   26085             :   }
   26086        1917 :   {
   26087             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   26088             :     
   26089        1917 :     CPLFree(psProgressInfo);
   26090             :     
   26091             :   }
   26092        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; } }
   26093             :   return resultobj;
   26094           0 : fail:
   26095           0 :   {
   26096             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   26097             :     
   26098           0 :     CPLFree(psProgressInfo);
   26099             :     
   26100             :   }
   26101             :   return NULL;
   26102             : }
   26103             : 
   26104             : 
   26105         122 : SWIGINTERN PyObject *_wrap_Dataset_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26106         122 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26107         122 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26108         122 :   char *arg2 = (char *) 0 ;
   26109         122 :   void *argp1 = 0 ;
   26110         122 :   int res1 = 0 ;
   26111         122 :   int res2 ;
   26112         122 :   char *buf2 = 0 ;
   26113         122 :   int alloc2 = 0 ;
   26114         122 :   PyObject *swig_obj[2] ;
   26115         122 :   bool result;
   26116             :   
   26117         122 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   26118         122 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26119         122 :   if (!SWIG_IsOK(res1)) {
   26120           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_TestCapability" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26121             :   }
   26122         122 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26123         122 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26124         122 :   if (!SWIG_IsOK(res2)) {
   26125           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_TestCapability" "', argument " "2"" of type '" "char const *""'");
   26126             :   }
   26127         122 :   arg2 = reinterpret_cast< char * >(buf2);
   26128         122 :   {
   26129         122 :     const int bLocalUseExceptions = GetUseExceptions();
   26130         122 :     if ( bLocalUseExceptions ) {
   26131          50 :       pushErrorHandler();
   26132             :     }
   26133         122 :     {
   26134         122 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26135         122 :       result = (bool)GDALDatasetShadow_TestCapability(arg1,(char const *)arg2);
   26136         122 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26137             :     }
   26138         122 :     if ( bLocalUseExceptions ) {
   26139          50 :       popErrorHandler();
   26140             :     }
   26141             : #ifndef SED_HACKS
   26142             :     if ( bLocalUseExceptions ) {
   26143             :       CPLErr eclass = CPLGetLastErrorType();
   26144             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26145             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26146             :       }
   26147             :     }
   26148             : #endif
   26149             :   }
   26150         122 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   26151         122 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26152         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; } }
   26153             :   return resultobj;
   26154           0 : fail:
   26155           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26156             :   return NULL;
   26157             : }
   26158             : 
   26159             : 
   26160        9995 : SWIGINTERN PyObject *_wrap_Dataset_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   26161        9995 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26162        9995 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26163        9995 :   char *arg2 = (char *) 0 ;
   26164        9995 :   OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
   26165        9995 :   char *arg4 = (char *) "" ;
   26166        9995 :   void *argp1 = 0 ;
   26167        9995 :   int res1 = 0 ;
   26168        9995 :   int res2 ;
   26169        9995 :   char *buf2 = 0 ;
   26170        9995 :   int alloc2 = 0 ;
   26171        9995 :   void *argp3 = 0 ;
   26172        9995 :   int res3 = 0 ;
   26173        9995 :   int res4 ;
   26174        9995 :   char *buf4 = 0 ;
   26175        9995 :   int alloc4 = 0 ;
   26176        9995 :   PyObject * obj0 = 0 ;
   26177        9995 :   PyObject * obj1 = 0 ;
   26178        9995 :   PyObject * obj2 = 0 ;
   26179        9995 :   PyObject * obj3 = 0 ;
   26180        9995 :   char * kwnames[] = {
   26181             :     (char *)"self",  (char *)"statement",  (char *)"spatialFilter",  (char *)"dialect",  NULL 
   26182             :   };
   26183        9995 :   OGRLayerShadow *result = 0 ;
   26184             :   
   26185        9995 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Dataset_ExecuteSQL", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   26186        9995 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26187        9995 :   if (!SWIG_IsOK(res1)) {
   26188           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ExecuteSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26189             :   }
   26190        9995 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26191        9995 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   26192        9995 :   if (!SWIG_IsOK(res2)) {
   26193           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
   26194             :   }
   26195        9995 :   arg2 = reinterpret_cast< char * >(buf2);
   26196        9995 :   if (obj2) {
   26197        9995 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   26198        9995 :     if (!SWIG_IsOK(res3)) {
   26199           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
   26200             :     }
   26201        9995 :     arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
   26202             :   }
   26203        9995 :   if (obj3) {
   26204        9995 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   26205        9995 :     if (!SWIG_IsOK(res4)) {
   26206           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
   26207             :     }
   26208        9995 :     arg4 = reinterpret_cast< char * >(buf4);
   26209             :   }
   26210        9995 :   {
   26211        9995 :     if (!arg2) {
   26212         131 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26213             :     }
   26214             :   }
   26215        9864 :   {
   26216        9864 :     const int bLocalUseExceptions = GetUseExceptions();
   26217        9864 :     if ( bLocalUseExceptions ) {
   26218           0 :       pushErrorHandler();
   26219             :     }
   26220        9864 :     {
   26221        9864 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26222        9864 :       result = (OGRLayerShadow *)GDALDatasetShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
   26223        9864 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26224             :     }
   26225        9864 :     if ( bLocalUseExceptions ) {
   26226           0 :       popErrorHandler();
   26227             :     }
   26228             : #ifndef SED_HACKS
   26229             :     if ( bLocalUseExceptions ) {
   26230             :       CPLErr eclass = CPLGetLastErrorType();
   26231             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26232             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26233             :       }
   26234             :     }
   26235             : #endif
   26236             :   }
   26237        9864 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26238        9864 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26239        9864 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   26240        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; } }
   26241             :   return resultobj;
   26242         131 : fail:
   26243         131 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26244         131 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   26245             :   return NULL;
   26246             : }
   26247             : 
   26248             : 
   26249        2820 : SWIGINTERN PyObject *_wrap_Dataset_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26250        2820 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26251        2820 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26252        2820 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   26253        2820 :   void *argp1 = 0 ;
   26254        2820 :   int res1 = 0 ;
   26255        2820 :   int res2 = 0 ;
   26256        2820 :   PyObject *swig_obj[2] ;
   26257             :   
   26258        2820 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_ReleaseResultSet", 2, 2, swig_obj)) SWIG_fail;
   26259        2820 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26260        2820 :   if (!SWIG_IsOK(res1)) {
   26261           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReleaseResultSet" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26262             :   }
   26263        2820 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26264        2820 :   res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
   26265        2820 :   if (!SWIG_IsOK(res2)) {
   26266           4 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
   26267             :   }
   26268        2818 :   {
   26269        2818 :     const int bLocalUseExceptions = GetUseExceptions();
   26270        2818 :     if ( bLocalUseExceptions ) {
   26271         782 :       pushErrorHandler();
   26272             :     }
   26273        2818 :     {
   26274        2818 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26275        2818 :       GDALDatasetShadow_ReleaseResultSet(arg1,arg2);
   26276        2818 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26277             :     }
   26278        2818 :     if ( bLocalUseExceptions ) {
   26279         782 :       popErrorHandler();
   26280             :     }
   26281             : #ifndef SED_HACKS
   26282             :     if ( bLocalUseExceptions ) {
   26283             :       CPLErr eclass = CPLGetLastErrorType();
   26284             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26285             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26286             :       }
   26287             :     }
   26288             : #endif
   26289             :   }
   26290        2818 :   resultobj = SWIG_Py_Void();
   26291        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; } }
   26292             :   return resultobj;
   26293             : fail:
   26294             :   return NULL;
   26295             : }
   26296             : 
   26297             : 
   26298           6 : SWIGINTERN PyObject *_wrap_Dataset_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26299           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26300           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26301           6 :   void *argp1 = 0 ;
   26302           6 :   int res1 = 0 ;
   26303           6 :   PyObject *swig_obj[1] ;
   26304           6 :   OGRStyleTableShadow *result = 0 ;
   26305             :   
   26306           6 :   if (!args) SWIG_fail;
   26307           6 :   swig_obj[0] = args;
   26308           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26309           6 :   if (!SWIG_IsOK(res1)) {
   26310           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26311             :   }
   26312           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26313           6 :   {
   26314           6 :     const int bLocalUseExceptions = GetUseExceptions();
   26315           6 :     if ( bLocalUseExceptions ) {
   26316           5 :       pushErrorHandler();
   26317             :     }
   26318           6 :     {
   26319           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26320           6 :       result = (OGRStyleTableShadow *)GDALDatasetShadow_GetStyleTable(arg1);
   26321           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26322             :     }
   26323           6 :     if ( bLocalUseExceptions ) {
   26324           5 :       popErrorHandler();
   26325             :     }
   26326             : #ifndef SED_HACKS
   26327             :     if ( bLocalUseExceptions ) {
   26328             :       CPLErr eclass = CPLGetLastErrorType();
   26329             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26330             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26331             :       }
   26332             :     }
   26333             : #endif
   26334             :   }
   26335           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   26336           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; } }
   26337             :   return resultobj;
   26338             : fail:
   26339             :   return NULL;
   26340             : }
   26341             : 
   26342             : 
   26343           7 : SWIGINTERN PyObject *_wrap_Dataset_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26344           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26345           7 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26346           7 :   OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
   26347           7 :   void *argp1 = 0 ;
   26348           7 :   int res1 = 0 ;
   26349           7 :   void *argp2 = 0 ;
   26350           7 :   int res2 = 0 ;
   26351           7 :   PyObject *swig_obj[2] ;
   26352             :   
   26353           7 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
   26354           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26355           7 :   if (!SWIG_IsOK(res1)) {
   26356           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26357             :   }
   26358           7 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26359           7 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   26360           7 :   if (!SWIG_IsOK(res2)) {
   26361           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
   26362             :   }
   26363           7 :   arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
   26364           7 :   {
   26365           7 :     const int bLocalUseExceptions = GetUseExceptions();
   26366           7 :     if ( bLocalUseExceptions ) {
   26367           6 :       pushErrorHandler();
   26368             :     }
   26369           7 :     {
   26370           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26371           7 :       GDALDatasetShadow_SetStyleTable(arg1,arg2);
   26372           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26373             :     }
   26374           7 :     if ( bLocalUseExceptions ) {
   26375           6 :       popErrorHandler();
   26376             :     }
   26377             : #ifndef SED_HACKS
   26378             :     if ( bLocalUseExceptions ) {
   26379             :       CPLErr eclass = CPLGetLastErrorType();
   26380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26382             :       }
   26383             :     }
   26384             : #endif
   26385             :   }
   26386           7 :   resultobj = SWIG_Py_Void();
   26387           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; } }
   26388             :   return resultobj;
   26389             : fail:
   26390             :   return NULL;
   26391             : }
   26392             : 
   26393             : 
   26394        9385 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26395        9385 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26396        9385 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26397        9385 :   int arg2 = (int) 0 ;
   26398        9385 :   void *argp1 = 0 ;
   26399        9385 :   int res1 = 0 ;
   26400        9385 :   int val2 ;
   26401        9385 :   int ecode2 = 0 ;
   26402        9385 :   PyObject *swig_obj[2] ;
   26403        9385 :   OGRLayerShadow *result = 0 ;
   26404             :   
   26405        9385 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByIndex", 1, 2, swig_obj)) SWIG_fail;
   26406        9385 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26407        9385 :   if (!SWIG_IsOK(res1)) {
   26408          14 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByIndex" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26409             :   }
   26410        9378 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26411        9378 :   if (swig_obj[1]) {
   26412        9378 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26413        9378 :     if (!SWIG_IsOK(ecode2)) {
   26414           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
   26415             :     } 
   26416             :     arg2 = static_cast< int >(val2);
   26417             :   }
   26418        9378 :   {
   26419        9378 :     const int bLocalUseExceptions = GetUseExceptions();
   26420        9378 :     if ( bLocalUseExceptions ) {
   26421        5371 :       pushErrorHandler();
   26422             :     }
   26423        9378 :     {
   26424        9378 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26425        9378 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByIndex(arg1,arg2);
   26426        9378 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26427             :     }
   26428        9378 :     if ( bLocalUseExceptions ) {
   26429        5371 :       popErrorHandler();
   26430             :     }
   26431             : #ifndef SED_HACKS
   26432             :     if ( bLocalUseExceptions ) {
   26433             :       CPLErr eclass = CPLGetLastErrorType();
   26434             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26435             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26436             :       }
   26437             :     }
   26438             : #endif
   26439             :   }
   26440        9378 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26441        9385 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26442             :   return resultobj;
   26443             : fail:
   26444             :   return NULL;
   26445             : }
   26446             : 
   26447             : 
   26448        2730 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26449        2730 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26450        2730 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26451        2730 :   char *arg2 = (char *) 0 ;
   26452        2730 :   void *argp1 = 0 ;
   26453        2730 :   int res1 = 0 ;
   26454        2730 :   int res2 ;
   26455        2730 :   char *buf2 = 0 ;
   26456        2730 :   int alloc2 = 0 ;
   26457        2730 :   PyObject *swig_obj[2] ;
   26458        2730 :   OGRLayerShadow *result = 0 ;
   26459             :   
   26460        2730 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByName", 2, 2, swig_obj)) SWIG_fail;
   26461        2730 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26462        2730 :   if (!SWIG_IsOK(res1)) {
   26463           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByName" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26464             :   }
   26465        2729 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26466        2729 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26467        2729 :   if (!SWIG_IsOK(res2)) {
   26468           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
   26469             :   }
   26470        2729 :   arg2 = reinterpret_cast< char * >(buf2);
   26471        2729 :   {
   26472        2729 :     const int bLocalUseExceptions = GetUseExceptions();
   26473        2729 :     if ( bLocalUseExceptions ) {
   26474         425 :       pushErrorHandler();
   26475             :     }
   26476        2729 :     {
   26477        2729 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26478        2729 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByName(arg1,(char const *)arg2);
   26479        2729 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26480             :     }
   26481        2729 :     if ( bLocalUseExceptions ) {
   26482         425 :       popErrorHandler();
   26483             :     }
   26484             : #ifndef SED_HACKS
   26485             :     if ( bLocalUseExceptions ) {
   26486             :       CPLErr eclass = CPLGetLastErrorType();
   26487             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26488             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26489             :       }
   26490             :     }
   26491             : #endif
   26492             :   }
   26493        2729 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26494        2729 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26495        2730 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26496             :   return resultobj;
   26497           1 : fail:
   26498           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26499             :   return NULL;
   26500             : }
   26501             : 
   26502             : 
   26503          14 : SWIGINTERN PyObject *_wrap_Dataset_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26504          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26505          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26506          14 :   void *argp1 = 0 ;
   26507          14 :   int res1 = 0 ;
   26508          14 :   PyObject *swig_obj[1] ;
   26509             :   
   26510          14 :   if (!args) SWIG_fail;
   26511          14 :   swig_obj[0] = args;
   26512          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26513          14 :   if (!SWIG_IsOK(res1)) {
   26514           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ResetReading" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26515             :   }
   26516          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26517          14 :   {
   26518          14 :     const int bLocalUseExceptions = GetUseExceptions();
   26519          14 :     if ( bLocalUseExceptions ) {
   26520           9 :       pushErrorHandler();
   26521             :     }
   26522          14 :     {
   26523          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26524          14 :       GDALDatasetShadow_ResetReading(arg1);
   26525          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26526             :     }
   26527          14 :     if ( bLocalUseExceptions ) {
   26528           9 :       popErrorHandler();
   26529             :     }
   26530             : #ifndef SED_HACKS
   26531             :     if ( bLocalUseExceptions ) {
   26532             :       CPLErr eclass = CPLGetLastErrorType();
   26533             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26534             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26535             :       }
   26536             :     }
   26537             : #endif
   26538             :   }
   26539          14 :   resultobj = SWIG_Py_Void();
   26540          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; } }
   26541             :   return resultobj;
   26542             : fail:
   26543             :   return NULL;
   26544             : }
   26545             : 
   26546             : 
   26547        1442 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26548        1442 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26549        1442 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26550        1442 :   void *argp1 = 0 ;
   26551        1442 :   int res1 = 0 ;
   26552        1442 :   PyObject *swig_obj[1] ;
   26553        1442 :   int result;
   26554             :   
   26555        1442 :   if (!args) SWIG_fail;
   26556        1442 :   swig_obj[0] = args;
   26557        1442 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26558        1442 :   if (!SWIG_IsOK(res1)) {
   26559           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26560             :   }
   26561        1442 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26562        1442 :   {
   26563        1442 :     const int bLocalUseExceptions = GetUseExceptions();
   26564        1442 :     if ( bLocalUseExceptions ) {
   26565         467 :       pushErrorHandler();
   26566             :     }
   26567        1442 :     {
   26568        1442 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26569        1442 :       result = (int)GDALDatasetShadow_GetLayerCount(arg1);
   26570        1442 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26571             :     }
   26572        1442 :     if ( bLocalUseExceptions ) {
   26573         467 :       popErrorHandler();
   26574             :     }
   26575             : #ifndef SED_HACKS
   26576             :     if ( bLocalUseExceptions ) {
   26577             :       CPLErr eclass = CPLGetLastErrorType();
   26578             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26579             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26580             :       }
   26581             :     }
   26582             : #endif
   26583             :   }
   26584        1442 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26585        1442 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26586             :   return resultobj;
   26587             : fail:
   26588             :   return NULL;
   26589             : }
   26590             : 
   26591             : 
   26592           6 : SWIGINTERN PyObject *_wrap_Dataset_AbortSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26593           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26594           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26595           6 :   void *argp1 = 0 ;
   26596           6 :   int res1 = 0 ;
   26597           6 :   PyObject *swig_obj[1] ;
   26598           6 :   OGRErr result;
   26599             :   
   26600           6 :   if (!args) SWIG_fail;
   26601           6 :   swig_obj[0] = args;
   26602           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26603           6 :   if (!SWIG_IsOK(res1)) {
   26604           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AbortSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26605             :   }
   26606           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26607           6 :   {
   26608           6 :     const int bLocalUseExceptions = GetUseExceptions();
   26609           6 :     if ( bLocalUseExceptions ) {
   26610           6 :       pushErrorHandler();
   26611             :     }
   26612           6 :     {
   26613           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26614           6 :       result = (OGRErr)GDALDatasetShadow_AbortSQL(arg1);
   26615           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26616             :     }
   26617           6 :     if ( bLocalUseExceptions ) {
   26618           6 :       popErrorHandler();
   26619             :     }
   26620             : #ifndef SED_HACKS
   26621             :     if ( bLocalUseExceptions ) {
   26622             :       CPLErr eclass = CPLGetLastErrorType();
   26623             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26624             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26625             :       }
   26626             :     }
   26627             : #endif
   26628             :   }
   26629           6 :   {
   26630             :     /* %typemap(out) OGRErr */
   26631           6 :     if ( result != 0 && GetUseExceptions()) {
   26632           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26633           0 :       if( pszMessage[0] != '\0' )
   26634           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26635             :       else
   26636           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26637           0 :       SWIG_fail;
   26638             :     }
   26639             :   }
   26640           6 :   {
   26641             :     /* %typemap(ret) OGRErr */
   26642           6 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26643           6 :       resultobj = PyInt_FromLong( result );
   26644             :     }
   26645             :   }
   26646           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; } }
   26647             :   return resultobj;
   26648             : fail:
   26649             :   return NULL;
   26650             : }
   26651             : 
   26652             : 
   26653         105 : SWIGINTERN PyObject *_wrap_Dataset_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   26654         105 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26655         105 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26656         105 :   int arg2 = (int) FALSE ;
   26657         105 :   void *argp1 = 0 ;
   26658         105 :   int res1 = 0 ;
   26659         105 :   int val2 ;
   26660         105 :   int ecode2 = 0 ;
   26661         105 :   PyObject * obj0 = 0 ;
   26662         105 :   PyObject * obj1 = 0 ;
   26663         105 :   char * kwnames[] = {
   26664             :     (char *)"self",  (char *)"force",  NULL 
   26665             :   };
   26666         105 :   OGRErr result;
   26667             :   
   26668         105 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_StartTransaction", kwnames, &obj0, &obj1)) SWIG_fail;
   26669         105 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26670         105 :   if (!SWIG_IsOK(res1)) {
   26671           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_StartTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26672             :   }
   26673         105 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26674         105 :   if (obj1) {
   26675          17 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   26676          17 :     if (!SWIG_IsOK(ecode2)) {
   26677           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_StartTransaction" "', argument " "2"" of type '" "int""'");
   26678             :     } 
   26679             :     arg2 = static_cast< int >(val2);
   26680             :   }
   26681         105 :   {
   26682         105 :     const int bLocalUseExceptions = GetUseExceptions();
   26683         105 :     if ( bLocalUseExceptions ) {
   26684           0 :       pushErrorHandler();
   26685             :     }
   26686         105 :     {
   26687         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26688         105 :       result = (OGRErr)GDALDatasetShadow_StartTransaction(arg1,arg2);
   26689         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26690             :     }
   26691         105 :     if ( bLocalUseExceptions ) {
   26692           0 :       popErrorHandler();
   26693             :     }
   26694             : #ifndef SED_HACKS
   26695             :     if ( bLocalUseExceptions ) {
   26696             :       CPLErr eclass = CPLGetLastErrorType();
   26697             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26698             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26699             :       }
   26700             :     }
   26701             : #endif
   26702             :   }
   26703         105 :   {
   26704             :     /* %typemap(out) OGRErr */
   26705         119 :     if ( result != 0 && GetUseExceptions()) {
   26706           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26707           0 :       if( pszMessage[0] != '\0' )
   26708           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26709             :       else
   26710           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26711           0 :       SWIG_fail;
   26712             :     }
   26713             :   }
   26714         105 :   {
   26715             :     /* %typemap(ret) OGRErr */
   26716         105 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26717         105 :       resultobj = PyInt_FromLong( result );
   26718             :     }
   26719             :   }
   26720         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; } }
   26721             :   return resultobj;
   26722             : fail:
   26723             :   return NULL;
   26724             : }
   26725             : 
   26726             : 
   26727          76 : SWIGINTERN PyObject *_wrap_Dataset_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26728          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26729          76 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26730          76 :   void *argp1 = 0 ;
   26731          76 :   int res1 = 0 ;
   26732          76 :   PyObject *swig_obj[1] ;
   26733          76 :   OGRErr result;
   26734             :   
   26735          76 :   if (!args) SWIG_fail;
   26736          76 :   swig_obj[0] = args;
   26737          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26738          76 :   if (!SWIG_IsOK(res1)) {
   26739           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CommitTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26740             :   }
   26741          76 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26742          76 :   {
   26743          76 :     const int bLocalUseExceptions = GetUseExceptions();
   26744          76 :     if ( bLocalUseExceptions ) {
   26745           0 :       pushErrorHandler();
   26746             :     }
   26747          76 :     {
   26748          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26749          76 :       result = (OGRErr)GDALDatasetShadow_CommitTransaction(arg1);
   26750          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26751             :     }
   26752          76 :     if ( bLocalUseExceptions ) {
   26753           0 :       popErrorHandler();
   26754             :     }
   26755             : #ifndef SED_HACKS
   26756             :     if ( bLocalUseExceptions ) {
   26757             :       CPLErr eclass = CPLGetLastErrorType();
   26758             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26759             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26760             :       }
   26761             :     }
   26762             : #endif
   26763             :   }
   26764          76 :   {
   26765             :     /* %typemap(out) OGRErr */
   26766          85 :     if ( result != 0 && GetUseExceptions()) {
   26767           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26768           0 :       if( pszMessage[0] != '\0' )
   26769           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26770             :       else
   26771           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26772           0 :       SWIG_fail;
   26773             :     }
   26774             :   }
   26775          76 :   {
   26776             :     /* %typemap(ret) OGRErr */
   26777          76 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26778          76 :       resultobj = PyInt_FromLong( result );
   26779             :     }
   26780             :   }
   26781          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; } }
   26782             :   return resultobj;
   26783             : fail:
   26784             :   return NULL;
   26785             : }
   26786             : 
   26787             : 
   26788          44 : SWIGINTERN PyObject *_wrap_Dataset_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26789          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26790          44 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26791          44 :   void *argp1 = 0 ;
   26792          44 :   int res1 = 0 ;
   26793          44 :   PyObject *swig_obj[1] ;
   26794          44 :   OGRErr result;
   26795             :   
   26796          44 :   if (!args) SWIG_fail;
   26797          44 :   swig_obj[0] = args;
   26798          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26799          44 :   if (!SWIG_IsOK(res1)) {
   26800           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RollbackTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26801             :   }
   26802          44 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26803          44 :   {
   26804          44 :     const int bLocalUseExceptions = GetUseExceptions();
   26805          44 :     if ( bLocalUseExceptions ) {
   26806           0 :       pushErrorHandler();
   26807             :     }
   26808          44 :     {
   26809          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26810          44 :       result = (OGRErr)GDALDatasetShadow_RollbackTransaction(arg1);
   26811          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26812             :     }
   26813          44 :     if ( bLocalUseExceptions ) {
   26814           0 :       popErrorHandler();
   26815             :     }
   26816             : #ifndef SED_HACKS
   26817             :     if ( bLocalUseExceptions ) {
   26818             :       CPLErr eclass = CPLGetLastErrorType();
   26819             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26820             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26821             :       }
   26822             :     }
   26823             : #endif
   26824             :   }
   26825          44 :   {
   26826             :     /* %typemap(out) OGRErr */
   26827          54 :     if ( result != 0 && GetUseExceptions()) {
   26828           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26829           0 :       if( pszMessage[0] != '\0' )
   26830           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26831             :       else
   26832           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26833           0 :       SWIG_fail;
   26834             :     }
   26835             :   }
   26836          44 :   {
   26837             :     /* %typemap(ret) OGRErr */
   26838          44 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26839          44 :       resultobj = PyInt_FromLong( result );
   26840             :     }
   26841             :   }
   26842          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; } }
   26843             :   return resultobj;
   26844             : fail:
   26845             :   return NULL;
   26846             : }
   26847             : 
   26848             : 
   26849           2 : SWIGINTERN PyObject *_wrap_Dataset_ClearStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26850           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26851           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26852           2 :   void *argp1 = 0 ;
   26853           2 :   int res1 = 0 ;
   26854           2 :   PyObject *swig_obj[1] ;
   26855             :   
   26856           2 :   if (!args) SWIG_fail;
   26857           2 :   swig_obj[0] = args;
   26858           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26859           2 :   if (!SWIG_IsOK(res1)) {
   26860           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ClearStatistics" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26861             :   }
   26862           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26863           2 :   {
   26864           2 :     const int bLocalUseExceptions = GetUseExceptions();
   26865           2 :     if ( bLocalUseExceptions ) {
   26866           1 :       pushErrorHandler();
   26867             :     }
   26868           2 :     {
   26869           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26870           2 :       GDALDatasetShadow_ClearStatistics(arg1);
   26871           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26872             :     }
   26873           2 :     if ( bLocalUseExceptions ) {
   26874           1 :       popErrorHandler();
   26875             :     }
   26876             : #ifndef SED_HACKS
   26877             :     if ( bLocalUseExceptions ) {
   26878             :       CPLErr eclass = CPLGetLastErrorType();
   26879             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26880             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26881             :       }
   26882             :     }
   26883             : #endif
   26884             :   }
   26885           2 :   resultobj = SWIG_Py_Void();
   26886           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; } }
   26887             :   return resultobj;
   26888             : fail:
   26889             :   return NULL;
   26890             : }
   26891             : 
   26892             : 
   26893          32 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomainNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26894          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26895          32 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26896          32 :   char **arg2 = (char **) 0 ;
   26897          32 :   void *argp1 = 0 ;
   26898          32 :   int res1 = 0 ;
   26899          32 :   PyObject *swig_obj[2] ;
   26900          32 :   char **result = 0 ;
   26901             :   
   26902          32 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomainNames", 1, 2, swig_obj)) SWIG_fail;
   26903          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26904          32 :   if (!SWIG_IsOK(res1)) {
   26905           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomainNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26906             :   }
   26907          32 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26908          32 :   if (swig_obj[1]) {
   26909           0 :     {
   26910             :       /* %typemap(in) char **dict */
   26911           0 :       arg2 = NULL;
   26912           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   26913           0 :         int bErr = FALSE;
   26914           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   26915           0 :         if ( bErr )
   26916             :         {
   26917           0 :           SWIG_fail;
   26918             :         }
   26919             :       }
   26920           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   26921           0 :         int bErr = FALSE;
   26922           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   26923           0 :         if ( bErr )
   26924             :         {
   26925           0 :           SWIG_fail;
   26926             :         }
   26927             :       }
   26928             :       else {
   26929           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   26930           0 :         SWIG_fail;
   26931             :       }
   26932             :     }
   26933             :   }
   26934          32 :   {
   26935          32 :     const int bLocalUseExceptions = GetUseExceptions();
   26936          32 :     if ( bLocalUseExceptions ) {
   26937          24 :       pushErrorHandler();
   26938             :     }
   26939          32 :     {
   26940          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26941          32 :       result = (char **)GDALDatasetShadow_GetFieldDomainNames(arg1,arg2);
   26942          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26943             :     }
   26944          32 :     if ( bLocalUseExceptions ) {
   26945          24 :       popErrorHandler();
   26946             :     }
   26947             : #ifndef SED_HACKS
   26948             :     if ( bLocalUseExceptions ) {
   26949             :       CPLErr eclass = CPLGetLastErrorType();
   26950             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26951             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26952             :       }
   26953             :     }
   26954             : #endif
   26955             :   }
   26956          32 :   {
   26957             :     /* %typemap(out) char **CSL -> ( string ) */
   26958          32 :     bool bErr = false;
   26959          32 :     resultobj = CSLToList(result, &bErr);
   26960          32 :     CSLDestroy(result);
   26961          32 :     if( bErr ) {
   26962           0 :       SWIG_fail;
   26963             :     }
   26964             :   }
   26965          32 :   {
   26966             :     /* %typemap(freearg) char **dict */
   26967          32 :     CSLDestroy( arg2 );
   26968             :   }
   26969          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; } }
   26970             :   return resultobj;
   26971           0 : fail:
   26972           0 :   {
   26973             :     /* %typemap(freearg) char **dict */
   26974           0 :     CSLDestroy( arg2 );
   26975             :   }
   26976             :   return NULL;
   26977             : }
   26978             : 
   26979             : 
   26980         115 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26981         115 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26982         115 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26983         115 :   char *arg2 = (char *) 0 ;
   26984         115 :   void *argp1 = 0 ;
   26985         115 :   int res1 = 0 ;
   26986         115 :   int res2 ;
   26987         115 :   char *buf2 = 0 ;
   26988         115 :   int alloc2 = 0 ;
   26989         115 :   PyObject *swig_obj[2] ;
   26990         115 :   OGRFieldDomainShadow *result = 0 ;
   26991             :   
   26992         115 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26993         115 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26994         115 :   if (!SWIG_IsOK(res1)) {
   26995           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26996             :   }
   26997         115 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26998         115 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26999         115 :   if (!SWIG_IsOK(res2)) {
   27000           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetFieldDomain" "', argument " "2"" of type '" "char const *""'");
   27001             :   }
   27002         115 :   arg2 = reinterpret_cast< char * >(buf2);
   27003         115 :   {
   27004         115 :     if (!arg2) {
   27005           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27006             :     }
   27007             :   }
   27008         114 :   {
   27009         114 :     const int bLocalUseExceptions = GetUseExceptions();
   27010         114 :     if ( bLocalUseExceptions ) {
   27011          82 :       pushErrorHandler();
   27012             :     }
   27013         114 :     {
   27014         114 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27015         114 :       result = (OGRFieldDomainShadow *)GDALDatasetShadow_GetFieldDomain(arg1,(char const *)arg2);
   27016         114 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27017             :     }
   27018         114 :     if ( bLocalUseExceptions ) {
   27019          82 :       popErrorHandler();
   27020             :     }
   27021             : #ifndef SED_HACKS
   27022             :     if ( bLocalUseExceptions ) {
   27023             :       CPLErr eclass = CPLGetLastErrorType();
   27024             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27025             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27026             :       }
   27027             :     }
   27028             : #endif
   27029             :   }
   27030         114 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   27031         114 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27032         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; } }
   27033             :   return resultobj;
   27034           1 : fail:
   27035           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27036             :   return NULL;
   27037             : }
   27038             : 
   27039             : 
   27040          38 : SWIGINTERN PyObject *_wrap_Dataset_AddFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27041          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27042          38 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27043          38 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   27044          38 :   void *argp1 = 0 ;
   27045          38 :   int res1 = 0 ;
   27046          38 :   void *argp2 = 0 ;
   27047          38 :   int res2 = 0 ;
   27048          38 :   PyObject *swig_obj[2] ;
   27049          38 :   bool result;
   27050             :   
   27051          38 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27052          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27053          38 :   if (!SWIG_IsOK(res1)) {
   27054           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27055             :   }
   27056          38 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27057          38 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   27058          38 :   if (!SWIG_IsOK(res2)) {
   27059           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   27060             :   }
   27061          38 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   27062          38 :   {
   27063          38 :     if (!arg2) {
   27064           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27065             :     }
   27066             :   }
   27067          37 :   {
   27068          37 :     const int bLocalUseExceptions = GetUseExceptions();
   27069          37 :     if ( bLocalUseExceptions ) {
   27070          19 :       pushErrorHandler();
   27071             :     }
   27072          37 :     {
   27073          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27074          37 :       result = (bool)GDALDatasetShadow_AddFieldDomain(arg1,arg2);
   27075          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27076             :     }
   27077          37 :     if ( bLocalUseExceptions ) {
   27078          19 :       popErrorHandler();
   27079             :     }
   27080             : #ifndef SED_HACKS
   27081             :     if ( bLocalUseExceptions ) {
   27082             :       CPLErr eclass = CPLGetLastErrorType();
   27083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27085             :       }
   27086             :     }
   27087             : #endif
   27088             :   }
   27089          37 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27090          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; } }
   27091             :   return resultobj;
   27092             : fail:
   27093             :   return NULL;
   27094             : }
   27095             : 
   27096             : 
   27097           8 : SWIGINTERN PyObject *_wrap_Dataset_DeleteFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27098           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27099           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27100           8 :   char *arg2 = (char *) 0 ;
   27101           8 :   void *argp1 = 0 ;
   27102           8 :   int res1 = 0 ;
   27103           8 :   int res2 ;
   27104           8 :   char *buf2 = 0 ;
   27105           8 :   int alloc2 = 0 ;
   27106           8 :   PyObject *swig_obj[2] ;
   27107           8 :   bool result;
   27108             :   
   27109           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27110           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27111           8 :   if (!SWIG_IsOK(res1)) {
   27112           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27113             :   }
   27114           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27115           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27116           8 :   if (!SWIG_IsOK(res2)) {
   27117           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteFieldDomain" "', argument " "2"" of type '" "char const *""'");
   27118             :   }
   27119           8 :   arg2 = reinterpret_cast< char * >(buf2);
   27120           8 :   {
   27121           8 :     if (!arg2) {
   27122           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27123             :     }
   27124             :   }
   27125           8 :   {
   27126           8 :     const int bLocalUseExceptions = GetUseExceptions();
   27127           8 :     if ( bLocalUseExceptions ) {
   27128           8 :       pushErrorHandler();
   27129             :     }
   27130           8 :     {
   27131           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27132           8 :       result = (bool)GDALDatasetShadow_DeleteFieldDomain(arg1,(char const *)arg2);
   27133           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27134             :     }
   27135           8 :     if ( bLocalUseExceptions ) {
   27136           8 :       popErrorHandler();
   27137             :     }
   27138             : #ifndef SED_HACKS
   27139             :     if ( bLocalUseExceptions ) {
   27140             :       CPLErr eclass = CPLGetLastErrorType();
   27141             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27142             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27143             :       }
   27144             :     }
   27145             : #endif
   27146             :   }
   27147           8 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27148           8 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27149           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; } }
   27150             :   return resultobj;
   27151           0 : fail:
   27152           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27153             :   return NULL;
   27154             : }
   27155             : 
   27156             : 
   27157           4 : SWIGINTERN PyObject *_wrap_Dataset_UpdateFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27158           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27159           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27160           4 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   27161           4 :   void *argp1 = 0 ;
   27162           4 :   int res1 = 0 ;
   27163           4 :   void *argp2 = 0 ;
   27164           4 :   int res2 = 0 ;
   27165           4 :   PyObject *swig_obj[2] ;
   27166           4 :   bool result;
   27167             :   
   27168           4 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27169           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27170           4 :   if (!SWIG_IsOK(res1)) {
   27171           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27172             :   }
   27173           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27174           4 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   27175           4 :   if (!SWIG_IsOK(res2)) {
   27176           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   27177             :   }
   27178           4 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   27179           4 :   {
   27180           4 :     if (!arg2) {
   27181           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27182             :     }
   27183             :   }
   27184           4 :   {
   27185           4 :     const int bLocalUseExceptions = GetUseExceptions();
   27186           4 :     if ( bLocalUseExceptions ) {
   27187           4 :       pushErrorHandler();
   27188             :     }
   27189           4 :     {
   27190           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27191           4 :       result = (bool)GDALDatasetShadow_UpdateFieldDomain(arg1,arg2);
   27192           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27193             :     }
   27194           4 :     if ( bLocalUseExceptions ) {
   27195           4 :       popErrorHandler();
   27196             :     }
   27197             : #ifndef SED_HACKS
   27198             :     if ( bLocalUseExceptions ) {
   27199             :       CPLErr eclass = CPLGetLastErrorType();
   27200             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27201             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27202             :       }
   27203             :     }
   27204             : #endif
   27205             :   }
   27206           4 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27207           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; } }
   27208             :   return resultobj;
   27209             : fail:
   27210             :   return NULL;
   27211             : }
   27212             : 
   27213             : 
   27214          46 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationshipNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27215          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27216          46 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27217          46 :   char **arg2 = (char **) 0 ;
   27218          46 :   void *argp1 = 0 ;
   27219          46 :   int res1 = 0 ;
   27220          46 :   PyObject *swig_obj[2] ;
   27221          46 :   char **result = 0 ;
   27222             :   
   27223          46 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationshipNames", 1, 2, swig_obj)) SWIG_fail;
   27224          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27225          46 :   if (!SWIG_IsOK(res1)) {
   27226           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationshipNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27227             :   }
   27228          46 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27229          46 :   if (swig_obj[1]) {
   27230           0 :     {
   27231             :       /* %typemap(in) char **dict */
   27232           0 :       arg2 = NULL;
   27233           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27234           0 :         int bErr = FALSE;
   27235           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   27236           0 :         if ( bErr )
   27237             :         {
   27238           0 :           SWIG_fail;
   27239             :         }
   27240             :       }
   27241           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27242           0 :         int bErr = FALSE;
   27243           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   27244           0 :         if ( bErr )
   27245             :         {
   27246           0 :           SWIG_fail;
   27247             :         }
   27248             :       }
   27249             :       else {
   27250           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27251           0 :         SWIG_fail;
   27252             :       }
   27253             :     }
   27254             :   }
   27255          46 :   {
   27256          46 :     const int bLocalUseExceptions = GetUseExceptions();
   27257          46 :     if ( bLocalUseExceptions ) {
   27258           7 :       pushErrorHandler();
   27259             :     }
   27260          46 :     {
   27261          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27262          46 :       result = (char **)GDALDatasetShadow_GetRelationshipNames(arg1,arg2);
   27263          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27264             :     }
   27265          46 :     if ( bLocalUseExceptions ) {
   27266           7 :       popErrorHandler();
   27267             :     }
   27268             : #ifndef SED_HACKS
   27269             :     if ( bLocalUseExceptions ) {
   27270             :       CPLErr eclass = CPLGetLastErrorType();
   27271             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27272             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27273             :       }
   27274             :     }
   27275             : #endif
   27276             :   }
   27277          46 :   {
   27278             :     /* %typemap(out) char **CSL -> ( string ) */
   27279          46 :     bool bErr = false;
   27280          46 :     resultobj = CSLToList(result, &bErr);
   27281          46 :     CSLDestroy(result);
   27282          46 :     if( bErr ) {
   27283           0 :       SWIG_fail;
   27284             :     }
   27285             :   }
   27286          46 :   {
   27287             :     /* %typemap(freearg) char **dict */
   27288          46 :     CSLDestroy( arg2 );
   27289             :   }
   27290          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; } }
   27291             :   return resultobj;
   27292           0 : fail:
   27293           0 :   {
   27294             :     /* %typemap(freearg) char **dict */
   27295           0 :     CSLDestroy( arg2 );
   27296             :   }
   27297             :   return NULL;
   27298             : }
   27299             : 
   27300             : 
   27301          52 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27302          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27303          52 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27304          52 :   char *arg2 = (char *) 0 ;
   27305          52 :   void *argp1 = 0 ;
   27306          52 :   int res1 = 0 ;
   27307          52 :   int res2 ;
   27308          52 :   char *buf2 = 0 ;
   27309          52 :   int alloc2 = 0 ;
   27310          52 :   PyObject *swig_obj[2] ;
   27311          52 :   GDALRelationshipShadow *result = 0 ;
   27312             :   
   27313          52 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationship", 2, 2, swig_obj)) SWIG_fail;
   27314          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27315          52 :   if (!SWIG_IsOK(res1)) {
   27316           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27317             :   }
   27318          52 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27319          52 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27320          52 :   if (!SWIG_IsOK(res2)) {
   27321           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetRelationship" "', argument " "2"" of type '" "char const *""'");
   27322             :   }
   27323          52 :   arg2 = reinterpret_cast< char * >(buf2);
   27324          52 :   {
   27325          52 :     if (!arg2) {
   27326           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27327             :     }
   27328             :   }
   27329          52 :   {
   27330          52 :     const int bLocalUseExceptions = GetUseExceptions();
   27331          52 :     if ( bLocalUseExceptions ) {
   27332          10 :       pushErrorHandler();
   27333             :     }
   27334          52 :     {
   27335          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27336          52 :       result = (GDALRelationshipShadow *)GDALDatasetShadow_GetRelationship(arg1,(char const *)arg2);
   27337          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27338             :     }
   27339          52 :     if ( bLocalUseExceptions ) {
   27340          10 :       popErrorHandler();
   27341             :     }
   27342             : #ifndef SED_HACKS
   27343             :     if ( bLocalUseExceptions ) {
   27344             :       CPLErr eclass = CPLGetLastErrorType();
   27345             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27346             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27347             :       }
   27348             :     }
   27349             : #endif
   27350             :   }
   27351          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27352          52 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27353          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; } }
   27354             :   return resultobj;
   27355           0 : fail:
   27356           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27357             :   return NULL;
   27358             : }
   27359             : 
   27360             : 
   27361          42 : SWIGINTERN PyObject *_wrap_Dataset_AddRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27362          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27363          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27364          42 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   27365          42 :   void *argp1 = 0 ;
   27366          42 :   int res1 = 0 ;
   27367          42 :   void *argp2 = 0 ;
   27368          42 :   int res2 = 0 ;
   27369          42 :   PyObject *swig_obj[2] ;
   27370          42 :   bool result;
   27371             :   
   27372          42 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddRelationship", 2, 2, swig_obj)) SWIG_fail;
   27373          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27374          42 :   if (!SWIG_IsOK(res1)) {
   27375           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27376             :   }
   27377          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27378          42 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27379          42 :   if (!SWIG_IsOK(res2)) {
   27380           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   27381             :   }
   27382          42 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27383          42 :   {
   27384          42 :     if (!arg2) {
   27385           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27386             :     }
   27387             :   }
   27388          42 :   {
   27389          42 :     const int bLocalUseExceptions = GetUseExceptions();
   27390          42 :     if ( bLocalUseExceptions ) {
   27391           0 :       pushErrorHandler();
   27392             :     }
   27393          42 :     {
   27394          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27395          42 :       result = (bool)GDALDatasetShadow_AddRelationship(arg1,arg2);
   27396          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27397             :     }
   27398          42 :     if ( bLocalUseExceptions ) {
   27399           0 :       popErrorHandler();
   27400             :     }
   27401             : #ifndef SED_HACKS
   27402             :     if ( bLocalUseExceptions ) {
   27403             :       CPLErr eclass = CPLGetLastErrorType();
   27404             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27405             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27406             :       }
   27407             :     }
   27408             : #endif
   27409             :   }
   27410          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27411          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; } }
   27412             :   return resultobj;
   27413             : fail:
   27414             :   return NULL;
   27415             : }
   27416             : 
   27417             : 
   27418           6 : SWIGINTERN PyObject *_wrap_Dataset_DeleteRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27419           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27420           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27421           6 :   char *arg2 = (char *) 0 ;
   27422           6 :   void *argp1 = 0 ;
   27423           6 :   int res1 = 0 ;
   27424           6 :   int res2 ;
   27425           6 :   char *buf2 = 0 ;
   27426           6 :   int alloc2 = 0 ;
   27427           6 :   PyObject *swig_obj[2] ;
   27428           6 :   bool result;
   27429             :   
   27430           6 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteRelationship", 2, 2, swig_obj)) SWIG_fail;
   27431           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27432           6 :   if (!SWIG_IsOK(res1)) {
   27433           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27434             :   }
   27435           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27436           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27437           6 :   if (!SWIG_IsOK(res2)) {
   27438           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteRelationship" "', argument " "2"" of type '" "char const *""'");
   27439             :   }
   27440           6 :   arg2 = reinterpret_cast< char * >(buf2);
   27441           6 :   {
   27442           6 :     if (!arg2) {
   27443           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27444             :     }
   27445             :   }
   27446           6 :   {
   27447           6 :     const int bLocalUseExceptions = GetUseExceptions();
   27448           6 :     if ( bLocalUseExceptions ) {
   27449           0 :       pushErrorHandler();
   27450             :     }
   27451           6 :     {
   27452           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27453           6 :       result = (bool)GDALDatasetShadow_DeleteRelationship(arg1,(char const *)arg2);
   27454           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27455             :     }
   27456           6 :     if ( bLocalUseExceptions ) {
   27457           0 :       popErrorHandler();
   27458             :     }
   27459             : #ifndef SED_HACKS
   27460             :     if ( bLocalUseExceptions ) {
   27461             :       CPLErr eclass = CPLGetLastErrorType();
   27462             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27463             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27464             :       }
   27465             :     }
   27466             : #endif
   27467             :   }
   27468           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27469           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27470           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; } }
   27471             :   return resultobj;
   27472           0 : fail:
   27473           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27474             :   return NULL;
   27475             : }
   27476             : 
   27477             : 
   27478           9 : SWIGINTERN PyObject *_wrap_Dataset_UpdateRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27479           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27480           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27481           9 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   27482           9 :   void *argp1 = 0 ;
   27483           9 :   int res1 = 0 ;
   27484           9 :   void *argp2 = 0 ;
   27485           9 :   int res2 = 0 ;
   27486           9 :   PyObject *swig_obj[2] ;
   27487           9 :   bool result;
   27488             :   
   27489           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateRelationship", 2, 2, swig_obj)) SWIG_fail;
   27490           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27491           9 :   if (!SWIG_IsOK(res1)) {
   27492           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27493             :   }
   27494           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27495           9 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27496           9 :   if (!SWIG_IsOK(res2)) {
   27497           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   27498             :   }
   27499           9 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27500           9 :   {
   27501           9 :     if (!arg2) {
   27502           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27503             :     }
   27504             :   }
   27505           9 :   {
   27506           9 :     const int bLocalUseExceptions = GetUseExceptions();
   27507           9 :     if ( bLocalUseExceptions ) {
   27508           0 :       pushErrorHandler();
   27509             :     }
   27510           9 :     {
   27511           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27512           9 :       result = (bool)GDALDatasetShadow_UpdateRelationship(arg1,arg2);
   27513           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27514             :     }
   27515           9 :     if ( bLocalUseExceptions ) {
   27516           0 :       popErrorHandler();
   27517             :     }
   27518             : #ifndef SED_HACKS
   27519             :     if ( bLocalUseExceptions ) {
   27520             :       CPLErr eclass = CPLGetLastErrorType();
   27521             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27522             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27523             :       }
   27524             :     }
   27525             : #endif
   27526             :   }
   27527           9 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27528           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; } }
   27529             :   return resultobj;
   27530             : fail:
   27531             :   return NULL;
   27532             : }
   27533             : 
   27534             : 
   27535          14 : SWIGINTERN PyObject *_wrap_Dataset_AsMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27536          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27537          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27538          14 :   char **arg2 = (char **) NULL ;
   27539          14 :   void *argp1 = 0 ;
   27540          14 :   int res1 = 0 ;
   27541          14 :   PyObject *swig_obj[2] ;
   27542          14 :   GDALMDArrayHS *result = 0 ;
   27543             :   
   27544          14 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AsMDArray", 1, 2, swig_obj)) SWIG_fail;
   27545          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27546          14 :   if (!SWIG_IsOK(res1)) {
   27547           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AsMDArray" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27548             :   }
   27549          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27550          14 :   if (swig_obj[1]) {
   27551          11 :     {
   27552             :       /* %typemap(in) char **dict */
   27553          11 :       arg2 = NULL;
   27554          11 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27555          11 :         int bErr = FALSE;
   27556          11 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   27557          11 :         if ( bErr )
   27558             :         {
   27559           0 :           SWIG_fail;
   27560             :         }
   27561             :       }
   27562           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27563           0 :         int bErr = FALSE;
   27564           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   27565           0 :         if ( bErr )
   27566             :         {
   27567           0 :           SWIG_fail;
   27568             :         }
   27569             :       }
   27570             :       else {
   27571           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27572           0 :         SWIG_fail;
   27573             :       }
   27574             :     }
   27575             :   }
   27576          14 :   {
   27577          14 :     const int bLocalUseExceptions = GetUseExceptions();
   27578          14 :     if ( bLocalUseExceptions ) {
   27579           3 :       pushErrorHandler();
   27580             :     }
   27581          14 :     {
   27582          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27583          14 :       result = (GDALMDArrayHS *)GDALDatasetShadow_AsMDArray(arg1,arg2);
   27584          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27585             :     }
   27586          14 :     if ( bLocalUseExceptions ) {
   27587           3 :       popErrorHandler();
   27588             :     }
   27589             : #ifndef SED_HACKS
   27590             :     if ( bLocalUseExceptions ) {
   27591             :       CPLErr eclass = CPLGetLastErrorType();
   27592             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27593             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27594             :       }
   27595             :     }
   27596             : #endif
   27597             :   }
   27598          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   27599          14 :   {
   27600             :     /* %typemap(freearg) char **dict */
   27601          14 :     CSLDestroy( arg2 );
   27602             :   }
   27603          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; } }
   27604             :   return resultobj;
   27605           0 : fail:
   27606           0 :   {
   27607             :     /* %typemap(freearg) char **dict */
   27608           0 :     CSLDestroy( arg2 );
   27609             :   }
   27610             :   return NULL;
   27611             : }
   27612             : 
   27613             : 
   27614      176654 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   27615      176654 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27616      176654 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27617      176654 :   double arg2 ;
   27618      176654 :   double arg3 ;
   27619      176654 :   double arg4 ;
   27620      176654 :   double arg5 ;
   27621      176654 :   void **arg6 = (void **) 0 ;
   27622      176654 :   int *arg7 = (int *) 0 ;
   27623      176654 :   int *arg8 = (int *) 0 ;
   27624      176654 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   27625      176654 :   int arg10 = (int) 0 ;
   27626      176654 :   int *arg11 = (int *) 0 ;
   27627      176654 :   GIntBig *arg12 = (GIntBig *) 0 ;
   27628      176654 :   GIntBig *arg13 = (GIntBig *) 0 ;
   27629      176654 :   GIntBig *arg14 = (GIntBig *) 0 ;
   27630      176654 :   GDALRIOResampleAlg arg15 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   27631      176654 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   27632      176654 :   void *arg17 = (void *) NULL ;
   27633      176654 :   void *arg18 = (void *) NULL ;
   27634      176654 :   void *argp1 = 0 ;
   27635      176654 :   int res1 = 0 ;
   27636      176654 :   double val2 ;
   27637      176654 :   int ecode2 = 0 ;
   27638      176654 :   double val3 ;
   27639      176654 :   int ecode3 = 0 ;
   27640      176654 :   double val4 ;
   27641      176654 :   int ecode4 = 0 ;
   27642      176654 :   double val5 ;
   27643      176654 :   int ecode5 = 0 ;
   27644      176654 :   void *pyObject6 = NULL ;
   27645      176654 :   int val7 ;
   27646      176654 :   int val8 ;
   27647      176654 :   GDALDataType val9 ;
   27648      176654 :   GIntBig val12 ;
   27649      176654 :   GIntBig val13 ;
   27650      176654 :   GIntBig val14 ;
   27651      176654 :   PyObject * obj0 = 0 ;
   27652      176654 :   PyObject * obj1 = 0 ;
   27653      176654 :   PyObject * obj2 = 0 ;
   27654      176654 :   PyObject * obj3 = 0 ;
   27655      176654 :   PyObject * obj4 = 0 ;
   27656      176654 :   PyObject * obj5 = 0 ;
   27657      176654 :   PyObject * obj6 = 0 ;
   27658      176654 :   PyObject * obj7 = 0 ;
   27659      176654 :   PyObject * obj8 = 0 ;
   27660      176654 :   PyObject * obj9 = 0 ;
   27661      176654 :   PyObject * obj10 = 0 ;
   27662      176654 :   PyObject * obj11 = 0 ;
   27663      176654 :   PyObject * obj12 = 0 ;
   27664      176654 :   PyObject * obj13 = 0 ;
   27665      176654 :   PyObject * obj14 = 0 ;
   27666      176654 :   PyObject * obj15 = 0 ;
   27667      176654 :   char * kwnames[] = {
   27668             :     (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 
   27669             :   };
   27670      176654 :   CPLErr result;
   27671             :   
   27672             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   27673      176654 :   PyProgressData *psProgressInfo;
   27674      176654 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   27675      176654 :   psProgressInfo->nLastReported = -1;
   27676      176654 :   psProgressInfo->psPyCallback = NULL;
   27677      176654 :   psProgressInfo->psPyCallbackData = NULL;
   27678      176654 :   arg17 = psProgressInfo;
   27679      176654 :   {
   27680             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   27681      176654 :     arg6 = &pyObject6;
   27682             :   }
   27683      176654 :   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;
   27684      176654 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27685      176654 :   if (!SWIG_IsOK(res1)) {
   27686           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27687             :   }
   27688      176654 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27689      176654 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   27690      176654 :   if (!SWIG_IsOK(ecode2)) {
   27691           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "double""'");
   27692             :   } 
   27693      176654 :   arg2 = static_cast< double >(val2);
   27694      176654 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   27695      176654 :   if (!SWIG_IsOK(ecode3)) {
   27696           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "double""'");
   27697             :   } 
   27698      176654 :   arg3 = static_cast< double >(val3);
   27699      176654 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   27700      176654 :   if (!SWIG_IsOK(ecode4)) {
   27701           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "double""'");
   27702             :   } 
   27703      176654 :   arg4 = static_cast< double >(val4);
   27704      176654 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   27705      176654 :   if (!SWIG_IsOK(ecode5)) {
   27706           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "double""'");
   27707             :   } 
   27708      176654 :   arg5 = static_cast< double >(val5);
   27709      176654 :   if (obj5) {
   27710      176654 :     {
   27711             :       /* %typemap(in) (int *optional_##int) */
   27712      176654 :       if ( obj5 == Py_None ) {
   27713             :         arg7 = 0;
   27714             :       }
   27715      176654 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   27716             :         arg7 = (int *) &val7;
   27717             :       }
   27718             :       else {
   27719           2 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27720           2 :         SWIG_fail;
   27721             :       }
   27722             :     }
   27723             :   }
   27724      176652 :   if (obj6) {
   27725      176652 :     {
   27726             :       /* %typemap(in) (int *optional_##int) */
   27727      176652 :       if ( obj6 == Py_None ) {
   27728             :         arg8 = 0;
   27729             :       }
   27730      176652 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   27731             :         arg8 = (int *) &val8;
   27732             :       }
   27733             :       else {
   27734           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27735           0 :         SWIG_fail;
   27736             :       }
   27737             :     }
   27738             :   }
   27739      176652 :   if (obj7) {
   27740      176652 :     {
   27741             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   27742      176652 :       int intval = 0;
   27743      176652 :       if ( obj7 == Py_None ) {
   27744             :         arg9 = NULL;
   27745             :       }
   27746      353304 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   27747      176652 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   27748             :         {
   27749           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   27750             :         }
   27751      176652 :         val9 = static_cast<GDALDataType>(intval);
   27752      176652 :         arg9 = &val9;
   27753             :       }
   27754             :       else {
   27755           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27756           0 :         SWIG_fail;
   27757             :       }
   27758             :     }
   27759             :   }
   27760      176652 :   if (obj8) {
   27761      176652 :     {
   27762             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   27763      176652 :       arg11 = CreateCIntListFromSequence(obj8, &arg10);
   27764      176652 :       if( arg10 < 0 ) {
   27765           0 :         SWIG_fail;
   27766             :       }
   27767             :     }
   27768             :   }
   27769      176652 :   if (obj9) {
   27770      176652 :     {
   27771             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27772      176652 :       if ( obj9 == Py_None ) {
   27773             :         arg12 = 0;
   27774             :       }
   27775        1099 :       else if ( PyArg_Parse( obj9,"L" ,&val12 ) ) {
   27776             :         arg12 = (GIntBig *) &val12;
   27777             :       }
   27778             :       else {
   27779           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27780           0 :         SWIG_fail;
   27781             :       }
   27782             :     }
   27783             :   }
   27784      176652 :   if (obj10) {
   27785      176652 :     {
   27786             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27787      176652 :       if ( obj10 == Py_None ) {
   27788             :         arg13 = 0;
   27789             :       }
   27790          27 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   27791             :         arg13 = (GIntBig *) &val13;
   27792             :       }
   27793             :       else {
   27794           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27795           0 :         SWIG_fail;
   27796             :       }
   27797             :     }
   27798             :   }
   27799      176652 :   if (obj11) {
   27800      176652 :     {
   27801             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27802      176652 :       if ( obj11 == Py_None ) {
   27803             :         arg14 = 0;
   27804             :       }
   27805        1077 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   27806             :         arg14 = (GIntBig *) &val14;
   27807             :       }
   27808             :       else {
   27809           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27810           0 :         SWIG_fail;
   27811             :       }
   27812             :     }
   27813             :   }
   27814      176652 :   if (obj12) {
   27815      176652 :     {
   27816             :       // %typemap(in) GDALRIOResampleAlg
   27817      176652 :       int val = 0;
   27818      176652 :       int ecode = SWIG_AsVal_int(obj12, &val);
   27819      176652 :       if (!SWIG_IsOK(ecode)) {
   27820           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   27821             :       }
   27822      176651 :       if( val < 0 ||
   27823      176650 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   27824      176649 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   27825             :         val > static_cast<int>(GRIORA_LAST) )
   27826             :       {
   27827           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   27828             :       }
   27829             :       arg15 = static_cast< GDALRIOResampleAlg >(val);
   27830             :     }
   27831             :   }
   27832      176649 :   if (obj13) {
   27833      176649 :     {
   27834             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   27835             :       /* callback_func typemap */
   27836             :       
   27837             :       /* In some cases 0 is passed instead of None. */
   27838             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   27839      176649 :       if ( PyLong_Check(obj13) || PyInt_Check(obj13) )
   27840             :       {
   27841           0 :         if( PyLong_AsLong(obj13) == 0 )
   27842             :         {
   27843           0 :           obj13 = Py_None;
   27844             :         }
   27845             :       }
   27846             :       
   27847      176649 :       if (obj13 && obj13 != Py_None ) {
   27848          19 :         void* cbfunction = NULL;
   27849          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj13,
   27850             :             (void**)&cbfunction,
   27851             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   27852             :             SWIG_POINTER_EXCEPTION | 0 ));
   27853             :         
   27854          19 :         if ( cbfunction == GDALTermProgress ) {
   27855             :           arg16 = GDALTermProgress;
   27856             :         } else {
   27857          19 :           if (!PyCallable_Check(obj13)) {
   27858           0 :             PyErr_SetString( PyExc_RuntimeError,
   27859             :               "Object given is not a Python function" );
   27860           0 :             SWIG_fail;
   27861             :           }
   27862          19 :           psProgressInfo->psPyCallback = obj13;
   27863          19 :           arg16 = PyProgressProxy;
   27864             :         }
   27865             :         
   27866             :       }
   27867             :       
   27868             :     }
   27869             :   }
   27870      176649 :   if (obj14) {
   27871      176649 :     {
   27872             :       /* %typemap(in) ( void* callback_data=NULL)  */
   27873      176649 :       psProgressInfo->psPyCallbackData = obj14 ;
   27874             :     }
   27875             :   }
   27876      176649 :   if (obj15) {
   27877      176649 :     {
   27878             :       /* %typemap(in) ( void *inPythonObject ) */
   27879      176649 :       arg18 = obj15;
   27880             :     }
   27881             :   }
   27882      176649 :   {
   27883      176649 :     const int bLocalUseExceptions = GetUseExceptions();
   27884      176649 :     if ( bLocalUseExceptions ) {
   27885      169648 :       pushErrorHandler();
   27886             :     }
   27887      176649 :     {
   27888      176649 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27889      176649 :       result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
   27890      176649 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27891             :     }
   27892      176649 :     if ( bLocalUseExceptions ) {
   27893      169648 :       popErrorHandler();
   27894             :     }
   27895             : #ifndef SED_HACKS
   27896             :     if ( bLocalUseExceptions ) {
   27897             :       CPLErr eclass = CPLGetLastErrorType();
   27898             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27899             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27900             :       }
   27901             :     }
   27902             : #endif
   27903             :   }
   27904      176649 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27905      176649 :   {
   27906             :     /* %typemap(argout) ( void **outPythonObject ) */
   27907      176649 :     Py_XDECREF(resultobj);
   27908      176649 :     if (*arg6)
   27909             :     {
   27910             :       resultobj = (PyObject*)*arg6;
   27911             :     }
   27912             :     else
   27913             :     {
   27914        1310 :       resultobj = Py_None;
   27915        1310 :       Py_INCREF(resultobj);
   27916             :     }
   27917             :   }
   27918      176649 :   {
   27919             :     /* %typemap(freearg) (int nList, int* pList) */
   27920      176649 :     free(arg11);
   27921             :   }
   27922      176649 :   {
   27923             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27924             :     
   27925      176649 :     CPLFree(psProgressInfo);
   27926             :     
   27927             :   }
   27928      176916 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27929             :   return resultobj;
   27930           5 : fail:
   27931           5 :   {
   27932             :     /* %typemap(freearg) (int nList, int* pList) */
   27933           5 :     free(arg11);
   27934             :   }
   27935           5 :   {
   27936             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27937             :     
   27938           5 :     CPLFree(psProgressInfo);
   27939             :     
   27940             :   }
   27941             :   return NULL;
   27942             : }
   27943             : 
   27944             : 
   27945         277 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27946         277 :   PyObject *obj;
   27947         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   27948         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   27949         277 :   return SWIG_Py_Void();
   27950             : }
   27951             : 
   27952          12 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27953          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27954          12 :   GDALRasterAttributeTableShadow *result = 0 ;
   27955             :   
   27956          12 :   if (!SWIG_Python_UnpackTuple(args, "new_RasterAttributeTable", 0, 0, 0)) SWIG_fail;
   27957          12 :   {
   27958          12 :     const int bLocalUseExceptions = GetUseExceptions();
   27959          12 :     if ( bLocalUseExceptions ) {
   27960          12 :       pushErrorHandler();
   27961             :     }
   27962          12 :     {
   27963          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27964          12 :       result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   27965          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27966             :     }
   27967          12 :     if ( bLocalUseExceptions ) {
   27968          12 :       popErrorHandler();
   27969             :     }
   27970             : #ifndef SED_HACKS
   27971             :     if ( bLocalUseExceptions ) {
   27972             :       CPLErr eclass = CPLGetLastErrorType();
   27973             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27974             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27975             :       }
   27976             :     }
   27977             : #endif
   27978             :   }
   27979          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   27980          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; } }
   27981             :   return resultobj;
   27982           0 : fail:
   27983           0 :   return NULL;
   27984             : }
   27985             : 
   27986             : 
   27987          19 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27988          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27989          19 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27990          19 :   void *argp1 = 0 ;
   27991          19 :   int res1 = 0 ;
   27992          19 :   PyObject *swig_obj[1] ;
   27993             :   
   27994          19 :   if (!args) SWIG_fail;
   27995          19 :   swig_obj[0] = args;
   27996          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   27997          19 :   if (!SWIG_IsOK(res1)) {
   27998           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27999             :   }
   28000          19 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28001          19 :   {
   28002          19 :     const int bLocalUseExceptions = GetUseExceptions();
   28003          19 :     if ( bLocalUseExceptions ) {
   28004          19 :       pushErrorHandler();
   28005             :     }
   28006          19 :     {
   28007          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28008          19 :       delete_GDALRasterAttributeTableShadow(arg1);
   28009          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28010             :     }
   28011          19 :     if ( bLocalUseExceptions ) {
   28012          19 :       popErrorHandler();
   28013             :     }
   28014             : #ifndef SED_HACKS
   28015             :     if ( bLocalUseExceptions ) {
   28016             :       CPLErr eclass = CPLGetLastErrorType();
   28017             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28018             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28019             :       }
   28020             :     }
   28021             : #endif
   28022             :   }
   28023          19 :   resultobj = SWIG_Py_Void();
   28024          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; } }
   28025             :   return resultobj;
   28026             : fail:
   28027             :   return NULL;
   28028             : }
   28029             : 
   28030             : 
   28031           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28032           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28033           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28034           5 :   void *argp1 = 0 ;
   28035           5 :   int res1 = 0 ;
   28036           5 :   PyObject *swig_obj[1] ;
   28037           5 :   GDALRasterAttributeTableShadow *result = 0 ;
   28038             :   
   28039           5 :   if (!args) SWIG_fail;
   28040           5 :   swig_obj[0] = args;
   28041           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28042           5 :   if (!SWIG_IsOK(res1)) {
   28043           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28044             :   }
   28045           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28046           5 :   {
   28047           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28048           5 :     if ( bLocalUseExceptions ) {
   28049           5 :       pushErrorHandler();
   28050             :     }
   28051           5 :     {
   28052           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28053           5 :       result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   28054           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28055             :     }
   28056           5 :     if ( bLocalUseExceptions ) {
   28057           5 :       popErrorHandler();
   28058             :     }
   28059             : #ifndef SED_HACKS
   28060             :     if ( bLocalUseExceptions ) {
   28061             :       CPLErr eclass = CPLGetLastErrorType();
   28062             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28063             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28064             :       }
   28065             :     }
   28066             : #endif
   28067             :   }
   28068           5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   28069           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; } }
   28070             :   return resultobj;
   28071             : fail:
   28072             :   return NULL;
   28073             : }
   28074             : 
   28075             : 
   28076          48 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28077          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28078          48 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28079          48 :   void *argp1 = 0 ;
   28080          48 :   int res1 = 0 ;
   28081          48 :   PyObject *swig_obj[1] ;
   28082          48 :   int result;
   28083             :   
   28084          48 :   if (!args) SWIG_fail;
   28085          48 :   swig_obj[0] = args;
   28086          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28087          48 :   if (!SWIG_IsOK(res1)) {
   28088           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28089             :   }
   28090          48 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28091          48 :   {
   28092          48 :     const int bLocalUseExceptions = GetUseExceptions();
   28093          48 :     if ( bLocalUseExceptions ) {
   28094          47 :       pushErrorHandler();
   28095             :     }
   28096          48 :     {
   28097          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28098          48 :       result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   28099          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28100             :     }
   28101          48 :     if ( bLocalUseExceptions ) {
   28102          47 :       popErrorHandler();
   28103             :     }
   28104             : #ifndef SED_HACKS
   28105             :     if ( bLocalUseExceptions ) {
   28106             :       CPLErr eclass = CPLGetLastErrorType();
   28107             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28108             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28109             :       }
   28110             :     }
   28111             : #endif
   28112             :   }
   28113          48 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28114          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; } }
   28115             :   return resultobj;
   28116             : fail:
   28117             :   return NULL;
   28118             : }
   28119             : 
   28120             : 
   28121         118 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28122         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28123         118 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28124         118 :   int arg2 ;
   28125         118 :   void *argp1 = 0 ;
   28126         118 :   int res1 = 0 ;
   28127         118 :   int val2 ;
   28128         118 :   int ecode2 = 0 ;
   28129         118 :   PyObject *swig_obj[2] ;
   28130         118 :   char *result = 0 ;
   28131             :   
   28132         118 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetNameOfCol", 2, 2, swig_obj)) SWIG_fail;
   28133         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28134         118 :   if (!SWIG_IsOK(res1)) {
   28135           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28136             :   }
   28137         118 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28138         118 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28139         118 :   if (!SWIG_IsOK(ecode2)) {
   28140           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   28141             :   } 
   28142         118 :   arg2 = static_cast< int >(val2);
   28143         118 :   {
   28144         118 :     const int bLocalUseExceptions = GetUseExceptions();
   28145         118 :     if ( bLocalUseExceptions ) {
   28146         115 :       pushErrorHandler();
   28147             :     }
   28148         118 :     {
   28149         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28150         118 :       result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   28151         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28152             :     }
   28153         118 :     if ( bLocalUseExceptions ) {
   28154         115 :       popErrorHandler();
   28155             :     }
   28156             : #ifndef SED_HACKS
   28157             :     if ( bLocalUseExceptions ) {
   28158             :       CPLErr eclass = CPLGetLastErrorType();
   28159             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28160             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28161             :       }
   28162             :     }
   28163             : #endif
   28164             :   }
   28165         118 :   resultobj = SWIG_FromCharPtr((const char *)result);
   28166         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; } }
   28167             :   return resultobj;
   28168             : fail:
   28169             :   return NULL;
   28170             : }
   28171             : 
   28172             : 
   28173          61 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28174          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28175          61 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28176          61 :   int arg2 ;
   28177          61 :   void *argp1 = 0 ;
   28178          61 :   int res1 = 0 ;
   28179          61 :   int val2 ;
   28180          61 :   int ecode2 = 0 ;
   28181          61 :   PyObject *swig_obj[2] ;
   28182          61 :   GDALRATFieldUsage result;
   28183             :   
   28184          61 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetUsageOfCol", 2, 2, swig_obj)) SWIG_fail;
   28185          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28186          61 :   if (!SWIG_IsOK(res1)) {
   28187           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28188             :   }
   28189          61 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28190          61 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28191          61 :   if (!SWIG_IsOK(ecode2)) {
   28192           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   28193             :   } 
   28194          61 :   arg2 = static_cast< int >(val2);
   28195          61 :   {
   28196          61 :     const int bLocalUseExceptions = GetUseExceptions();
   28197          61 :     if ( bLocalUseExceptions ) {
   28198          61 :       pushErrorHandler();
   28199             :     }
   28200          61 :     {
   28201          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28202          61 :       result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   28203          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28204             :     }
   28205          61 :     if ( bLocalUseExceptions ) {
   28206          61 :       popErrorHandler();
   28207             :     }
   28208             : #ifndef SED_HACKS
   28209             :     if ( bLocalUseExceptions ) {
   28210             :       CPLErr eclass = CPLGetLastErrorType();
   28211             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28212             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28213             :       }
   28214             :     }
   28215             : #endif
   28216             :   }
   28217          61 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28218          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; } }
   28219             :   return resultobj;
   28220             : fail:
   28221             :   return NULL;
   28222             : }
   28223             : 
   28224             : 
   28225         254 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28226         254 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28227         254 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28228         254 :   int arg2 ;
   28229         254 :   void *argp1 = 0 ;
   28230         254 :   int res1 = 0 ;
   28231         254 :   int val2 ;
   28232         254 :   int ecode2 = 0 ;
   28233         254 :   PyObject *swig_obj[2] ;
   28234         254 :   GDALRATFieldType result;
   28235             :   
   28236         254 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetTypeOfCol", 2, 2, swig_obj)) SWIG_fail;
   28237         254 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28238         254 :   if (!SWIG_IsOK(res1)) {
   28239           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28240             :   }
   28241         254 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28242         254 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28243         254 :   if (!SWIG_IsOK(ecode2)) {
   28244           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   28245             :   } 
   28246         254 :   arg2 = static_cast< int >(val2);
   28247         254 :   {
   28248         254 :     const int bLocalUseExceptions = GetUseExceptions();
   28249         254 :     if ( bLocalUseExceptions ) {
   28250         251 :       pushErrorHandler();
   28251             :     }
   28252         254 :     {
   28253         254 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28254         254 :       result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   28255         254 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28256             :     }
   28257         254 :     if ( bLocalUseExceptions ) {
   28258         251 :       popErrorHandler();
   28259             :     }
   28260             : #ifndef SED_HACKS
   28261             :     if ( bLocalUseExceptions ) {
   28262             :       CPLErr eclass = CPLGetLastErrorType();
   28263             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28264             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28265             :       }
   28266             :     }
   28267             : #endif
   28268             :   }
   28269         254 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28270         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; } }
   28271             :   return resultobj;
   28272             : fail:
   28273             :   return NULL;
   28274             : }
   28275             : 
   28276             : 
   28277          13 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28278          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28279          13 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28280          13 :   GDALRATFieldUsage arg2 ;
   28281          13 :   void *argp1 = 0 ;
   28282          13 :   int res1 = 0 ;
   28283          13 :   int val2 ;
   28284          13 :   int ecode2 = 0 ;
   28285          13 :   PyObject *swig_obj[2] ;
   28286          13 :   int result;
   28287             :   
   28288          13 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetColOfUsage", 2, 2, swig_obj)) SWIG_fail;
   28289          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28290          13 :   if (!SWIG_IsOK(res1)) {
   28291           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28292             :   }
   28293          13 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28294          13 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28295          13 :   if (!SWIG_IsOK(ecode2)) {
   28296           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   28297             :   } 
   28298          13 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   28299          13 :   {
   28300          13 :     const int bLocalUseExceptions = GetUseExceptions();
   28301          13 :     if ( bLocalUseExceptions ) {
   28302          13 :       pushErrorHandler();
   28303             :     }
   28304          13 :     {
   28305          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28306          13 :       result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   28307          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28308             :     }
   28309          13 :     if ( bLocalUseExceptions ) {
   28310          13 :       popErrorHandler();
   28311             :     }
   28312             : #ifndef SED_HACKS
   28313             :     if ( bLocalUseExceptions ) {
   28314             :       CPLErr eclass = CPLGetLastErrorType();
   28315             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28316             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28317             :       }
   28318             :     }
   28319             : #endif
   28320             :   }
   28321          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28322          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; } }
   28323             :   return resultobj;
   28324             : fail:
   28325             :   return NULL;
   28326             : }
   28327             : 
   28328             : 
   28329         235 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28330         235 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28331         235 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28332         235 :   void *argp1 = 0 ;
   28333         235 :   int res1 = 0 ;
   28334         235 :   PyObject *swig_obj[1] ;
   28335         235 :   int result;
   28336             :   
   28337         235 :   if (!args) SWIG_fail;
   28338         235 :   swig_obj[0] = args;
   28339         235 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28340         235 :   if (!SWIG_IsOK(res1)) {
   28341           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28342             :   }
   28343         235 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28344         235 :   {
   28345         235 :     const int bLocalUseExceptions = GetUseExceptions();
   28346         235 :     if ( bLocalUseExceptions ) {
   28347         234 :       pushErrorHandler();
   28348             :     }
   28349         235 :     {
   28350         235 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28351         235 :       result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   28352         235 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28353             :     }
   28354         235 :     if ( bLocalUseExceptions ) {
   28355         234 :       popErrorHandler();
   28356             :     }
   28357             : #ifndef SED_HACKS
   28358             :     if ( bLocalUseExceptions ) {
   28359             :       CPLErr eclass = CPLGetLastErrorType();
   28360             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28361             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28362             :       }
   28363             :     }
   28364             : #endif
   28365             :   }
   28366         235 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28367         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; } }
   28368             :   return resultobj;
   28369             : fail:
   28370             :   return NULL;
   28371             : }
   28372             : 
   28373             : 
   28374          90 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28375          90 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28376          90 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28377          90 :   int arg2 ;
   28378          90 :   int arg3 ;
   28379          90 :   void *argp1 = 0 ;
   28380          90 :   int res1 = 0 ;
   28381          90 :   int val2 ;
   28382          90 :   int ecode2 = 0 ;
   28383          90 :   int val3 ;
   28384          90 :   int ecode3 = 0 ;
   28385          90 :   PyObject *swig_obj[3] ;
   28386          90 :   char *result = 0 ;
   28387             :   
   28388          90 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsString", 3, 3, swig_obj)) SWIG_fail;
   28389          90 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28390          90 :   if (!SWIG_IsOK(res1)) {
   28391           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28392             :   }
   28393          90 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28394          90 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28395          90 :   if (!SWIG_IsOK(ecode2)) {
   28396           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   28397             :   } 
   28398          90 :   arg2 = static_cast< int >(val2);
   28399          90 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28400          90 :   if (!SWIG_IsOK(ecode3)) {
   28401           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   28402             :   } 
   28403          90 :   arg3 = static_cast< int >(val3);
   28404          90 :   {
   28405          90 :     const int bLocalUseExceptions = GetUseExceptions();
   28406          90 :     if ( bLocalUseExceptions ) {
   28407          89 :       pushErrorHandler();
   28408             :     }
   28409          90 :     {
   28410          90 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28411          90 :       result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   28412          90 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28413             :     }
   28414          90 :     if ( bLocalUseExceptions ) {
   28415          89 :       popErrorHandler();
   28416             :     }
   28417             : #ifndef SED_HACKS
   28418             :     if ( bLocalUseExceptions ) {
   28419             :       CPLErr eclass = CPLGetLastErrorType();
   28420             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28421             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28422             :       }
   28423             :     }
   28424             : #endif
   28425             :   }
   28426          90 :   resultobj = SWIG_FromCharPtr((const char *)result);
   28427          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; } }
   28428             :   return resultobj;
   28429             : fail:
   28430             :   return NULL;
   28431             : }
   28432             : 
   28433             : 
   28434         166 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28435         166 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28436         166 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28437         166 :   int arg2 ;
   28438         166 :   int arg3 ;
   28439         166 :   void *argp1 = 0 ;
   28440         166 :   int res1 = 0 ;
   28441         166 :   int val2 ;
   28442         166 :   int ecode2 = 0 ;
   28443         166 :   int val3 ;
   28444         166 :   int ecode3 = 0 ;
   28445         166 :   PyObject *swig_obj[3] ;
   28446         166 :   int result;
   28447             :   
   28448         166 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsInt", 3, 3, swig_obj)) SWIG_fail;
   28449         166 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28450         166 :   if (!SWIG_IsOK(res1)) {
   28451           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28452             :   }
   28453         166 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28454         166 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28455         166 :   if (!SWIG_IsOK(ecode2)) {
   28456           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   28457             :   } 
   28458         166 :   arg2 = static_cast< int >(val2);
   28459         166 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28460         166 :   if (!SWIG_IsOK(ecode3)) {
   28461           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   28462             :   } 
   28463         166 :   arg3 = static_cast< int >(val3);
   28464         166 :   {
   28465         166 :     const int bLocalUseExceptions = GetUseExceptions();
   28466         166 :     if ( bLocalUseExceptions ) {
   28467         164 :       pushErrorHandler();
   28468             :     }
   28469         166 :     {
   28470         166 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28471         166 :       result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   28472         166 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28473             :     }
   28474         166 :     if ( bLocalUseExceptions ) {
   28475         164 :       popErrorHandler();
   28476             :     }
   28477             : #ifndef SED_HACKS
   28478             :     if ( bLocalUseExceptions ) {
   28479             :       CPLErr eclass = CPLGetLastErrorType();
   28480             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28481             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28482             :       }
   28483             :     }
   28484             : #endif
   28485             :   }
   28486         166 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28487         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; } }
   28488             :   return resultobj;
   28489             : fail:
   28490             :   return NULL;
   28491             : }
   28492             : 
   28493             : 
   28494          92 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28495          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28496          92 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28497          92 :   int arg2 ;
   28498          92 :   int arg3 ;
   28499          92 :   void *argp1 = 0 ;
   28500          92 :   int res1 = 0 ;
   28501          92 :   int val2 ;
   28502          92 :   int ecode2 = 0 ;
   28503          92 :   int val3 ;
   28504          92 :   int ecode3 = 0 ;
   28505          92 :   PyObject *swig_obj[3] ;
   28506          92 :   double result;
   28507             :   
   28508          92 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsDouble", 3, 3, swig_obj)) SWIG_fail;
   28509          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28510          92 :   if (!SWIG_IsOK(res1)) {
   28511           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28512             :   }
   28513          92 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28514          92 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28515          92 :   if (!SWIG_IsOK(ecode2)) {
   28516           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   28517             :   } 
   28518          92 :   arg2 = static_cast< int >(val2);
   28519          92 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28520          92 :   if (!SWIG_IsOK(ecode3)) {
   28521           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   28522             :   } 
   28523          92 :   arg3 = static_cast< int >(val3);
   28524          92 :   {
   28525          92 :     const int bLocalUseExceptions = GetUseExceptions();
   28526          92 :     if ( bLocalUseExceptions ) {
   28527          91 :       pushErrorHandler();
   28528             :     }
   28529          92 :     {
   28530          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28531          92 :       result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   28532          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28533             :     }
   28534          92 :     if ( bLocalUseExceptions ) {
   28535          91 :       popErrorHandler();
   28536             :     }
   28537             : #ifndef SED_HACKS
   28538             :     if ( bLocalUseExceptions ) {
   28539             :       CPLErr eclass = CPLGetLastErrorType();
   28540             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28541             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28542             :       }
   28543             :     }
   28544             : #endif
   28545             :   }
   28546          92 :   resultobj = SWIG_From_double(static_cast< double >(result));
   28547         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; } }
   28548             :   return resultobj;
   28549             : fail:
   28550             :   return NULL;
   28551             : }
   28552             : 
   28553             : 
   28554           9 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28555           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28556           9 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28557           9 :   int arg2 ;
   28558           9 :   int arg3 ;
   28559           9 :   int arg4 ;
   28560           9 :   char **arg5 = (char **) 0 ;
   28561           9 :   void *argp1 = 0 ;
   28562           9 :   int res1 = 0 ;
   28563           9 :   int val2 ;
   28564           9 :   int ecode2 = 0 ;
   28565           9 :   int val3 ;
   28566           9 :   int ecode3 = 0 ;
   28567           9 :   int iLength4 ;
   28568           9 :   PyObject *swig_obj[4] ;
   28569           9 :   CPLErr result;
   28570             :   
   28571           9 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsString", 4, 4, swig_obj)) SWIG_fail;
   28572           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28573           9 :   if (!SWIG_IsOK(res1)) {
   28574           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28575             :   }
   28576           9 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28577           9 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28578           9 :   if (!SWIG_IsOK(ecode2)) {
   28579           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "2"" of type '" "int""'");
   28580             :   } 
   28581           9 :   arg2 = static_cast< int >(val2);
   28582           9 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28583           9 :   if (!SWIG_IsOK(ecode3)) {
   28584           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "3"" of type '" "int""'");
   28585             :   } 
   28586           9 :   arg3 = static_cast< int >(val3);
   28587           9 :   {
   28588             :     /* %typemap(in,numinputs=1) (int iLength4, char **ppszData) (int iLength4) */
   28589           9 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) )
   28590             :     {
   28591           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28592           0 :       SWIG_fail;
   28593             :     }
   28594           9 :     if( iLength4 <= 0 || iLength4 > INT_MAX - 1 )
   28595             :     {
   28596           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28597           1 :       SWIG_fail;
   28598             :     }
   28599           8 :     arg4 = iLength4;
   28600           8 :     arg5 = (char**)VSICalloc(iLength4 + 1, sizeof(char*));
   28601           8 :     if( !arg5 )
   28602             :     {
   28603           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28604           0 :       SWIG_fail;
   28605             :     }
   28606             :   }
   28607           8 :   {
   28608           8 :     const int bLocalUseExceptions = GetUseExceptions();
   28609           8 :     if ( bLocalUseExceptions ) {
   28610           8 :       pushErrorHandler();
   28611             :     }
   28612           8 :     {
   28613           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28614           8 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsString(arg1,arg2,arg3,arg4,arg5);
   28615           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28616             :     }
   28617           8 :     if ( bLocalUseExceptions ) {
   28618           8 :       popErrorHandler();
   28619             :     }
   28620             : #ifndef SED_HACKS
   28621             :     if ( bLocalUseExceptions ) {
   28622             :       CPLErr eclass = CPLGetLastErrorType();
   28623             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28624             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28625             :       }
   28626             :     }
   28627             : #endif
   28628             :   }
   28629           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28630           8 :   {
   28631             :     /* %typemap(argout) (int iLength, char **ppszData) */
   28632           8 :     Py_DECREF(resultobj);
   28633           8 :     PyObject *out = PyList_New( arg4 );
   28634           8 :     if( !out ) {
   28635           0 :       SWIG_fail;
   28636             :     }
   28637          27 :     for( int i=0; i<arg4; i++ ) {
   28638          19 :       if( arg5[i] )
   28639             :       {
   28640          13 :         PyObject *val = GDALPythonObjectFromCStr( arg5[i] );
   28641          13 :         PyList_SetItem( out, i, val );
   28642             :       }
   28643             :       else
   28644             :       {
   28645           6 :         Py_INCREF(Py_None);
   28646           6 :         PyList_SetItem( out, i, Py_None );
   28647             :       }
   28648             :     }
   28649           8 :     resultobj = out;
   28650             :   }
   28651           8 :   {
   28652             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28653           8 :     CSLDestroy(arg5);
   28654             :   }
   28655          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; } }
   28656             :   return resultobj;
   28657           1 : fail:
   28658           1 :   {
   28659             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28660           1 :     CSLDestroy(arg5);
   28661             :   }
   28662             :   return NULL;
   28663             : }
   28664             : 
   28665             : 
   28666          11 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28667          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28668          11 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28669          11 :   int arg2 ;
   28670          11 :   int arg3 ;
   28671          11 :   int arg4 ;
   28672          11 :   int *arg5 = (int *) 0 ;
   28673          11 :   void *argp1 = 0 ;
   28674          11 :   int res1 = 0 ;
   28675          11 :   int val2 ;
   28676          11 :   int ecode2 = 0 ;
   28677          11 :   int val3 ;
   28678          11 :   int ecode3 = 0 ;
   28679          11 :   int iLength4 ;
   28680          11 :   PyObject *swig_obj[4] ;
   28681          11 :   CPLErr result;
   28682             :   
   28683          11 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsInteger", 4, 4, swig_obj)) SWIG_fail;
   28684          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28685          11 :   if (!SWIG_IsOK(res1)) {
   28686           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28687             :   }
   28688          11 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28689          11 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28690          11 :   if (!SWIG_IsOK(ecode2)) {
   28691           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "2"" of type '" "int""'");
   28692             :   } 
   28693          11 :   arg2 = static_cast< int >(val2);
   28694          11 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28695          11 :   if (!SWIG_IsOK(ecode3)) {
   28696           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "3"" of type '" "int""'");
   28697             :   } 
   28698          11 :   arg3 = static_cast< int >(val3);
   28699          11 :   {
   28700             :     /* %typemap(in,numinputs=1) (int iLength4, int *pnData) (int iLength4) */
   28701          11 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28702           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28703           0 :       SWIG_fail;
   28704             :     }
   28705          11 :     if( iLength4 <= 0 )
   28706             :     {
   28707           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28708           1 :       SWIG_fail;
   28709             :     }
   28710          10 :     arg4 = iLength4;
   28711          10 :     arg5 = (int*)VSICalloc(iLength4, sizeof(int));
   28712          10 :     if( !arg5 )
   28713             :     {
   28714           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28715           0 :       SWIG_fail;
   28716             :     }
   28717             :   }
   28718          10 :   {
   28719          10 :     const int bLocalUseExceptions = GetUseExceptions();
   28720          10 :     if ( bLocalUseExceptions ) {
   28721          10 :       pushErrorHandler();
   28722             :     }
   28723          10 :     {
   28724          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28725          10 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(arg1,arg2,arg3,arg4,arg5);
   28726          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28727             :     }
   28728          10 :     if ( bLocalUseExceptions ) {
   28729          10 :       popErrorHandler();
   28730             :     }
   28731             : #ifndef SED_HACKS
   28732             :     if ( bLocalUseExceptions ) {
   28733             :       CPLErr eclass = CPLGetLastErrorType();
   28734             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28735             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28736             :       }
   28737             :     }
   28738             : #endif
   28739             :   }
   28740          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28741          10 :   {
   28742             :     /* %typemap(argout) (int iLength, int *pnData) */
   28743          10 :     Py_DECREF(resultobj);
   28744          10 :     PyObject *out = PyList_New( arg4 );
   28745          10 :     if( !out ) {
   28746           0 :       SWIG_fail;
   28747             :     }
   28748          39 :     for( int i=0; i<arg4; i++ ) {
   28749          29 :       PyObject *val = PyLong_FromLong( (arg5)[i] );
   28750          29 :       PyList_SetItem( out, i, val );
   28751             :     }
   28752          10 :     resultobj = out;
   28753             :   }
   28754          10 :   {
   28755             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28756          10 :     CPLFree(arg5);
   28757             :   }
   28758          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; } }
   28759             :   return resultobj;
   28760           1 : fail:
   28761           1 :   {
   28762             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28763           1 :     CPLFree(arg5);
   28764             :   }
   28765             :   return NULL;
   28766             : }
   28767             : 
   28768             : 
   28769           9 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28770           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28771           9 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28772           9 :   int arg2 ;
   28773           9 :   int arg3 ;
   28774           9 :   int arg4 ;
   28775           9 :   double *arg5 = (double *) 0 ;
   28776           9 :   void *argp1 = 0 ;
   28777           9 :   int res1 = 0 ;
   28778           9 :   int val2 ;
   28779           9 :   int ecode2 = 0 ;
   28780           9 :   int val3 ;
   28781           9 :   int ecode3 = 0 ;
   28782           9 :   int iLength4 ;
   28783           9 :   PyObject *swig_obj[4] ;
   28784           9 :   CPLErr result;
   28785             :   
   28786           9 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsDouble", 4, 4, swig_obj)) SWIG_fail;
   28787           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28788           9 :   if (!SWIG_IsOK(res1)) {
   28789           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28790             :   }
   28791           9 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28792           9 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28793           9 :   if (!SWIG_IsOK(ecode2)) {
   28794           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "2"" of type '" "int""'");
   28795             :   } 
   28796           9 :   arg2 = static_cast< int >(val2);
   28797           9 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28798           9 :   if (!SWIG_IsOK(ecode3)) {
   28799           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "3"" of type '" "int""'");
   28800             :   } 
   28801           9 :   arg3 = static_cast< int >(val3);
   28802           9 :   {
   28803             :     /* %typemap(in,numinputs=1) (int iLength4, double *pdfData) (int iLength4) */
   28804           9 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28805           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28806           0 :       SWIG_fail;
   28807             :     }
   28808           9 :     if( iLength4 <= 0 )
   28809             :     {
   28810           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28811           1 :       SWIG_fail;
   28812             :     }
   28813           8 :     arg4 = iLength4;
   28814           8 :     arg5 = (double*)CPLCalloc(iLength4, sizeof(double));
   28815           8 :     if( !arg5 )
   28816             :     {
   28817           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28818           0 :       SWIG_fail;
   28819             :     }
   28820             :   }
   28821           8 :   {
   28822           8 :     const int bLocalUseExceptions = GetUseExceptions();
   28823           8 :     if ( bLocalUseExceptions ) {
   28824           8 :       pushErrorHandler();
   28825             :     }
   28826           8 :     {
   28827           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28828           8 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(arg1,arg2,arg3,arg4,arg5);
   28829           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28830             :     }
   28831           8 :     if ( bLocalUseExceptions ) {
   28832           8 :       popErrorHandler();
   28833             :     }
   28834             : #ifndef SED_HACKS
   28835             :     if ( bLocalUseExceptions ) {
   28836             :       CPLErr eclass = CPLGetLastErrorType();
   28837             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28838             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28839             :       }
   28840             :     }
   28841             : #endif
   28842             :   }
   28843           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28844           8 :   {
   28845             :     /* %typemap(argout) (int iLength, double *pdfData)  */
   28846           8 :     Py_DECREF(resultobj);
   28847           8 :     PyObject *out = PyList_New( arg4 );
   28848           8 :     if( !out ) {
   28849           0 :       SWIG_fail;
   28850             :     }
   28851          27 :     for( int i=0; i<arg4; i++ ) {
   28852          19 :       PyObject *val = PyFloat_FromDouble( (arg5)[i] );
   28853          19 :       PyList_SetItem( out, i, val );
   28854             :     }
   28855           8 :     resultobj = out;
   28856             :   }
   28857           8 :   {
   28858             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28859           8 :     CPLFree(arg5);
   28860             :   }
   28861          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; } }
   28862             :   return resultobj;
   28863           1 : fail:
   28864           1 :   {
   28865             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28866           1 :     CPLFree(arg5);
   28867             :   }
   28868             :   return NULL;
   28869             : }
   28870             : 
   28871             : 
   28872          37 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28873          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28874          37 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28875          37 :   int arg2 ;
   28876          37 :   int arg3 ;
   28877          37 :   char *arg4 = (char *) 0 ;
   28878          37 :   void *argp1 = 0 ;
   28879          37 :   int res1 = 0 ;
   28880          37 :   int val2 ;
   28881          37 :   int ecode2 = 0 ;
   28882          37 :   int val3 ;
   28883          37 :   int ecode3 = 0 ;
   28884          37 :   PyObject *str4 = 0 ;
   28885          37 :   int bToFree4 = 0 ;
   28886          37 :   PyObject *swig_obj[4] ;
   28887             :   
   28888          37 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsString", 4, 4, swig_obj)) SWIG_fail;
   28889          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28890          37 :   if (!SWIG_IsOK(res1)) {
   28891           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28892             :   }
   28893          37 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28894          37 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28895          37 :   if (!SWIG_IsOK(ecode2)) {
   28896           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   28897             :   } 
   28898          37 :   arg2 = static_cast< int >(val2);
   28899          37 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28900          37 :   if (!SWIG_IsOK(ecode3)) {
   28901           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   28902             :   } 
   28903          37 :   arg3 = static_cast< int >(val3);
   28904          37 :   {
   28905             :     /* %typemap(in) (tostring argin) */
   28906          37 :     str4 = PyObject_Str( swig_obj[3] );
   28907          37 :     if ( str4 == 0 ) {
   28908           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   28909           0 :       SWIG_fail;
   28910             :     }
   28911             :     
   28912          37 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4);
   28913             :   }
   28914          37 :   {
   28915          37 :     const int bLocalUseExceptions = GetUseExceptions();
   28916          37 :     if ( bLocalUseExceptions ) {
   28917          37 :       pushErrorHandler();
   28918             :     }
   28919          37 :     {
   28920          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28921          37 :       GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   28922          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28923             :     }
   28924          37 :     if ( bLocalUseExceptions ) {
   28925          37 :       popErrorHandler();
   28926             :     }
   28927             : #ifndef SED_HACKS
   28928             :     if ( bLocalUseExceptions ) {
   28929             :       CPLErr eclass = CPLGetLastErrorType();
   28930             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28931             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28932             :       }
   28933             :     }
   28934             : #endif
   28935             :   }
   28936          37 :   resultobj = SWIG_Py_Void();
   28937          37 :   {
   28938             :     /* %typemap(freearg) (tostring argin) */
   28939          37 :     if ( str4 != NULL)
   28940             :     {
   28941          37 :       Py_DECREF(str4);
   28942             :     }
   28943          37 :     GDALPythonFreeCStr(arg4, bToFree4);
   28944             :   }
   28945          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; } }
   28946             :   return resultobj;
   28947           0 : fail:
   28948           0 :   {
   28949             :     /* %typemap(freearg) (tostring argin) */
   28950           0 :     if ( str4 != NULL)
   28951             :     {
   28952           0 :       Py_DECREF(str4);
   28953             :     }
   28954          37 :     GDALPythonFreeCStr(arg4, bToFree4);
   28955             :   }
   28956             :   return NULL;
   28957             : }
   28958             : 
   28959             : 
   28960          49 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28961          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28962          49 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28963          49 :   int arg2 ;
   28964          49 :   int arg3 ;
   28965          49 :   int arg4 ;
   28966          49 :   void *argp1 = 0 ;
   28967          49 :   int res1 = 0 ;
   28968          49 :   int val2 ;
   28969          49 :   int ecode2 = 0 ;
   28970          49 :   int val3 ;
   28971          49 :   int ecode3 = 0 ;
   28972          49 :   int val4 ;
   28973          49 :   int ecode4 = 0 ;
   28974          49 :   PyObject *swig_obj[4] ;
   28975             :   
   28976          49 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsInt", 4, 4, swig_obj)) SWIG_fail;
   28977          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28978          49 :   if (!SWIG_IsOK(res1)) {
   28979           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28980             :   }
   28981          49 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28982          49 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28983          49 :   if (!SWIG_IsOK(ecode2)) {
   28984           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   28985             :   } 
   28986          49 :   arg2 = static_cast< int >(val2);
   28987          49 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28988          49 :   if (!SWIG_IsOK(ecode3)) {
   28989           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   28990             :   } 
   28991          49 :   arg3 = static_cast< int >(val3);
   28992          49 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   28993          49 :   if (!SWIG_IsOK(ecode4)) {
   28994           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   28995             :   } 
   28996          49 :   arg4 = static_cast< int >(val4);
   28997          49 :   {
   28998          49 :     const int bLocalUseExceptions = GetUseExceptions();
   28999          49 :     if ( bLocalUseExceptions ) {
   29000          49 :       pushErrorHandler();
   29001             :     }
   29002          49 :     {
   29003          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29004          49 :       GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   29005          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29006             :     }
   29007          49 :     if ( bLocalUseExceptions ) {
   29008          49 :       popErrorHandler();
   29009             :     }
   29010             : #ifndef SED_HACKS
   29011             :     if ( bLocalUseExceptions ) {
   29012             :       CPLErr eclass = CPLGetLastErrorType();
   29013             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29014             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29015             :       }
   29016             :     }
   29017             : #endif
   29018             :   }
   29019          49 :   resultobj = SWIG_Py_Void();
   29020          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; } }
   29021             :   return resultobj;
   29022             : fail:
   29023             :   return NULL;
   29024             : }
   29025             : 
   29026             : 
   29027          35 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29028          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29029          35 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29030          35 :   int arg2 ;
   29031          35 :   int arg3 ;
   29032          35 :   double arg4 ;
   29033          35 :   void *argp1 = 0 ;
   29034          35 :   int res1 = 0 ;
   29035          35 :   int val2 ;
   29036          35 :   int ecode2 = 0 ;
   29037          35 :   int val3 ;
   29038          35 :   int ecode3 = 0 ;
   29039          35 :   double val4 ;
   29040          35 :   int ecode4 = 0 ;
   29041          35 :   PyObject *swig_obj[4] ;
   29042             :   
   29043          35 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsDouble", 4, 4, swig_obj)) SWIG_fail;
   29044          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29045          35 :   if (!SWIG_IsOK(res1)) {
   29046           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29047             :   }
   29048          35 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29049          35 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   29050          35 :   if (!SWIG_IsOK(ecode2)) {
   29051           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   29052             :   } 
   29053          35 :   arg2 = static_cast< int >(val2);
   29054          35 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   29055          35 :   if (!SWIG_IsOK(ecode3)) {
   29056           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   29057             :   } 
   29058          35 :   arg3 = static_cast< int >(val3);
   29059          35 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   29060          35 :   if (!SWIG_IsOK(ecode4)) {
   29061           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   29062             :   } 
   29063          35 :   arg4 = static_cast< double >(val4);
   29064          35 :   {
   29065          35 :     const int bLocalUseExceptions = GetUseExceptions();
   29066          35 :     if ( bLocalUseExceptions ) {
   29067          35 :       pushErrorHandler();
   29068             :     }
   29069          35 :     {
   29070          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29071          35 :       GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   29072          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29073             :     }
   29074          35 :     if ( bLocalUseExceptions ) {
   29075          35 :       popErrorHandler();
   29076             :     }
   29077             : #ifndef SED_HACKS
   29078             :     if ( bLocalUseExceptions ) {
   29079             :       CPLErr eclass = CPLGetLastErrorType();
   29080             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29081             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29082             :       }
   29083             :     }
   29084             : #endif
   29085             :   }
   29086          35 :   resultobj = SWIG_Py_Void();
   29087          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; } }
   29088             :   return resultobj;
   29089             : fail:
   29090             :   return NULL;
   29091             : }
   29092             : 
   29093             : 
   29094           7 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29095           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29096           7 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29097           7 :   int arg2 ;
   29098           7 :   void *argp1 = 0 ;
   29099           7 :   int res1 = 0 ;
   29100           7 :   int val2 ;
   29101           7 :   int ecode2 = 0 ;
   29102           7 :   PyObject *swig_obj[2] ;
   29103             :   
   29104           7 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetRowCount", 2, 2, swig_obj)) SWIG_fail;
   29105           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29106           7 :   if (!SWIG_IsOK(res1)) {
   29107           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29108             :   }
   29109           7 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29110           7 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   29111           7 :   if (!SWIG_IsOK(ecode2)) {
   29112           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   29113             :   } 
   29114           7 :   arg2 = static_cast< int >(val2);
   29115           7 :   {
   29116           7 :     const int bLocalUseExceptions = GetUseExceptions();
   29117           7 :     if ( bLocalUseExceptions ) {
   29118           7 :       pushErrorHandler();
   29119             :     }
   29120           7 :     {
   29121           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29122           7 :       GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   29123           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29124             :     }
   29125           7 :     if ( bLocalUseExceptions ) {
   29126           7 :       popErrorHandler();
   29127             :     }
   29128             : #ifndef SED_HACKS
   29129             :     if ( bLocalUseExceptions ) {
   29130             :       CPLErr eclass = CPLGetLastErrorType();
   29131             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29132             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29133             :       }
   29134             :     }
   29135             : #endif
   29136             :   }
   29137           7 :   resultobj = SWIG_Py_Void();
   29138           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; } }
   29139             :   return resultobj;
   29140             : fail:
   29141             :   return NULL;
   29142             : }
   29143             : 
   29144             : 
   29145          31 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29146          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29147          31 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29148          31 :   char *arg2 = (char *) 0 ;
   29149          31 :   GDALRATFieldType arg3 ;
   29150          31 :   GDALRATFieldUsage arg4 ;
   29151          31 :   void *argp1 = 0 ;
   29152          31 :   int res1 = 0 ;
   29153          31 :   int res2 ;
   29154          31 :   char *buf2 = 0 ;
   29155          31 :   int alloc2 = 0 ;
   29156          31 :   int val3 ;
   29157          31 :   int ecode3 = 0 ;
   29158          31 :   int val4 ;
   29159          31 :   int ecode4 = 0 ;
   29160          31 :   PyObject *swig_obj[4] ;
   29161          31 :   int result;
   29162             :   
   29163          31 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_CreateColumn", 4, 4, swig_obj)) SWIG_fail;
   29164          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29165          31 :   if (!SWIG_IsOK(res1)) {
   29166           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29167             :   }
   29168          31 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29169          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29170          31 :   if (!SWIG_IsOK(res2)) {
   29171           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   29172             :   }
   29173          31 :   arg2 = reinterpret_cast< char * >(buf2);
   29174          31 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   29175          31 :   if (!SWIG_IsOK(ecode3)) {
   29176           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   29177             :   } 
   29178          31 :   arg3 = static_cast< GDALRATFieldType >(val3);
   29179          31 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   29180          31 :   if (!SWIG_IsOK(ecode4)) {
   29181           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   29182             :   } 
   29183          31 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   29184          31 :   {
   29185          31 :     const int bLocalUseExceptions = GetUseExceptions();
   29186          31 :     if ( bLocalUseExceptions ) {
   29187          31 :       pushErrorHandler();
   29188             :     }
   29189          31 :     {
   29190          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29191          31 :       result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   29192          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29193             :     }
   29194          31 :     if ( bLocalUseExceptions ) {
   29195          31 :       popErrorHandler();
   29196             :     }
   29197             : #ifndef SED_HACKS
   29198             :     if ( bLocalUseExceptions ) {
   29199             :       CPLErr eclass = CPLGetLastErrorType();
   29200             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29201             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29202             :       }
   29203             :     }
   29204             : #endif
   29205             :   }
   29206          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29207          31 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29208          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; } }
   29209             :   return resultobj;
   29210           0 : fail:
   29211           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29212             :   return NULL;
   29213             : }
   29214             : 
   29215             : 
   29216           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29217           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29218           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29219           1 :   double *arg2 = (double *) 0 ;
   29220           1 :   double *arg3 = (double *) 0 ;
   29221           1 :   void *argp1 = 0 ;
   29222           1 :   int res1 = 0 ;
   29223           1 :   double temp2 ;
   29224           1 :   int res2 = SWIG_TMPOBJ ;
   29225           1 :   double temp3 ;
   29226           1 :   int res3 = SWIG_TMPOBJ ;
   29227           1 :   PyObject *swig_obj[1] ;
   29228           1 :   bool result;
   29229             :   
   29230           1 :   arg2 = &temp2;
   29231           1 :   arg3 = &temp3;
   29232           1 :   if (!args) SWIG_fail;
   29233           1 :   swig_obj[0] = args;
   29234           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29235           1 :   if (!SWIG_IsOK(res1)) {
   29236           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29237             :   }
   29238           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29239           1 :   {
   29240           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29241           1 :     if ( bLocalUseExceptions ) {
   29242           1 :       pushErrorHandler();
   29243             :     }
   29244           1 :     {
   29245           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29246           1 :       result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   29247           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29248             :     }
   29249           1 :     if ( bLocalUseExceptions ) {
   29250           1 :       popErrorHandler();
   29251             :     }
   29252             : #ifndef SED_HACKS
   29253             :     if ( bLocalUseExceptions ) {
   29254             :       CPLErr eclass = CPLGetLastErrorType();
   29255             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29256             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29257             :       }
   29258             :     }
   29259             : #endif
   29260             :   }
   29261           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   29262           1 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   29263           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   29264             :   } else {
   29265           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   29266           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   29267             :   }
   29268           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   29269           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   29270             :   } else {
   29271           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   29272           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   29273             :   }
   29274           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; } }
   29275             :   return resultobj;
   29276             : fail:
   29277             :   return NULL;
   29278             : }
   29279             : 
   29280             : 
   29281           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29282           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29283           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29284           1 :   double arg2 ;
   29285           1 :   double arg3 ;
   29286           1 :   void *argp1 = 0 ;
   29287           1 :   int res1 = 0 ;
   29288           1 :   double val2 ;
   29289           1 :   int ecode2 = 0 ;
   29290           1 :   double val3 ;
   29291           1 :   int ecode3 = 0 ;
   29292           1 :   PyObject *swig_obj[3] ;
   29293           1 :   int result;
   29294             :   
   29295           1 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetLinearBinning", 3, 3, swig_obj)) SWIG_fail;
   29296           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29297           1 :   if (!SWIG_IsOK(res1)) {
   29298           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29299             :   }
   29300           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29301           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   29302           1 :   if (!SWIG_IsOK(ecode2)) {
   29303           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   29304             :   } 
   29305           1 :   arg2 = static_cast< double >(val2);
   29306           1 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   29307           1 :   if (!SWIG_IsOK(ecode3)) {
   29308           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   29309             :   } 
   29310           1 :   arg3 = static_cast< double >(val3);
   29311           1 :   {
   29312           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29313           1 :     if ( bLocalUseExceptions ) {
   29314           1 :       pushErrorHandler();
   29315             :     }
   29316           1 :     {
   29317           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29318           1 :       result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   29319           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29320             :     }
   29321           1 :     if ( bLocalUseExceptions ) {
   29322           1 :       popErrorHandler();
   29323             :     }
   29324             : #ifndef SED_HACKS
   29325             :     if ( bLocalUseExceptions ) {
   29326             :       CPLErr eclass = CPLGetLastErrorType();
   29327             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29328             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29329             :       }
   29330             :     }
   29331             : #endif
   29332             :   }
   29333           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29334           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; } }
   29335             :   return resultobj;
   29336             : fail:
   29337             :   return NULL;
   29338             : }
   29339             : 
   29340             : 
   29341           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29342           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29343           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29344           3 :   double arg2 ;
   29345           3 :   void *argp1 = 0 ;
   29346           3 :   int res1 = 0 ;
   29347           3 :   double val2 ;
   29348           3 :   int ecode2 = 0 ;
   29349           3 :   PyObject *swig_obj[2] ;
   29350           3 :   int result;
   29351             :   
   29352           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetRowOfValue", 2, 2, swig_obj)) SWIG_fail;
   29353           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29354           3 :   if (!SWIG_IsOK(res1)) {
   29355           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29356             :   }
   29357           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29358           3 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   29359           3 :   if (!SWIG_IsOK(ecode2)) {
   29360           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   29361             :   } 
   29362           3 :   arg2 = static_cast< double >(val2);
   29363           3 :   {
   29364           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29365           3 :     if ( bLocalUseExceptions ) {
   29366           3 :       pushErrorHandler();
   29367             :     }
   29368           3 :     {
   29369           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29370           3 :       result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   29371           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29372             :     }
   29373           3 :     if ( bLocalUseExceptions ) {
   29374           3 :       popErrorHandler();
   29375             :     }
   29376             : #ifndef SED_HACKS
   29377             :     if ( bLocalUseExceptions ) {
   29378             :       CPLErr eclass = CPLGetLastErrorType();
   29379             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29380             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29381             :       }
   29382             :     }
   29383             : #endif
   29384             :   }
   29385           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29386           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; } }
   29387             :   return resultobj;
   29388             : fail:
   29389             :   return NULL;
   29390             : }
   29391             : 
   29392             : 
   29393           2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ChangesAreWrittenToFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29394           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29395           2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29396           2 :   void *argp1 = 0 ;
   29397           2 :   int res1 = 0 ;
   29398           2 :   PyObject *swig_obj[1] ;
   29399           2 :   int result;
   29400             :   
   29401           2 :   if (!args) SWIG_fail;
   29402           2 :   swig_obj[0] = args;
   29403           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29404           2 :   if (!SWIG_IsOK(res1)) {
   29405           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ChangesAreWrittenToFile" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29406             :   }
   29407           2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29408           2 :   {
   29409           2 :     const int bLocalUseExceptions = GetUseExceptions();
   29410           2 :     if ( bLocalUseExceptions ) {
   29411           2 :       pushErrorHandler();
   29412             :     }
   29413           2 :     {
   29414           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29415           2 :       result = (int)GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(arg1);
   29416           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29417             :     }
   29418           2 :     if ( bLocalUseExceptions ) {
   29419           2 :       popErrorHandler();
   29420             :     }
   29421             : #ifndef SED_HACKS
   29422             :     if ( bLocalUseExceptions ) {
   29423             :       CPLErr eclass = CPLGetLastErrorType();
   29424             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29425             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29426             :       }
   29427             :     }
   29428             : #endif
   29429             :   }
   29430           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29431           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; } }
   29432             :   return resultobj;
   29433             : fail:
   29434             :   return NULL;
   29435             : }
   29436             : 
   29437             : 
   29438           0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29439           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29440           0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29441           0 :   void *argp1 = 0 ;
   29442           0 :   int res1 = 0 ;
   29443           0 :   PyObject *swig_obj[1] ;
   29444             :   
   29445           0 :   if (!args) SWIG_fail;
   29446           0 :   swig_obj[0] = args;
   29447           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29448           0 :   if (!SWIG_IsOK(res1)) {
   29449           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_DumpReadable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29450             :   }
   29451           0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29452           0 :   {
   29453           0 :     const int bLocalUseExceptions = GetUseExceptions();
   29454           0 :     if ( bLocalUseExceptions ) {
   29455           0 :       pushErrorHandler();
   29456             :     }
   29457           0 :     {
   29458           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29459           0 :       GDALRasterAttributeTableShadow_DumpReadable(arg1);
   29460           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29461             :     }
   29462           0 :     if ( bLocalUseExceptions ) {
   29463           0 :       popErrorHandler();
   29464             :     }
   29465             : #ifndef SED_HACKS
   29466             :     if ( bLocalUseExceptions ) {
   29467             :       CPLErr eclass = CPLGetLastErrorType();
   29468             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29469             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29470             :       }
   29471             :     }
   29472             : #endif
   29473             :   }
   29474           0 :   resultobj = SWIG_Py_Void();
   29475           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; } }
   29476             :   return resultobj;
   29477             : fail:
   29478             :   return NULL;
   29479             : }
   29480             : 
   29481             : 
   29482           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29483           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29484           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29485           3 :   GDALRATTableType arg2 ;
   29486           3 :   void *argp1 = 0 ;
   29487           3 :   int res1 = 0 ;
   29488           3 :   int val2 ;
   29489           3 :   int ecode2 = 0 ;
   29490           3 :   PyObject *swig_obj[2] ;
   29491             :   
   29492           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetTableType", 2, 2, swig_obj)) SWIG_fail;
   29493           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29494           3 :   if (!SWIG_IsOK(res1)) {
   29495           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29496             :   }
   29497           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29498           3 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   29499           3 :   if (!SWIG_IsOK(ecode2)) {
   29500           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetTableType" "', argument " "2"" of type '" "GDALRATTableType""'");
   29501             :   } 
   29502           3 :   arg2 = static_cast< GDALRATTableType >(val2);
   29503           3 :   {
   29504           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29505           3 :     if ( bLocalUseExceptions ) {
   29506           3 :       pushErrorHandler();
   29507             :     }
   29508           3 :     {
   29509           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29510           3 :       GDALRasterAttributeTableShadow_SetTableType(arg1,arg2);
   29511           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29512             :     }
   29513           3 :     if ( bLocalUseExceptions ) {
   29514           3 :       popErrorHandler();
   29515             :     }
   29516             : #ifndef SED_HACKS
   29517             :     if ( bLocalUseExceptions ) {
   29518             :       CPLErr eclass = CPLGetLastErrorType();
   29519             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29520             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29521             :       }
   29522             :     }
   29523             : #endif
   29524             :   }
   29525           3 :   resultobj = SWIG_Py_Void();
   29526           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; } }
   29527             :   return resultobj;
   29528             : fail:
   29529             :   return NULL;
   29530             : }
   29531             : 
   29532             : 
   29533          10 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29534          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29535          10 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29536          10 :   void *argp1 = 0 ;
   29537          10 :   int res1 = 0 ;
   29538          10 :   PyObject *swig_obj[1] ;
   29539          10 :   GDALRATTableType result;
   29540             :   
   29541          10 :   if (!args) SWIG_fail;
   29542          10 :   swig_obj[0] = args;
   29543          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29544          10 :   if (!SWIG_IsOK(res1)) {
   29545           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29546             :   }
   29547          10 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29548          10 :   {
   29549          10 :     const int bLocalUseExceptions = GetUseExceptions();
   29550          10 :     if ( bLocalUseExceptions ) {
   29551          10 :       pushErrorHandler();
   29552             :     }
   29553          10 :     {
   29554          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29555          10 :       result = (GDALRATTableType)GDALRasterAttributeTableShadow_GetTableType(arg1);
   29556          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29557             :     }
   29558          10 :     if ( bLocalUseExceptions ) {
   29559          10 :       popErrorHandler();
   29560             :     }
   29561             : #ifndef SED_HACKS
   29562             :     if ( bLocalUseExceptions ) {
   29563             :       CPLErr eclass = CPLGetLastErrorType();
   29564             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29565             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29566             :       }
   29567             :     }
   29568             : #endif
   29569             :   }
   29570          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29571          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; } }
   29572             :   return resultobj;
   29573             : fail:
   29574             :   return NULL;
   29575             : }
   29576             : 
   29577             : 
   29578           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_RemoveStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29579           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29580           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29581           1 :   void *argp1 = 0 ;
   29582           1 :   int res1 = 0 ;
   29583           1 :   PyObject *swig_obj[1] ;
   29584             :   
   29585           1 :   if (!args) SWIG_fail;
   29586           1 :   swig_obj[0] = args;
   29587           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29588           1 :   if (!SWIG_IsOK(res1)) {
   29589           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_RemoveStatistics" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29590             :   }
   29591           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29592           1 :   {
   29593           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29594           1 :     if ( bLocalUseExceptions ) {
   29595           1 :       pushErrorHandler();
   29596             :     }
   29597           1 :     {
   29598           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29599           1 :       GDALRasterAttributeTableShadow_RemoveStatistics(arg1);
   29600           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29601             :     }
   29602           1 :     if ( bLocalUseExceptions ) {
   29603           1 :       popErrorHandler();
   29604             :     }
   29605             : #ifndef SED_HACKS
   29606             :     if ( bLocalUseExceptions ) {
   29607             :       CPLErr eclass = CPLGetLastErrorType();
   29608             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29609             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29610             :       }
   29611             :     }
   29612             : #endif
   29613             :   }
   29614           1 :   resultobj = SWIG_Py_Void();
   29615           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; } }
   29616             :   return resultobj;
   29617             : fail:
   29618             :   return NULL;
   29619             : }
   29620             : 
   29621             : 
   29622         277 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29623         277 :   PyObject *obj;
   29624         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   29625         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   29626         277 :   return SWIG_Py_Void();
   29627             : }
   29628             : 
   29629          12 : SWIGINTERN PyObject *RasterAttributeTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29630          12 :   return SWIG_Python_InitShadowInstance(args);
   29631             : }
   29632             : 
   29633        1455 : SWIGINTERN PyObject *_wrap_delete_Group(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29634        1455 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29635        1455 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29636        1455 :   void *argp1 = 0 ;
   29637        1455 :   int res1 = 0 ;
   29638        1455 :   PyObject *swig_obj[1] ;
   29639             :   
   29640        1455 :   if (!args) SWIG_fail;
   29641        1455 :   swig_obj[0] = args;
   29642        1455 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_DISOWN |  0 );
   29643        1455 :   if (!SWIG_IsOK(res1)) {
   29644           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Group" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29645             :   }
   29646        1455 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29647        1455 :   {
   29648        1455 :     const int bLocalUseExceptions = GetUseExceptions();
   29649        1455 :     if ( bLocalUseExceptions ) {
   29650         523 :       pushErrorHandler();
   29651             :     }
   29652        1455 :     {
   29653        1455 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29654        1455 :       delete_GDALGroupHS(arg1);
   29655        1455 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29656             :     }
   29657        1455 :     if ( bLocalUseExceptions ) {
   29658         523 :       popErrorHandler();
   29659             :     }
   29660             : #ifndef SED_HACKS
   29661             :     if ( bLocalUseExceptions ) {
   29662             :       CPLErr eclass = CPLGetLastErrorType();
   29663             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29664             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29665             :       }
   29666             :     }
   29667             : #endif
   29668             :   }
   29669        1455 :   resultobj = SWIG_Py_Void();
   29670        1455 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29671             :   return resultobj;
   29672             : fail:
   29673             :   return NULL;
   29674             : }
   29675             : 
   29676             : 
   29677          95 : SWIGINTERN PyObject *_wrap_Group_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29678          95 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29679          95 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29680          95 :   void *argp1 = 0 ;
   29681          95 :   int res1 = 0 ;
   29682          95 :   PyObject *swig_obj[1] ;
   29683          95 :   char *result = 0 ;
   29684             :   
   29685          95 :   if (!args) SWIG_fail;
   29686          95 :   swig_obj[0] = args;
   29687          95 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29688          95 :   if (!SWIG_IsOK(res1)) {
   29689           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29690             :   }
   29691          95 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29692          95 :   {
   29693          95 :     const int bLocalUseExceptions = GetUseExceptions();
   29694          95 :     if ( bLocalUseExceptions ) {
   29695          17 :       pushErrorHandler();
   29696             :     }
   29697          95 :     {
   29698          95 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29699          95 :       result = (char *)GDALGroupHS_GetName(arg1);
   29700          95 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29701             :     }
   29702          95 :     if ( bLocalUseExceptions ) {
   29703          17 :       popErrorHandler();
   29704             :     }
   29705             : #ifndef SED_HACKS
   29706             :     if ( bLocalUseExceptions ) {
   29707             :       CPLErr eclass = CPLGetLastErrorType();
   29708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29710             :       }
   29711             :     }
   29712             : #endif
   29713             :   }
   29714          95 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29715          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; } }
   29716             :   return resultobj;
   29717             : fail:
   29718             :   return NULL;
   29719             : }
   29720             : 
   29721             : 
   29722          47 : SWIGINTERN PyObject *_wrap_Group_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29723          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29724          47 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29725          47 :   void *argp1 = 0 ;
   29726          47 :   int res1 = 0 ;
   29727          47 :   PyObject *swig_obj[1] ;
   29728          47 :   char *result = 0 ;
   29729             :   
   29730          47 :   if (!args) SWIG_fail;
   29731          47 :   swig_obj[0] = args;
   29732          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29733          47 :   if (!SWIG_IsOK(res1)) {
   29734           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetFullName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29735             :   }
   29736          47 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29737          47 :   {
   29738          47 :     const int bLocalUseExceptions = GetUseExceptions();
   29739          47 :     if ( bLocalUseExceptions ) {
   29740          17 :       pushErrorHandler();
   29741             :     }
   29742          47 :     {
   29743          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29744          47 :       result = (char *)GDALGroupHS_GetFullName(arg1);
   29745          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29746             :     }
   29747          47 :     if ( bLocalUseExceptions ) {
   29748          17 :       popErrorHandler();
   29749             :     }
   29750             : #ifndef SED_HACKS
   29751             :     if ( bLocalUseExceptions ) {
   29752             :       CPLErr eclass = CPLGetLastErrorType();
   29753             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29754             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29755             :       }
   29756             :     }
   29757             : #endif
   29758             :   }
   29759          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29760          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; } }
   29761             :   return resultobj;
   29762             : fail:
   29763             :   return NULL;
   29764             : }
   29765             : 
   29766             : 
   29767         329 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29768         329 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29769         329 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29770         329 :   char **arg2 = (char **) 0 ;
   29771         329 :   void *argp1 = 0 ;
   29772         329 :   int res1 = 0 ;
   29773         329 :   PyObject *swig_obj[2] ;
   29774         329 :   char **result = 0 ;
   29775             :   
   29776         329 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayNames", 1, 2, swig_obj)) SWIG_fail;
   29777         329 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29778         329 :   if (!SWIG_IsOK(res1)) {
   29779           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29780             :   }
   29781         329 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29782         329 :   if (swig_obj[1]) {
   29783         329 :     {
   29784             :       /* %typemap(in) char **dict */
   29785         329 :       arg2 = NULL;
   29786         329 :       if ( PySequence_Check( swig_obj[1] ) ) {
   29787         329 :         int bErr = FALSE;
   29788         329 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   29789         329 :         if ( bErr )
   29790             :         {
   29791           0 :           SWIG_fail;
   29792             :         }
   29793             :       }
   29794           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   29795           0 :         int bErr = FALSE;
   29796           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   29797           0 :         if ( bErr )
   29798             :         {
   29799           0 :           SWIG_fail;
   29800             :         }
   29801             :       }
   29802             :       else {
   29803           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29804           0 :         SWIG_fail;
   29805             :       }
   29806             :     }
   29807             :   }
   29808         329 :   {
   29809         329 :     const int bLocalUseExceptions = GetUseExceptions();
   29810         329 :     if ( bLocalUseExceptions ) {
   29811          74 :       pushErrorHandler();
   29812             :     }
   29813         329 :     {
   29814         329 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29815         329 :       result = (char **)GDALGroupHS_GetMDArrayNames(arg1,arg2);
   29816         329 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29817             :     }
   29818         329 :     if ( bLocalUseExceptions ) {
   29819          74 :       popErrorHandler();
   29820             :     }
   29821             : #ifndef SED_HACKS
   29822             :     if ( bLocalUseExceptions ) {
   29823             :       CPLErr eclass = CPLGetLastErrorType();
   29824             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29825             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29826             :       }
   29827             :     }
   29828             : #endif
   29829             :   }
   29830         329 :   {
   29831             :     /* %typemap(out) char **CSL -> ( string ) */
   29832         329 :     bool bErr = false;
   29833         329 :     resultobj = CSLToList(result, &bErr);
   29834         329 :     CSLDestroy(result);
   29835         329 :     if( bErr ) {
   29836           0 :       SWIG_fail;
   29837             :     }
   29838             :   }
   29839         329 :   {
   29840             :     /* %typemap(freearg) char **dict */
   29841         329 :     CSLDestroy( arg2 );
   29842             :   }
   29843         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; } }
   29844             :   return resultobj;
   29845           0 : fail:
   29846           0 :   {
   29847             :     /* %typemap(freearg) char **dict */
   29848           0 :     CSLDestroy( arg2 );
   29849             :   }
   29850             :   return NULL;
   29851             : }
   29852             : 
   29853             : 
   29854           1 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayFullNamesRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29855           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29856           1 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29857           1 :   char **arg2 = (char **) 0 ;
   29858           1 :   char **arg3 = (char **) 0 ;
   29859           1 :   void *argp1 = 0 ;
   29860           1 :   int res1 = 0 ;
   29861           1 :   void *argp2 = 0 ;
   29862           1 :   int res2 = 0 ;
   29863           1 :   void *argp3 = 0 ;
   29864           1 :   int res3 = 0 ;
   29865           1 :   PyObject *swig_obj[3] ;
   29866           1 :   char **result = 0 ;
   29867             :   
   29868           1 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayFullNamesRecursive", 1, 3, swig_obj)) SWIG_fail;
   29869           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29870           1 :   if (!SWIG_IsOK(res1)) {
   29871           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29872             :   }
   29873           1 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29874           1 :   if (swig_obj[1]) {
   29875           0 :     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
   29876           0 :     if (!SWIG_IsOK(res2)) {
   29877           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "2"" of type '" "char **""'"); 
   29878             :     }
   29879           0 :     arg2 = reinterpret_cast< char ** >(argp2);
   29880             :   }
   29881           1 :   if (swig_obj[2]) {
   29882           0 :     res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_p_char, 0 |  0 );
   29883           0 :     if (!SWIG_IsOK(res3)) {
   29884           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "3"" of type '" "char **""'"); 
   29885             :     }
   29886           0 :     arg3 = reinterpret_cast< char ** >(argp3);
   29887             :   }
   29888           1 :   {
   29889           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29890           1 :     if ( bLocalUseExceptions ) {
   29891           1 :       pushErrorHandler();
   29892             :     }
   29893           1 :     {
   29894           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29895           1 :       result = (char **)GDALGroupHS_GetMDArrayFullNamesRecursive(arg1,arg2,arg3);
   29896           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29897             :     }
   29898           1 :     if ( bLocalUseExceptions ) {
   29899           1 :       popErrorHandler();
   29900             :     }
   29901             : #ifndef SED_HACKS
   29902             :     if ( bLocalUseExceptions ) {
   29903             :       CPLErr eclass = CPLGetLastErrorType();
   29904             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29905             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29906             :       }
   29907             :     }
   29908             : #endif
   29909             :   }
   29910           1 :   {
   29911             :     /* %typemap(out) char **CSL -> ( string ) */
   29912           1 :     bool bErr = false;
   29913           1 :     resultobj = CSLToList(result, &bErr);
   29914           1 :     CSLDestroy(result);
   29915           1 :     if( bErr ) {
   29916           0 :       SWIG_fail;
   29917             :     }
   29918             :   }
   29919           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; } }
   29920             :   return resultobj;
   29921             : fail:
   29922             :   return NULL;
   29923             : }
   29924             : 
   29925             : 
   29926         811 : SWIGINTERN PyObject *_wrap_Group_OpenMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29927         811 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29928         811 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29929         811 :   char *arg2 = (char *) 0 ;
   29930         811 :   char **arg3 = (char **) 0 ;
   29931         811 :   void *argp1 = 0 ;
   29932         811 :   int res1 = 0 ;
   29933         811 :   int res2 ;
   29934         811 :   char *buf2 = 0 ;
   29935         811 :   int alloc2 = 0 ;
   29936         811 :   PyObject *swig_obj[3] ;
   29937         811 :   GDALMDArrayHS *result = 0 ;
   29938             :   
   29939         811 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArray", 2, 3, swig_obj)) SWIG_fail;
   29940         811 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29941         811 :   if (!SWIG_IsOK(res1)) {
   29942           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29943             :   }
   29944         811 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29945         811 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29946         811 :   if (!SWIG_IsOK(res2)) {
   29947           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArray" "', argument " "2"" of type '" "char const *""'");
   29948             :   }
   29949         811 :   arg2 = reinterpret_cast< char * >(buf2);
   29950         811 :   if (swig_obj[2]) {
   29951          10 :     {
   29952             :       /* %typemap(in) char **dict */
   29953          10 :       arg3 = NULL;
   29954          10 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29955          10 :         int bErr = FALSE;
   29956          10 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29957          10 :         if ( bErr )
   29958             :         {
   29959           0 :           SWIG_fail;
   29960             :         }
   29961             :       }
   29962           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29963           0 :         int bErr = FALSE;
   29964           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29965           0 :         if ( bErr )
   29966             :         {
   29967           0 :           SWIG_fail;
   29968             :         }
   29969             :       }
   29970             :       else {
   29971           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29972           0 :         SWIG_fail;
   29973             :       }
   29974             :     }
   29975             :   }
   29976         811 :   {
   29977         811 :     if (!arg2) {
   29978           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29979             :     }
   29980             :   }
   29981         811 :   {
   29982         811 :     const int bLocalUseExceptions = GetUseExceptions();
   29983         811 :     if ( bLocalUseExceptions ) {
   29984         232 :       pushErrorHandler();
   29985             :     }
   29986         811 :     {
   29987         811 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29988         811 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArray(arg1,(char const *)arg2,arg3);
   29989         811 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29990             :     }
   29991         811 :     if ( bLocalUseExceptions ) {
   29992         232 :       popErrorHandler();
   29993             :     }
   29994             : #ifndef SED_HACKS
   29995             :     if ( bLocalUseExceptions ) {
   29996             :       CPLErr eclass = CPLGetLastErrorType();
   29997             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29998             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29999             :       }
   30000             :     }
   30001             : #endif
   30002             :   }
   30003         811 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   30004         811 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30005         811 :   {
   30006             :     /* %typemap(freearg) char **dict */
   30007         811 :     CSLDestroy( arg3 );
   30008             :   }
   30009         845 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30010             :   return resultobj;
   30011           0 : fail:
   30012           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30013           0 :   {
   30014             :     /* %typemap(freearg) char **dict */
   30015           0 :     CSLDestroy( arg3 );
   30016             :   }
   30017             :   return NULL;
   30018             : }
   30019             : 
   30020             : 
   30021          17 : SWIGINTERN PyObject *_wrap_Group_OpenMDArrayFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30022          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30023          17 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30024          17 :   char *arg2 = (char *) 0 ;
   30025          17 :   char **arg3 = (char **) 0 ;
   30026          17 :   void *argp1 = 0 ;
   30027          17 :   int res1 = 0 ;
   30028          17 :   int res2 ;
   30029          17 :   char *buf2 = 0 ;
   30030          17 :   int alloc2 = 0 ;
   30031          17 :   PyObject *swig_obj[3] ;
   30032          17 :   GDALMDArrayHS *result = 0 ;
   30033             :   
   30034          17 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArrayFromFullname", 2, 3, swig_obj)) SWIG_fail;
   30035          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30036          17 :   if (!SWIG_IsOK(res1)) {
   30037           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30038             :   }
   30039          17 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30040          17 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30041          17 :   if (!SWIG_IsOK(res2)) {
   30042           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "2"" of type '" "char const *""'");
   30043             :   }
   30044          17 :   arg2 = reinterpret_cast< char * >(buf2);
   30045          17 :   if (swig_obj[2]) {
   30046           0 :     {
   30047             :       /* %typemap(in) char **dict */
   30048           0 :       arg3 = NULL;
   30049           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30050           0 :         int bErr = FALSE;
   30051           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30052           0 :         if ( bErr )
   30053             :         {
   30054           0 :           SWIG_fail;
   30055             :         }
   30056             :       }
   30057           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30058           0 :         int bErr = FALSE;
   30059           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30060           0 :         if ( bErr )
   30061             :         {
   30062           0 :           SWIG_fail;
   30063             :         }
   30064             :       }
   30065             :       else {
   30066           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30067           0 :         SWIG_fail;
   30068             :       }
   30069             :     }
   30070             :   }
   30071          17 :   {
   30072          17 :     if (!arg2) {
   30073           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30074             :     }
   30075             :   }
   30076          17 :   {
   30077          17 :     const int bLocalUseExceptions = GetUseExceptions();
   30078          17 :     if ( bLocalUseExceptions ) {
   30079           9 :       pushErrorHandler();
   30080             :     }
   30081          17 :     {
   30082          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30083          17 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArrayFromFullname(arg1,(char const *)arg2,arg3);
   30084          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30085             :     }
   30086          17 :     if ( bLocalUseExceptions ) {
   30087           9 :       popErrorHandler();
   30088             :     }
   30089             : #ifndef SED_HACKS
   30090             :     if ( bLocalUseExceptions ) {
   30091             :       CPLErr eclass = CPLGetLastErrorType();
   30092             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30093             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30094             :       }
   30095             :     }
   30096             : #endif
   30097             :   }
   30098          17 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   30099          17 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30100          17 :   {
   30101             :     /* %typemap(freearg) char **dict */
   30102          17 :     CSLDestroy( arg3 );
   30103             :   }
   30104          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; } }
   30105             :   return resultobj;
   30106           0 : fail:
   30107           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30108           0 :   {
   30109             :     /* %typemap(freearg) char **dict */
   30110           0 :     CSLDestroy( arg3 );
   30111             :   }
   30112             :   return NULL;
   30113             : }
   30114             : 
   30115             : 
   30116          19 : SWIGINTERN PyObject *_wrap_Group_ResolveMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30117          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30118          19 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30119          19 :   char *arg2 = (char *) 0 ;
   30120          19 :   char *arg3 = (char *) 0 ;
   30121          19 :   char **arg4 = (char **) 0 ;
   30122          19 :   void *argp1 = 0 ;
   30123          19 :   int res1 = 0 ;
   30124          19 :   int res2 ;
   30125          19 :   char *buf2 = 0 ;
   30126          19 :   int alloc2 = 0 ;
   30127          19 :   int res3 ;
   30128          19 :   char *buf3 = 0 ;
   30129          19 :   int alloc3 = 0 ;
   30130          19 :   PyObject *swig_obj[4] ;
   30131          19 :   GDALMDArrayHS *result = 0 ;
   30132             :   
   30133          19 :   if (!SWIG_Python_UnpackTuple(args, "Group_ResolveMDArray", 3, 4, swig_obj)) SWIG_fail;
   30134          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30135          19 :   if (!SWIG_IsOK(res1)) {
   30136           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_ResolveMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30137             :   }
   30138          19 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30139          19 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30140          19 :   if (!SWIG_IsOK(res2)) {
   30141           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_ResolveMDArray" "', argument " "2"" of type '" "char const *""'");
   30142             :   }
   30143          19 :   arg2 = reinterpret_cast< char * >(buf2);
   30144          19 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   30145          19 :   if (!SWIG_IsOK(res3)) {
   30146           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_ResolveMDArray" "', argument " "3"" of type '" "char const *""'");
   30147             :   }
   30148          19 :   arg3 = reinterpret_cast< char * >(buf3);
   30149          19 :   if (swig_obj[3]) {
   30150           0 :     {
   30151             :       /* %typemap(in) char **dict */
   30152           0 :       arg4 = NULL;
   30153           0 :       if ( PySequence_Check( swig_obj[3] ) ) {
   30154           0 :         int bErr = FALSE;
   30155           0 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   30156           0 :         if ( bErr )
   30157             :         {
   30158           0 :           SWIG_fail;
   30159             :         }
   30160             :       }
   30161           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   30162           0 :         int bErr = FALSE;
   30163           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   30164           0 :         if ( bErr )
   30165             :         {
   30166           0 :           SWIG_fail;
   30167             :         }
   30168             :       }
   30169             :       else {
   30170           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30171           0 :         SWIG_fail;
   30172             :       }
   30173             :     }
   30174             :   }
   30175          19 :   {
   30176          19 :     if (!arg2) {
   30177           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30178             :     }
   30179             :   }
   30180          19 :   {
   30181          19 :     const int bLocalUseExceptions = GetUseExceptions();
   30182          19 :     if ( bLocalUseExceptions ) {
   30183           1 :       pushErrorHandler();
   30184             :     }
   30185          19 :     {
   30186          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30187          19 :       result = (GDALMDArrayHS *)GDALGroupHS_ResolveMDArray(arg1,(char const *)arg2,(char const *)arg3,arg4);
   30188          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30189             :     }
   30190          19 :     if ( bLocalUseExceptions ) {
   30191           1 :       popErrorHandler();
   30192             :     }
   30193             : #ifndef SED_HACKS
   30194             :     if ( bLocalUseExceptions ) {
   30195             :       CPLErr eclass = CPLGetLastErrorType();
   30196             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30197             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30198             :       }
   30199             :     }
   30200             : #endif
   30201             :   }
   30202          19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   30203          19 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30204          19 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30205          19 :   {
   30206             :     /* %typemap(freearg) char **dict */
   30207          19 :     CSLDestroy( arg4 );
   30208             :   }
   30209          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; } }
   30210             :   return resultobj;
   30211           0 : fail:
   30212           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30213           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30214           0 :   {
   30215             :     /* %typemap(freearg) char **dict */
   30216           0 :     CSLDestroy( arg4 );
   30217             :   }
   30218             :   return NULL;
   30219             : }
   30220             : 
   30221             : 
   30222          98 : SWIGINTERN PyObject *_wrap_Group_GetGroupNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30223          98 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30224          98 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30225          98 :   char **arg2 = (char **) 0 ;
   30226          98 :   void *argp1 = 0 ;
   30227          98 :   int res1 = 0 ;
   30228          98 :   PyObject *swig_obj[2] ;
   30229          98 :   char **result = 0 ;
   30230             :   
   30231          98 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetGroupNames", 1, 2, swig_obj)) SWIG_fail;
   30232          98 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30233          98 :   if (!SWIG_IsOK(res1)) {
   30234           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetGroupNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30235             :   }
   30236          98 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30237          98 :   if (swig_obj[1]) {
   30238          98 :     {
   30239             :       /* %typemap(in) char **dict */
   30240          98 :       arg2 = NULL;
   30241          98 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30242          98 :         int bErr = FALSE;
   30243          98 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   30244          98 :         if ( bErr )
   30245             :         {
   30246           0 :           SWIG_fail;
   30247             :         }
   30248             :       }
   30249           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30250           0 :         int bErr = FALSE;
   30251           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   30252           0 :         if ( bErr )
   30253             :         {
   30254           0 :           SWIG_fail;
   30255             :         }
   30256             :       }
   30257             :       else {
   30258           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30259           0 :         SWIG_fail;
   30260             :       }
   30261             :     }
   30262             :   }
   30263          98 :   {
   30264          98 :     const int bLocalUseExceptions = GetUseExceptions();
   30265          98 :     if ( bLocalUseExceptions ) {
   30266          52 :       pushErrorHandler();
   30267             :     }
   30268          98 :     {
   30269          98 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30270          98 :       result = (char **)GDALGroupHS_GetGroupNames(arg1,arg2);
   30271          98 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30272             :     }
   30273          98 :     if ( bLocalUseExceptions ) {
   30274          52 :       popErrorHandler();
   30275             :     }
   30276             : #ifndef SED_HACKS
   30277             :     if ( bLocalUseExceptions ) {
   30278             :       CPLErr eclass = CPLGetLastErrorType();
   30279             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30280             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30281             :       }
   30282             :     }
   30283             : #endif
   30284             :   }
   30285          98 :   {
   30286             :     /* %typemap(out) char **CSL -> ( string ) */
   30287          98 :     bool bErr = false;
   30288          98 :     resultobj = CSLToList(result, &bErr);
   30289          98 :     CSLDestroy(result);
   30290          98 :     if( bErr ) {
   30291           0 :       SWIG_fail;
   30292             :     }
   30293             :   }
   30294          98 :   {
   30295             :     /* %typemap(freearg) char **dict */
   30296          98 :     CSLDestroy( arg2 );
   30297             :   }
   30298          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; } }
   30299             :   return resultobj;
   30300           0 : fail:
   30301           0 :   {
   30302             :     /* %typemap(freearg) char **dict */
   30303           0 :     CSLDestroy( arg2 );
   30304             :   }
   30305             :   return NULL;
   30306             : }
   30307             : 
   30308             : 
   30309         163 : SWIGINTERN PyObject *_wrap_Group_OpenGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30310         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30311         163 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30312         163 :   char *arg2 = (char *) 0 ;
   30313         163 :   char **arg3 = (char **) 0 ;
   30314         163 :   void *argp1 = 0 ;
   30315         163 :   int res1 = 0 ;
   30316         163 :   int res2 ;
   30317         163 :   char *buf2 = 0 ;
   30318         163 :   int alloc2 = 0 ;
   30319         163 :   PyObject *swig_obj[3] ;
   30320         163 :   GDALGroupHS *result = 0 ;
   30321             :   
   30322         163 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroup", 2, 3, swig_obj)) SWIG_fail;
   30323         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30324         163 :   if (!SWIG_IsOK(res1)) {
   30325           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30326             :   }
   30327         163 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30328         163 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30329         163 :   if (!SWIG_IsOK(res2)) {
   30330           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroup" "', argument " "2"" of type '" "char const *""'");
   30331             :   }
   30332         163 :   arg2 = reinterpret_cast< char * >(buf2);
   30333         163 :   if (swig_obj[2]) {
   30334           1 :     {
   30335             :       /* %typemap(in) char **dict */
   30336           1 :       arg3 = NULL;
   30337           1 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30338           1 :         int bErr = FALSE;
   30339           1 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30340           1 :         if ( bErr )
   30341             :         {
   30342           0 :           SWIG_fail;
   30343             :         }
   30344             :       }
   30345           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30346           0 :         int bErr = FALSE;
   30347           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30348           0 :         if ( bErr )
   30349             :         {
   30350           0 :           SWIG_fail;
   30351             :         }
   30352             :       }
   30353             :       else {
   30354           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30355           0 :         SWIG_fail;
   30356             :       }
   30357             :     }
   30358             :   }
   30359         163 :   {
   30360         163 :     if (!arg2) {
   30361           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30362             :     }
   30363             :   }
   30364         163 :   {
   30365         163 :     const int bLocalUseExceptions = GetUseExceptions();
   30366         163 :     if ( bLocalUseExceptions ) {
   30367          97 :       pushErrorHandler();
   30368             :     }
   30369         163 :     {
   30370         163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30371         163 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroup(arg1,(char const *)arg2,arg3);
   30372         163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30373             :     }
   30374         163 :     if ( bLocalUseExceptions ) {
   30375          97 :       popErrorHandler();
   30376             :     }
   30377             : #ifndef SED_HACKS
   30378             :     if ( bLocalUseExceptions ) {
   30379             :       CPLErr eclass = CPLGetLastErrorType();
   30380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30382             :       }
   30383             :     }
   30384             : #endif
   30385             :   }
   30386         163 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30387         163 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30388         163 :   {
   30389             :     /* %typemap(freearg) char **dict */
   30390         163 :     CSLDestroy( arg3 );
   30391             :   }
   30392         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; } }
   30393             :   return resultobj;
   30394           0 : fail:
   30395           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30396           0 :   {
   30397             :     /* %typemap(freearg) char **dict */
   30398           0 :     CSLDestroy( arg3 );
   30399             :   }
   30400             :   return NULL;
   30401             : }
   30402             : 
   30403             : 
   30404           3 : SWIGINTERN PyObject *_wrap_Group_OpenGroupFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30405           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30406           3 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30407           3 :   char *arg2 = (char *) 0 ;
   30408           3 :   char **arg3 = (char **) 0 ;
   30409           3 :   void *argp1 = 0 ;
   30410           3 :   int res1 = 0 ;
   30411           3 :   int res2 ;
   30412           3 :   char *buf2 = 0 ;
   30413           3 :   int alloc2 = 0 ;
   30414           3 :   PyObject *swig_obj[3] ;
   30415           3 :   GDALGroupHS *result = 0 ;
   30416             :   
   30417           3 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroupFromFullname", 2, 3, swig_obj)) SWIG_fail;
   30418           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30419           3 :   if (!SWIG_IsOK(res1)) {
   30420           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroupFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30421             :   }
   30422           3 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30423           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30424           3 :   if (!SWIG_IsOK(res2)) {
   30425           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroupFromFullname" "', argument " "2"" of type '" "char const *""'");
   30426             :   }
   30427           3 :   arg2 = reinterpret_cast< char * >(buf2);
   30428           3 :   if (swig_obj[2]) {
   30429           0 :     {
   30430             :       /* %typemap(in) char **dict */
   30431           0 :       arg3 = NULL;
   30432           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30433           0 :         int bErr = FALSE;
   30434           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30435           0 :         if ( bErr )
   30436             :         {
   30437           0 :           SWIG_fail;
   30438             :         }
   30439             :       }
   30440           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30441           0 :         int bErr = FALSE;
   30442           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30443           0 :         if ( bErr )
   30444             :         {
   30445           0 :           SWIG_fail;
   30446             :         }
   30447             :       }
   30448             :       else {
   30449           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30450           0 :         SWIG_fail;
   30451             :       }
   30452             :     }
   30453             :   }
   30454           3 :   {
   30455           3 :     if (!arg2) {
   30456           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30457             :     }
   30458             :   }
   30459           3 :   {
   30460           3 :     const int bLocalUseExceptions = GetUseExceptions();
   30461           3 :     if ( bLocalUseExceptions ) {
   30462           1 :       pushErrorHandler();
   30463             :     }
   30464           3 :     {
   30465           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30466           3 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroupFromFullname(arg1,(char const *)arg2,arg3);
   30467           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30468             :     }
   30469           3 :     if ( bLocalUseExceptions ) {
   30470           1 :       popErrorHandler();
   30471             :     }
   30472             : #ifndef SED_HACKS
   30473             :     if ( bLocalUseExceptions ) {
   30474             :       CPLErr eclass = CPLGetLastErrorType();
   30475             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30476             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30477             :       }
   30478             :     }
   30479             : #endif
   30480             :   }
   30481           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30482           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30483           3 :   {
   30484             :     /* %typemap(freearg) char **dict */
   30485           3 :     CSLDestroy( arg3 );
   30486             :   }
   30487           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; } }
   30488             :   return resultobj;
   30489           0 : fail:
   30490           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30491           0 :   {
   30492             :     /* %typemap(freearg) char **dict */
   30493           0 :     CSLDestroy( arg3 );
   30494             :   }
   30495             :   return NULL;
   30496             : }
   30497             : 
   30498             : 
   30499           8 : SWIGINTERN PyObject *_wrap_Group_GetVectorLayerNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30500           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30501           8 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30502           8 :   char **arg2 = (char **) 0 ;
   30503           8 :   void *argp1 = 0 ;
   30504           8 :   int res1 = 0 ;
   30505           8 :   PyObject *swig_obj[2] ;
   30506           8 :   char **result = 0 ;
   30507             :   
   30508           8 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetVectorLayerNames", 1, 2, swig_obj)) SWIG_fail;
   30509           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30510           8 :   if (!SWIG_IsOK(res1)) {
   30511           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetVectorLayerNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30512             :   }
   30513           8 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30514           8 :   if (swig_obj[1]) {
   30515           0 :     {
   30516             :       /* %typemap(in) char **dict */
   30517           0 :       arg2 = NULL;
   30518           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30519           0 :         int bErr = FALSE;
   30520           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   30521           0 :         if ( bErr )
   30522             :         {
   30523           0 :           SWIG_fail;
   30524             :         }
   30525             :       }
   30526           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30527           0 :         int bErr = FALSE;
   30528           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   30529           0 :         if ( bErr )
   30530             :         {
   30531           0 :           SWIG_fail;
   30532             :         }
   30533             :       }
   30534             :       else {
   30535           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30536           0 :         SWIG_fail;
   30537             :       }
   30538             :     }
   30539             :   }
   30540           8 :   {
   30541           8 :     const int bLocalUseExceptions = GetUseExceptions();
   30542           8 :     if ( bLocalUseExceptions ) {
   30543           0 :       pushErrorHandler();
   30544             :     }
   30545           8 :     {
   30546           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30547           8 :       result = (char **)GDALGroupHS_GetVectorLayerNames(arg1,arg2);
   30548           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30549             :     }
   30550           8 :     if ( bLocalUseExceptions ) {
   30551           0 :       popErrorHandler();
   30552             :     }
   30553             : #ifndef SED_HACKS
   30554             :     if ( bLocalUseExceptions ) {
   30555             :       CPLErr eclass = CPLGetLastErrorType();
   30556             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30557             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30558             :       }
   30559             :     }
   30560             : #endif
   30561             :   }
   30562           8 :   {
   30563             :     /* %typemap(out) char **CSL -> ( string ) */
   30564           8 :     bool bErr = false;
   30565           8 :     resultobj = CSLToList(result, &bErr);
   30566           8 :     CSLDestroy(result);
   30567           8 :     if( bErr ) {
   30568           0 :       SWIG_fail;
   30569             :     }
   30570             :   }
   30571           8 :   {
   30572             :     /* %typemap(freearg) char **dict */
   30573           8 :     CSLDestroy( arg2 );
   30574             :   }
   30575           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; } }
   30576             :   return resultobj;
   30577           0 : fail:
   30578           0 :   {
   30579             :     /* %typemap(freearg) char **dict */
   30580           0 :     CSLDestroy( arg2 );
   30581             :   }
   30582             :   return NULL;
   30583             : }
   30584             : 
   30585             : 
   30586          12 : SWIGINTERN PyObject *_wrap_Group_OpenVectorLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30587          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30588          12 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30589          12 :   char *arg2 = (char *) 0 ;
   30590          12 :   char **arg3 = (char **) 0 ;
   30591          12 :   void *argp1 = 0 ;
   30592          12 :   int res1 = 0 ;
   30593          12 :   int res2 ;
   30594          12 :   char *buf2 = 0 ;
   30595          12 :   int alloc2 = 0 ;
   30596          12 :   PyObject *swig_obj[3] ;
   30597          12 :   OGRLayerShadow *result = 0 ;
   30598             :   
   30599          12 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenVectorLayer", 2, 3, swig_obj)) SWIG_fail;
   30600          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30601          12 :   if (!SWIG_IsOK(res1)) {
   30602           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenVectorLayer" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30603             :   }
   30604          12 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30605          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30606          12 :   if (!SWIG_IsOK(res2)) {
   30607           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenVectorLayer" "', argument " "2"" of type '" "char const *""'");
   30608             :   }
   30609          12 :   arg2 = reinterpret_cast< char * >(buf2);
   30610          12 :   if (swig_obj[2]) {
   30611           0 :     {
   30612             :       /* %typemap(in) char **dict */
   30613           0 :       arg3 = NULL;
   30614           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30615           0 :         int bErr = FALSE;
   30616           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30617           0 :         if ( bErr )
   30618             :         {
   30619           0 :           SWIG_fail;
   30620             :         }
   30621             :       }
   30622           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30623           0 :         int bErr = FALSE;
   30624           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30625           0 :         if ( bErr )
   30626             :         {
   30627           0 :           SWIG_fail;
   30628             :         }
   30629             :       }
   30630             :       else {
   30631           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30632           0 :         SWIG_fail;
   30633             :       }
   30634             :     }
   30635             :   }
   30636          12 :   {
   30637          12 :     if (!arg2) {
   30638           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30639             :     }
   30640             :   }
   30641          12 :   {
   30642          12 :     const int bLocalUseExceptions = GetUseExceptions();
   30643          12 :     if ( bLocalUseExceptions ) {
   30644           1 :       pushErrorHandler();
   30645             :     }
   30646          12 :     {
   30647          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30648          12 :       result = (OGRLayerShadow *)GDALGroupHS_OpenVectorLayer(arg1,(char const *)arg2,arg3);
   30649          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30650             :     }
   30651          12 :     if ( bLocalUseExceptions ) {
   30652           1 :       popErrorHandler();
   30653             :     }
   30654             : #ifndef SED_HACKS
   30655             :     if ( bLocalUseExceptions ) {
   30656             :       CPLErr eclass = CPLGetLastErrorType();
   30657             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30658             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30659             :       }
   30660             :     }
   30661             : #endif
   30662             :   }
   30663          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   30664          12 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30665          12 :   {
   30666             :     /* %typemap(freearg) char **dict */
   30667          12 :     CSLDestroy( arg3 );
   30668             :   }
   30669          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; } }
   30670             :   return resultobj;
   30671           0 : fail:
   30672           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30673           0 :   {
   30674             :     /* %typemap(freearg) char **dict */
   30675           0 :     CSLDestroy( arg3 );
   30676             :   }
   30677             :   return NULL;
   30678             : }
   30679             : 
   30680             : 
   30681          73 : SWIGINTERN PyObject *_wrap_Group_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30682          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30683          73 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30684          73 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   30685          73 :   size_t *arg3 = (size_t *) 0 ;
   30686          73 :   char **arg4 = (char **) 0 ;
   30687          73 :   void *argp1 = 0 ;
   30688          73 :   int res1 = 0 ;
   30689          73 :   GDALDimensionHS **dims2 = 0 ;
   30690          73 :   size_t nCount2 = 0 ;
   30691          73 :   PyObject *swig_obj[2] ;
   30692             :   
   30693          73 :   {
   30694             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30695          73 :     arg2 = &dims2;
   30696          73 :     arg3 = &nCount2;
   30697             :   }
   30698          73 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDimensions", 1, 2, swig_obj)) SWIG_fail;
   30699          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30700          73 :   if (!SWIG_IsOK(res1)) {
   30701           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDimensions" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30702             :   }
   30703          73 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30704          73 :   if (swig_obj[1]) {
   30705           0 :     {
   30706             :       /* %typemap(in) char **dict */
   30707           0 :       arg4 = NULL;
   30708           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30709           0 :         int bErr = FALSE;
   30710           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30711           0 :         if ( bErr )
   30712             :         {
   30713           0 :           SWIG_fail;
   30714             :         }
   30715             :       }
   30716           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30717           0 :         int bErr = FALSE;
   30718           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30719           0 :         if ( bErr )
   30720             :         {
   30721           0 :           SWIG_fail;
   30722             :         }
   30723             :       }
   30724             :       else {
   30725           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30726           0 :         SWIG_fail;
   30727             :       }
   30728             :     }
   30729             :   }
   30730          73 :   {
   30731          73 :     const int bLocalUseExceptions = GetUseExceptions();
   30732          73 :     if ( bLocalUseExceptions ) {
   30733          40 :       pushErrorHandler();
   30734             :     }
   30735          73 :     {
   30736          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30737          73 :       GDALGroupHS_GetDimensions(arg1,arg2,arg3,arg4);
   30738          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30739             :     }
   30740          73 :     if ( bLocalUseExceptions ) {
   30741          40 :       popErrorHandler();
   30742             :     }
   30743             : #ifndef SED_HACKS
   30744             :     if ( bLocalUseExceptions ) {
   30745             :       CPLErr eclass = CPLGetLastErrorType();
   30746             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30747             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30748             :       }
   30749             :     }
   30750             : #endif
   30751             :   }
   30752          73 :   resultobj = SWIG_Py_Void();
   30753          73 :   {
   30754             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30755          73 :     Py_DECREF(resultobj);
   30756          73 :     resultobj = PyList_New( *arg3 );
   30757          73 :     if( !resultobj ) {
   30758           0 :       SWIG_fail;
   30759             :     }
   30760         230 :     for( size_t i = 0; i < *arg3; i++ ) {
   30761         157 :       PyList_SetItem(resultobj, i,
   30762         157 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   30763             :       /* We have borrowed the GDALDimensionHS */
   30764         157 :       (*arg2)[i] = NULL;
   30765             :     }
   30766             :   }
   30767          73 :   {
   30768             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30769          73 :     GDALReleaseDimensions(*arg2, *arg3);
   30770             :   }
   30771          73 :   {
   30772             :     /* %typemap(freearg) char **dict */
   30773          73 :     CSLDestroy( arg4 );
   30774             :   }
   30775          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; } }
   30776             :   return resultobj;
   30777           0 : fail:
   30778           0 :   {
   30779             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30780           0 :     GDALReleaseDimensions(*arg2, *arg3);
   30781             :   }
   30782           0 :   {
   30783             :     /* %typemap(freearg) char **dict */
   30784           0 :     CSLDestroy( arg4 );
   30785             :   }
   30786             :   return NULL;
   30787             : }
   30788             : 
   30789             : 
   30790          80 : SWIGINTERN PyObject *_wrap_Group_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30791          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30792          80 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30793          80 :   char *arg2 = (char *) 0 ;
   30794          80 :   void *argp1 = 0 ;
   30795          80 :   int res1 = 0 ;
   30796          80 :   int res2 ;
   30797          80 :   char *buf2 = 0 ;
   30798          80 :   int alloc2 = 0 ;
   30799          80 :   PyObject *swig_obj[2] ;
   30800          80 :   GDALAttributeHS *result = 0 ;
   30801             :   
   30802          80 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   30803          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30804          80 :   if (!SWIG_IsOK(res1)) {
   30805           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30806             :   }
   30807          80 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30808          80 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30809          80 :   if (!SWIG_IsOK(res2)) {
   30810           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   30811             :   }
   30812          80 :   arg2 = reinterpret_cast< char * >(buf2);
   30813          80 :   {
   30814          80 :     if (!arg2) {
   30815           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30816             :     }
   30817             :   }
   30818          80 :   {
   30819          80 :     const int bLocalUseExceptions = GetUseExceptions();
   30820          80 :     if ( bLocalUseExceptions ) {
   30821          22 :       pushErrorHandler();
   30822             :     }
   30823          80 :     {
   30824          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30825          80 :       result = (GDALAttributeHS *)GDALGroupHS_GetAttribute(arg1,(char const *)arg2);
   30826          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30827             :     }
   30828          80 :     if ( bLocalUseExceptions ) {
   30829          22 :       popErrorHandler();
   30830             :     }
   30831             : #ifndef SED_HACKS
   30832             :     if ( bLocalUseExceptions ) {
   30833             :       CPLErr eclass = CPLGetLastErrorType();
   30834             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30835             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30836             :       }
   30837             :     }
   30838             : #endif
   30839             :   }
   30840          80 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   30841          80 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30842          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; } }
   30843             :   return resultobj;
   30844           0 : fail:
   30845           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30846             :   return NULL;
   30847             : }
   30848             : 
   30849             : 
   30850          71 : SWIGINTERN PyObject *_wrap_Group_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30851          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30852          71 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30853          71 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   30854          71 :   size_t *arg3 = (size_t *) 0 ;
   30855          71 :   char **arg4 = (char **) 0 ;
   30856          71 :   void *argp1 = 0 ;
   30857          71 :   int res1 = 0 ;
   30858          71 :   GDALAttributeHS **attrs2 = 0 ;
   30859          71 :   size_t nCount2 = 0 ;
   30860          71 :   PyObject *swig_obj[2] ;
   30861             :   
   30862          71 :   {
   30863             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30864          71 :     arg2 = &attrs2;
   30865          71 :     arg3 = &nCount2;
   30866             :   }
   30867          71 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   30868          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30869          71 :   if (!SWIG_IsOK(res1)) {
   30870           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttributes" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30871             :   }
   30872          71 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30873          71 :   if (swig_obj[1]) {
   30874           0 :     {
   30875             :       /* %typemap(in) char **dict */
   30876           0 :       arg4 = NULL;
   30877           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30878           0 :         int bErr = FALSE;
   30879           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30880           0 :         if ( bErr )
   30881             :         {
   30882           0 :           SWIG_fail;
   30883             :         }
   30884             :       }
   30885           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30886           0 :         int bErr = FALSE;
   30887           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30888           0 :         if ( bErr )
   30889             :         {
   30890           0 :           SWIG_fail;
   30891             :         }
   30892             :       }
   30893             :       else {
   30894           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30895           0 :         SWIG_fail;
   30896             :       }
   30897             :     }
   30898             :   }
   30899          71 :   {
   30900          71 :     const int bLocalUseExceptions = GetUseExceptions();
   30901          71 :     if ( bLocalUseExceptions ) {
   30902          35 :       pushErrorHandler();
   30903             :     }
   30904          71 :     {
   30905          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30906          71 :       GDALGroupHS_GetAttributes(arg1,arg2,arg3,arg4);
   30907          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30908             :     }
   30909          71 :     if ( bLocalUseExceptions ) {
   30910          35 :       popErrorHandler();
   30911             :     }
   30912             : #ifndef SED_HACKS
   30913             :     if ( bLocalUseExceptions ) {
   30914             :       CPLErr eclass = CPLGetLastErrorType();
   30915             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30916             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30917             :       }
   30918             :     }
   30919             : #endif
   30920             :   }
   30921          71 :   resultobj = SWIG_Py_Void();
   30922          71 :   {
   30923             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30924          71 :     Py_DECREF(resultobj);
   30925          71 :     resultobj = PyList_New( *arg3 );
   30926          71 :     if( !resultobj ) {
   30927           0 :       SWIG_fail;
   30928             :     }
   30929         229 :     for( size_t i = 0; i < *arg3; i++ ) {
   30930         158 :       PyList_SetItem(resultobj, i,
   30931         158 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   30932             :       /* We have borrowed the GDALAttributeHS */
   30933         158 :       (*arg2)[i] = NULL;
   30934             :     }
   30935             :   }
   30936          71 :   {
   30937             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30938          71 :     GDALReleaseAttributes(*arg2, *arg3);
   30939             :   }
   30940          71 :   {
   30941             :     /* %typemap(freearg) char **dict */
   30942          71 :     CSLDestroy( arg4 );
   30943             :   }
   30944          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; } }
   30945             :   return resultobj;
   30946           0 : fail:
   30947           0 :   {
   30948             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30949           0 :     GDALReleaseAttributes(*arg2, *arg3);
   30950             :   }
   30951           0 :   {
   30952             :     /* %typemap(freearg) char **dict */
   30953           0 :     CSLDestroy( arg4 );
   30954             :   }
   30955             :   return NULL;
   30956             : }
   30957             : 
   30958             : 
   30959           4 : SWIGINTERN PyObject *_wrap_Group_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30960           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30961           4 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30962           4 :   void *argp1 = 0 ;
   30963           4 :   int res1 = 0 ;
   30964           4 :   PyObject *swig_obj[1] ;
   30965           4 :   char **result = 0 ;
   30966             :   
   30967           4 :   if (!args) SWIG_fail;
   30968           4 :   swig_obj[0] = args;
   30969           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30970           4 :   if (!SWIG_IsOK(res1)) {
   30971           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetStructuralInfo" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30972             :   }
   30973           4 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30974           4 :   {
   30975           4 :     const int bLocalUseExceptions = GetUseExceptions();
   30976           4 :     if ( bLocalUseExceptions ) {
   30977           0 :       pushErrorHandler();
   30978             :     }
   30979           4 :     {
   30980           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30981           4 :       result = (char **)GDALGroupHS_GetStructuralInfo(arg1);
   30982           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30983             :     }
   30984           4 :     if ( bLocalUseExceptions ) {
   30985           0 :       popErrorHandler();
   30986             :     }
   30987             : #ifndef SED_HACKS
   30988             :     if ( bLocalUseExceptions ) {
   30989             :       CPLErr eclass = CPLGetLastErrorType();
   30990             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30991             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30992             :       }
   30993             :     }
   30994             : #endif
   30995             :   }
   30996           4 :   {
   30997             :     /* %typemap(out) char **dict */
   30998           4 :     resultobj = GetCSLStringAsPyDict(result, false);
   30999             :   }
   31000           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; } }
   31001             :   return resultobj;
   31002             : fail:
   31003             :   return NULL;
   31004             : }
   31005             : 
   31006             : 
   31007         180 : SWIGINTERN PyObject *_wrap_Group_CreateGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   31008         180 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31009         180 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31010         180 :   char *arg2 = (char *) 0 ;
   31011         180 :   char **arg3 = (char **) 0 ;
   31012         180 :   void *argp1 = 0 ;
   31013         180 :   int res1 = 0 ;
   31014         180 :   int res2 ;
   31015         180 :   char *buf2 = 0 ;
   31016         180 :   int alloc2 = 0 ;
   31017         180 :   PyObject * obj0 = 0 ;
   31018         180 :   PyObject * obj1 = 0 ;
   31019         180 :   PyObject * obj2 = 0 ;
   31020         180 :   char * kwnames[] = {
   31021             :     (char *)"self",  (char *)"name",  (char *)"options",  NULL 
   31022             :   };
   31023         180 :   GDALGroupHS *result = 0 ;
   31024             :   
   31025         180 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Group_CreateGroup", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   31026         180 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31027         180 :   if (!SWIG_IsOK(res1)) {
   31028           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31029             :   }
   31030         180 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31031         180 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   31032         180 :   if (!SWIG_IsOK(res2)) {
   31033           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateGroup" "', argument " "2"" of type '" "char const *""'");
   31034             :   }
   31035         180 :   arg2 = reinterpret_cast< char * >(buf2);
   31036         180 :   if (obj2) {
   31037           0 :     {
   31038             :       /* %typemap(in) char **dict */
   31039           0 :       arg3 = NULL;
   31040           0 :       if ( PySequence_Check( obj2 ) ) {
   31041           0 :         int bErr = FALSE;
   31042           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   31043           0 :         if ( bErr )
   31044             :         {
   31045           0 :           SWIG_fail;
   31046             :         }
   31047             :       }
   31048           0 :       else if ( PyMapping_Check( obj2 ) ) {
   31049           0 :         int bErr = FALSE;
   31050           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   31051           0 :         if ( bErr )
   31052             :         {
   31053           0 :           SWIG_fail;
   31054             :         }
   31055             :       }
   31056             :       else {
   31057           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31058           0 :         SWIG_fail;
   31059             :       }
   31060             :     }
   31061             :   }
   31062         180 :   {
   31063         180 :     if (!arg2) {
   31064           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31065             :     }
   31066             :   }
   31067         179 :   {
   31068         179 :     const int bLocalUseExceptions = GetUseExceptions();
   31069         179 :     if ( bLocalUseExceptions ) {
   31070          92 :       pushErrorHandler();
   31071             :     }
   31072         179 :     {
   31073         179 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31074         179 :       result = (GDALGroupHS *)GDALGroupHS_CreateGroup(arg1,(char const *)arg2,arg3);
   31075         179 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31076             :     }
   31077         179 :     if ( bLocalUseExceptions ) {
   31078          92 :       popErrorHandler();
   31079             :     }
   31080             : #ifndef SED_HACKS
   31081             :     if ( bLocalUseExceptions ) {
   31082             :       CPLErr eclass = CPLGetLastErrorType();
   31083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31085             :       }
   31086             :     }
   31087             : #endif
   31088             :   }
   31089         179 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   31090         179 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31091         179 :   {
   31092             :     /* %typemap(freearg) char **dict */
   31093         179 :     CSLDestroy( arg3 );
   31094             :   }
   31095         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; } }
   31096             :   return resultobj;
   31097           1 : fail:
   31098           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31099           1 :   {
   31100             :     /* %typemap(freearg) char **dict */
   31101           1 :     CSLDestroy( arg3 );
   31102             :   }
   31103             :   return NULL;
   31104             : }
   31105             : 
   31106             : 
   31107          20 : SWIGINTERN PyObject *_wrap_Group_DeleteGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31108          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31109          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31110          20 :   char *arg2 = (char *) 0 ;
   31111          20 :   char **arg3 = (char **) 0 ;
   31112          20 :   void *argp1 = 0 ;
   31113          20 :   int res1 = 0 ;
   31114          20 :   int res2 ;
   31115          20 :   char *buf2 = 0 ;
   31116          20 :   int alloc2 = 0 ;
   31117          20 :   PyObject *swig_obj[3] ;
   31118          20 :   CPLErr result;
   31119             :   
   31120          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteGroup", 2, 3, swig_obj)) SWIG_fail;
   31121          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31122          20 :   if (!SWIG_IsOK(res1)) {
   31123           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31124             :   }
   31125          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31126          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31127          20 :   if (!SWIG_IsOK(res2)) {
   31128           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteGroup" "', argument " "2"" of type '" "char const *""'");
   31129             :   }
   31130          20 :   arg2 = reinterpret_cast< char * >(buf2);
   31131          20 :   if (swig_obj[2]) {
   31132           0 :     {
   31133             :       /* %typemap(in) char **dict */
   31134           0 :       arg3 = NULL;
   31135           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31136           0 :         int bErr = FALSE;
   31137           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31138           0 :         if ( bErr )
   31139             :         {
   31140           0 :           SWIG_fail;
   31141             :         }
   31142             :       }
   31143           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31144           0 :         int bErr = FALSE;
   31145           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31146           0 :         if ( bErr )
   31147             :         {
   31148           0 :           SWIG_fail;
   31149             :         }
   31150             :       }
   31151             :       else {
   31152           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31153           0 :         SWIG_fail;
   31154             :       }
   31155             :     }
   31156             :   }
   31157          20 :   {
   31158          20 :     if (!arg2) {
   31159           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31160             :     }
   31161             :   }
   31162          20 :   {
   31163          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31164          20 :     if ( bLocalUseExceptions ) {
   31165          20 :       pushErrorHandler();
   31166             :     }
   31167          20 :     {
   31168          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31169          20 :       result = (CPLErr)GDALGroupHS_DeleteGroup(arg1,(char const *)arg2,arg3);
   31170          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31171             :     }
   31172          20 :     if ( bLocalUseExceptions ) {
   31173          20 :       popErrorHandler();
   31174             :     }
   31175             : #ifndef SED_HACKS
   31176             :     if ( bLocalUseExceptions ) {
   31177             :       CPLErr eclass = CPLGetLastErrorType();
   31178             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31179             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31180             :       }
   31181             :     }
   31182             : #endif
   31183             :   }
   31184          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31185          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31186          20 :   {
   31187             :     /* %typemap(freearg) char **dict */
   31188          20 :     CSLDestroy( arg3 );
   31189             :   }
   31190          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; } }
   31191             :   return resultobj;
   31192           0 : fail:
   31193           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31194           0 :   {
   31195             :     /* %typemap(freearg) char **dict */
   31196           0 :     CSLDestroy( arg3 );
   31197             :   }
   31198             :   return NULL;
   31199             : }
   31200             : 
   31201             : 
   31202         659 : SWIGINTERN PyObject *_wrap_Group_CreateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   31203         659 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31204         659 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31205         659 :   char *arg2 = (char *) 0 ;
   31206         659 :   char *arg3 = (char *) 0 ;
   31207         659 :   char *arg4 = (char *) 0 ;
   31208         659 :   GUIntBig arg5 ;
   31209         659 :   char **arg6 = (char **) 0 ;
   31210         659 :   void *argp1 = 0 ;
   31211         659 :   int res1 = 0 ;
   31212         659 :   int res2 ;
   31213         659 :   char *buf2 = 0 ;
   31214         659 :   int alloc2 = 0 ;
   31215         659 :   int res3 ;
   31216         659 :   char *buf3 = 0 ;
   31217         659 :   int alloc3 = 0 ;
   31218         659 :   int res4 ;
   31219         659 :   char *buf4 = 0 ;
   31220         659 :   int alloc4 = 0 ;
   31221         659 :   PyObject * obj0 = 0 ;
   31222         659 :   PyObject * obj1 = 0 ;
   31223         659 :   PyObject * obj2 = 0 ;
   31224         659 :   PyObject * obj3 = 0 ;
   31225         659 :   PyObject * obj4 = 0 ;
   31226         659 :   PyObject * obj5 = 0 ;
   31227         659 :   char * kwnames[] = {
   31228             :     (char *)"self",  (char *)"name",  (char *)"dim_type",  (char *)"direction",  (char *)"size",  (char *)"options",  NULL 
   31229             :   };
   31230         659 :   GDALDimensionHS *result = 0 ;
   31231             :   
   31232         659 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|O:Group_CreateDimension", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   31233         659 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31234         659 :   if (!SWIG_IsOK(res1)) {
   31235           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateDimension" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31236             :   }
   31237         659 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31238         659 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   31239         659 :   if (!SWIG_IsOK(res2)) {
   31240           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateDimension" "', argument " "2"" of type '" "char const *""'");
   31241             :   }
   31242         659 :   arg2 = reinterpret_cast< char * >(buf2);
   31243         659 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   31244         659 :   if (!SWIG_IsOK(res3)) {
   31245           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_CreateDimension" "', argument " "3"" of type '" "char const *""'");
   31246             :   }
   31247         659 :   arg3 = reinterpret_cast< char * >(buf3);
   31248         659 :   res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   31249         659 :   if (!SWIG_IsOK(res4)) {
   31250           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Group_CreateDimension" "', argument " "4"" of type '" "char const *""'");
   31251             :   }
   31252         659 :   arg4 = reinterpret_cast< char * >(buf4);
   31253         659 :   {
   31254         659 :     arg5 = (GIntBig)PyLong_AsUnsignedLongLong(obj4);
   31255             :   }
   31256         659 :   if (obj5) {
   31257           7 :     {
   31258             :       /* %typemap(in) char **dict */
   31259           7 :       arg6 = NULL;
   31260           7 :       if ( PySequence_Check( obj5 ) ) {
   31261           7 :         int bErr = FALSE;
   31262           7 :         arg6 = CSLFromPySequence(obj5, &bErr);
   31263           7 :         if ( bErr )
   31264             :         {
   31265           0 :           SWIG_fail;
   31266             :         }
   31267             :       }
   31268           0 :       else if ( PyMapping_Check( obj5 ) ) {
   31269           0 :         int bErr = FALSE;
   31270           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   31271           0 :         if ( bErr )
   31272             :         {
   31273           0 :           SWIG_fail;
   31274             :         }
   31275             :       }
   31276             :       else {
   31277           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31278           0 :         SWIG_fail;
   31279             :       }
   31280             :     }
   31281             :   }
   31282         659 :   {
   31283         659 :     if (!arg2) {
   31284           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31285             :     }
   31286             :   }
   31287         659 :   {
   31288         659 :     const int bLocalUseExceptions = GetUseExceptions();
   31289         659 :     if ( bLocalUseExceptions ) {
   31290         119 :       pushErrorHandler();
   31291             :     }
   31292         659 :     {
   31293         659 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31294         659 :       result = (GDALDimensionHS *)GDALGroupHS_CreateDimension(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
   31295         659 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31296             :     }
   31297         659 :     if ( bLocalUseExceptions ) {
   31298         119 :       popErrorHandler();
   31299             :     }
   31300             : #ifndef SED_HACKS
   31301             :     if ( bLocalUseExceptions ) {
   31302             :       CPLErr eclass = CPLGetLastErrorType();
   31303             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31304             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31305             :       }
   31306             :     }
   31307             : #endif
   31308             :   }
   31309         659 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_OWN |  0 );
   31310         659 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31311         659 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   31312         659 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   31313         659 :   {
   31314             :     /* %typemap(freearg) char **dict */
   31315         659 :     CSLDestroy( arg6 );
   31316             :   }
   31317         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; } }
   31318             :   return resultobj;
   31319           0 : fail:
   31320           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31321           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   31322           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   31323           0 :   {
   31324             :     /* %typemap(freearg) char **dict */
   31325           0 :     CSLDestroy( arg6 );
   31326             :   }
   31327             :   return NULL;
   31328             : }
   31329             : 
   31330             : 
   31331         613 : SWIGINTERN PyObject *_wrap_Group_CreateMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31332         613 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31333         613 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31334         613 :   char *arg2 = (char *) 0 ;
   31335         613 :   int arg3 ;
   31336         613 :   GDALDimensionHS **arg4 = (GDALDimensionHS **) 0 ;
   31337         613 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   31338         613 :   char **arg6 = (char **) 0 ;
   31339         613 :   void *argp1 = 0 ;
   31340         613 :   int res1 = 0 ;
   31341         613 :   int res2 ;
   31342         613 :   char *buf2 = 0 ;
   31343         613 :   int alloc2 = 0 ;
   31344         613 :   void *argp5 = 0 ;
   31345         613 :   int res5 = 0 ;
   31346         613 :   PyObject *swig_obj[5] ;
   31347         613 :   GDALMDArrayHS *result = 0 ;
   31348             :   
   31349         613 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateMDArray", 4, 5, swig_obj)) SWIG_fail;
   31350         613 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31351         613 :   if (!SWIG_IsOK(res1)) {
   31352           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31353             :   }
   31354         613 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31355         613 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31356         613 :   if (!SWIG_IsOK(res2)) {
   31357           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateMDArray" "', argument " "2"" of type '" "char const *""'");
   31358             :   }
   31359         613 :   arg2 = reinterpret_cast< char * >(buf2);
   31360         613 :   {
   31361             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   31362         613 :     if ( !PySequence_Check(swig_obj[2]) ) {
   31363           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   31364           1 :       SWIG_fail;
   31365             :     }
   31366         612 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   31367         612 :     if( size > (Py_ssize_t)INT_MAX ) {
   31368           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   31369           0 :       SWIG_fail;
   31370             :     }
   31371         612 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   31372           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   31373           0 :       SWIG_fail;
   31374             :     }
   31375         612 :     arg3 = (int)size;
   31376         612 :     arg4 = (GDALDimensionHS**) VSIMalloc(arg3*sizeof(GDALDimensionHS*));
   31377         612 :     if( !arg4) {
   31378           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   31379           0 :       SWIG_fail;
   31380             :     }
   31381             :     
   31382        1435 :     for( int i = 0; i<arg3; i++ ) {
   31383         825 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   31384         825 :       GDALDimensionHS* rawobjectpointer = NULL;
   31385         825 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   31386         825 :       if (!rawobjectpointer) {
   31387           2 :         Py_DECREF(o);
   31388           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   31389           2 :         SWIG_fail;
   31390             :       }
   31391         823 :       arg4[i] = rawobjectpointer;
   31392         823 :       Py_DECREF(o);
   31393             :       
   31394             :     }
   31395             :   }
   31396         610 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31397         610 :   if (!SWIG_IsOK(res5)) {
   31398           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateMDArray" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   31399             :   }
   31400         610 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   31401         610 :   if (swig_obj[4]) {
   31402         134 :     {
   31403             :       /* %typemap(in) char **dict */
   31404         134 :       arg6 = NULL;
   31405         134 :       if ( PySequence_Check( swig_obj[4] ) ) {
   31406         134 :         int bErr = FALSE;
   31407         134 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   31408         134 :         if ( bErr )
   31409             :         {
   31410           0 :           SWIG_fail;
   31411             :         }
   31412             :       }
   31413           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   31414           0 :         int bErr = FALSE;
   31415           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   31416           0 :         if ( bErr )
   31417             :         {
   31418           0 :           SWIG_fail;
   31419             :         }
   31420             :       }
   31421             :       else {
   31422           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31423           0 :         SWIG_fail;
   31424             :       }
   31425             :     }
   31426             :   }
   31427         610 :   {
   31428         610 :     if (!arg2) {
   31429           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31430             :     }
   31431             :   }
   31432         609 :   {
   31433         609 :     if (!arg5) {
   31434           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31435             :     }
   31436             :   }
   31437         608 :   {
   31438         608 :     const int bLocalUseExceptions = GetUseExceptions();
   31439         608 :     if ( bLocalUseExceptions ) {
   31440         163 :       pushErrorHandler();
   31441             :     }
   31442         608 :     {
   31443         608 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31444         608 :       result = (GDALMDArrayHS *)GDALGroupHS_CreateMDArray(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   31445         608 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31446             :     }
   31447         608 :     if ( bLocalUseExceptions ) {
   31448         163 :       popErrorHandler();
   31449             :     }
   31450             : #ifndef SED_HACKS
   31451             :     if ( bLocalUseExceptions ) {
   31452             :       CPLErr eclass = CPLGetLastErrorType();
   31453             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31454             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31455             :       }
   31456             :     }
   31457             : #endif
   31458             :   }
   31459         608 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   31460         608 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31461         608 :   {
   31462             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31463         608 :     CPLFree( arg4 );
   31464             :   }
   31465         608 :   {
   31466             :     /* %typemap(freearg) char **dict */
   31467         608 :     CSLDestroy( arg6 );
   31468             :   }
   31469         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; } }
   31470             :   return resultobj;
   31471           5 : fail:
   31472           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31473           5 :   {
   31474             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31475           5 :     CPLFree( arg4 );
   31476             :   }
   31477           5 :   {
   31478             :     /* %typemap(freearg) char **dict */
   31479           5 :     CSLDestroy( arg6 );
   31480             :   }
   31481             :   return NULL;
   31482             : }
   31483             : 
   31484             : 
   31485          20 : SWIGINTERN PyObject *_wrap_Group_DeleteMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31486          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31487          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31488          20 :   char *arg2 = (char *) 0 ;
   31489          20 :   char **arg3 = (char **) 0 ;
   31490          20 :   void *argp1 = 0 ;
   31491          20 :   int res1 = 0 ;
   31492          20 :   int res2 ;
   31493          20 :   char *buf2 = 0 ;
   31494          20 :   int alloc2 = 0 ;
   31495          20 :   PyObject *swig_obj[3] ;
   31496          20 :   CPLErr result;
   31497             :   
   31498          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteMDArray", 2, 3, swig_obj)) SWIG_fail;
   31499          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31500          20 :   if (!SWIG_IsOK(res1)) {
   31501           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31502             :   }
   31503          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31504          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31505          20 :   if (!SWIG_IsOK(res2)) {
   31506           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteMDArray" "', argument " "2"" of type '" "char const *""'");
   31507             :   }
   31508          20 :   arg2 = reinterpret_cast< char * >(buf2);
   31509          20 :   if (swig_obj[2]) {
   31510           0 :     {
   31511             :       /* %typemap(in) char **dict */
   31512           0 :       arg3 = NULL;
   31513           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31514           0 :         int bErr = FALSE;
   31515           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31516           0 :         if ( bErr )
   31517             :         {
   31518           0 :           SWIG_fail;
   31519             :         }
   31520             :       }
   31521           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31522           0 :         int bErr = FALSE;
   31523           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31524           0 :         if ( bErr )
   31525             :         {
   31526           0 :           SWIG_fail;
   31527             :         }
   31528             :       }
   31529             :       else {
   31530           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31531           0 :         SWIG_fail;
   31532             :       }
   31533             :     }
   31534             :   }
   31535          20 :   {
   31536          20 :     if (!arg2) {
   31537           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31538             :     }
   31539             :   }
   31540          20 :   {
   31541          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31542          20 :     if ( bLocalUseExceptions ) {
   31543          20 :       pushErrorHandler();
   31544             :     }
   31545          20 :     {
   31546          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31547          20 :       result = (CPLErr)GDALGroupHS_DeleteMDArray(arg1,(char const *)arg2,arg3);
   31548          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31549             :     }
   31550          20 :     if ( bLocalUseExceptions ) {
   31551          20 :       popErrorHandler();
   31552             :     }
   31553             : #ifndef SED_HACKS
   31554             :     if ( bLocalUseExceptions ) {
   31555             :       CPLErr eclass = CPLGetLastErrorType();
   31556             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31557             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31558             :       }
   31559             :     }
   31560             : #endif
   31561             :   }
   31562          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31563          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31564          20 :   {
   31565             :     /* %typemap(freearg) char **dict */
   31566          20 :     CSLDestroy( arg3 );
   31567             :   }
   31568          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; } }
   31569             :   return resultobj;
   31570           0 : fail:
   31571           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31572           0 :   {
   31573             :     /* %typemap(freearg) char **dict */
   31574           0 :     CSLDestroy( arg3 );
   31575             :   }
   31576             :   return NULL;
   31577             : }
   31578             : 
   31579             : 
   31580         126 : SWIGINTERN PyObject *_wrap_Group_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31581         126 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31582         126 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31583         126 :   char *arg2 = (char *) 0 ;
   31584         126 :   int arg3 ;
   31585         126 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   31586         126 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   31587         126 :   char **arg6 = (char **) 0 ;
   31588         126 :   void *argp1 = 0 ;
   31589         126 :   int res1 = 0 ;
   31590         126 :   int res2 ;
   31591         126 :   char *buf2 = 0 ;
   31592         126 :   int alloc2 = 0 ;
   31593         126 :   void *argp5 = 0 ;
   31594         126 :   int res5 = 0 ;
   31595         126 :   PyObject *swig_obj[5] ;
   31596         126 :   GDALAttributeHS *result = 0 ;
   31597             :   
   31598         126 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   31599         126 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31600         126 :   if (!SWIG_IsOK(res1)) {
   31601           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31602             :   }
   31603         126 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31604         126 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31605         126 :   if (!SWIG_IsOK(res2)) {
   31606           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   31607             :   }
   31608         126 :   arg2 = reinterpret_cast< char * >(buf2);
   31609         126 :   {
   31610             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   31611         126 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   31612         126 :     if( arg3 < 0 ) {
   31613           0 :       SWIG_fail;
   31614             :     }
   31615             :   }
   31616         126 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31617         126 :   if (!SWIG_IsOK(res5)) {
   31618           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   31619             :   }
   31620         126 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   31621         126 :   if (swig_obj[4]) {
   31622           6 :     {
   31623             :       /* %typemap(in) char **dict */
   31624           6 :       arg6 = NULL;
   31625           6 :       if ( PySequence_Check( swig_obj[4] ) ) {
   31626           6 :         int bErr = FALSE;
   31627           6 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   31628           6 :         if ( bErr )
   31629             :         {
   31630           0 :           SWIG_fail;
   31631             :         }
   31632             :       }
   31633           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   31634           0 :         int bErr = FALSE;
   31635           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   31636           0 :         if ( bErr )
   31637             :         {
   31638           0 :           SWIG_fail;
   31639             :         }
   31640             :       }
   31641             :       else {
   31642           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31643           0 :         SWIG_fail;
   31644             :       }
   31645             :     }
   31646             :   }
   31647         126 :   {
   31648         126 :     if (!arg2) {
   31649           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31650             :     }
   31651             :   }
   31652         125 :   {
   31653         125 :     if (!arg5) {
   31654           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31655             :     }
   31656             :   }
   31657         125 :   {
   31658         125 :     const int bLocalUseExceptions = GetUseExceptions();
   31659         125 :     if ( bLocalUseExceptions ) {
   31660          53 :       pushErrorHandler();
   31661             :     }
   31662         125 :     {
   31663         125 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31664         125 :       result = (GDALAttributeHS *)GDALGroupHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   31665         125 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31666             :     }
   31667         125 :     if ( bLocalUseExceptions ) {
   31668          53 :       popErrorHandler();
   31669             :     }
   31670             : #ifndef SED_HACKS
   31671             :     if ( bLocalUseExceptions ) {
   31672             :       CPLErr eclass = CPLGetLastErrorType();
   31673             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31674             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31675             :       }
   31676             :     }
   31677             : #endif
   31678             :   }
   31679         125 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   31680         125 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31681         125 :   {
   31682             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31683         125 :     free(arg4);
   31684             :   }
   31685         125 :   {
   31686             :     /* %typemap(freearg) char **dict */
   31687         125 :     CSLDestroy( arg6 );
   31688             :   }
   31689         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; } }
   31690             :   return resultobj;
   31691           1 : fail:
   31692           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31693           1 :   {
   31694             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31695           1 :     free(arg4);
   31696             :   }
   31697           1 :   {
   31698             :     /* %typemap(freearg) char **dict */
   31699           1 :     CSLDestroy( arg6 );
   31700             :   }
   31701             :   return NULL;
   31702             : }
   31703             : 
   31704             : 
   31705          25 : SWIGINTERN PyObject *_wrap_Group_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31706          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31707          25 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31708          25 :   char *arg2 = (char *) 0 ;
   31709          25 :   char **arg3 = (char **) 0 ;
   31710          25 :   void *argp1 = 0 ;
   31711          25 :   int res1 = 0 ;
   31712          25 :   int res2 ;
   31713          25 :   char *buf2 = 0 ;
   31714          25 :   int alloc2 = 0 ;
   31715          25 :   PyObject *swig_obj[3] ;
   31716          25 :   CPLErr result;
   31717             :   
   31718          25 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   31719          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31720          25 :   if (!SWIG_IsOK(res1)) {
   31721           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31722             :   }
   31723          25 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31724          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31725          25 :   if (!SWIG_IsOK(res2)) {
   31726           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   31727             :   }
   31728          25 :   arg2 = reinterpret_cast< char * >(buf2);
   31729          25 :   if (swig_obj[2]) {
   31730           0 :     {
   31731             :       /* %typemap(in) char **dict */
   31732           0 :       arg3 = NULL;
   31733           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31734           0 :         int bErr = FALSE;
   31735           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31736           0 :         if ( bErr )
   31737             :         {
   31738           0 :           SWIG_fail;
   31739             :         }
   31740             :       }
   31741           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31742           0 :         int bErr = FALSE;
   31743           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31744           0 :         if ( bErr )
   31745             :         {
   31746           0 :           SWIG_fail;
   31747             :         }
   31748             :       }
   31749             :       else {
   31750           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31751           0 :         SWIG_fail;
   31752             :       }
   31753             :     }
   31754             :   }
   31755          25 :   {
   31756          25 :     if (!arg2) {
   31757           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31758             :     }
   31759             :   }
   31760          25 :   {
   31761          25 :     const int bLocalUseExceptions = GetUseExceptions();
   31762          25 :     if ( bLocalUseExceptions ) {
   31763          25 :       pushErrorHandler();
   31764             :     }
   31765          25 :     {
   31766          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31767          25 :       result = (CPLErr)GDALGroupHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   31768          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31769             :     }
   31770          25 :     if ( bLocalUseExceptions ) {
   31771          25 :       popErrorHandler();
   31772             :     }
   31773             : #ifndef SED_HACKS
   31774             :     if ( bLocalUseExceptions ) {
   31775             :       CPLErr eclass = CPLGetLastErrorType();
   31776             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31777             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31778             :       }
   31779             :     }
   31780             : #endif
   31781             :   }
   31782          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31783          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31784          25 :   {
   31785             :     /* %typemap(freearg) char **dict */
   31786          25 :     CSLDestroy( arg3 );
   31787             :   }
   31788          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; } }
   31789             :   return resultobj;
   31790           0 : fail:
   31791           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31792           0 :   {
   31793             :     /* %typemap(freearg) char **dict */
   31794           0 :     CSLDestroy( arg3 );
   31795             :   }
   31796             :   return NULL;
   31797             : }
   31798             : 
   31799             : 
   31800          45 : SWIGINTERN PyObject *_wrap_Group_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31801          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31802          45 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31803          45 :   char *arg2 = (char *) 0 ;
   31804          45 :   void *argp1 = 0 ;
   31805          45 :   int res1 = 0 ;
   31806          45 :   int res2 ;
   31807          45 :   char *buf2 = 0 ;
   31808          45 :   int alloc2 = 0 ;
   31809          45 :   PyObject *swig_obj[2] ;
   31810          45 :   CPLErr result;
   31811             :   
   31812          45 :   if (!SWIG_Python_UnpackTuple(args, "Group_Rename", 2, 2, swig_obj)) SWIG_fail;
   31813          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31814          45 :   if (!SWIG_IsOK(res1)) {
   31815           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_Rename" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31816             :   }
   31817          45 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31818          45 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31819          45 :   if (!SWIG_IsOK(res2)) {
   31820           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_Rename" "', argument " "2"" of type '" "char const *""'");
   31821             :   }
   31822          45 :   arg2 = reinterpret_cast< char * >(buf2);
   31823          45 :   {
   31824          45 :     const int bLocalUseExceptions = GetUseExceptions();
   31825          45 :     if ( bLocalUseExceptions ) {
   31826          45 :       pushErrorHandler();
   31827             :     }
   31828          45 :     {
   31829          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31830          45 :       result = (CPLErr)GDALGroupHS_Rename(arg1,(char const *)arg2);
   31831          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31832             :     }
   31833          45 :     if ( bLocalUseExceptions ) {
   31834          45 :       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          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31846          45 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31847         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; } }
   31848             :   return resultobj;
   31849           0 : fail:
   31850           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31851             :   return NULL;
   31852             : }
   31853             : 
   31854             : 
   31855          14 : SWIGINTERN PyObject *_wrap_Group_SubsetDimensionFromSelection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31856          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31857          14 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31858          14 :   char *arg2 = (char *) 0 ;
   31859          14 :   char **arg3 = (char **) 0 ;
   31860          14 :   void *argp1 = 0 ;
   31861          14 :   int res1 = 0 ;
   31862          14 :   int res2 ;
   31863          14 :   char *buf2 = 0 ;
   31864          14 :   int alloc2 = 0 ;
   31865          14 :   PyObject *swig_obj[3] ;
   31866          14 :   GDALGroupHS *result = 0 ;
   31867             :   
   31868          14 :   if (!SWIG_Python_UnpackTuple(args, "Group_SubsetDimensionFromSelection", 2, 3, swig_obj)) SWIG_fail;
   31869          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31870          14 :   if (!SWIG_IsOK(res1)) {
   31871           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31872             :   }
   31873          14 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31874          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31875          14 :   if (!SWIG_IsOK(res2)) {
   31876           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "2"" of type '" "char const *""'");
   31877             :   }
   31878          14 :   arg2 = reinterpret_cast< char * >(buf2);
   31879          14 :   if (swig_obj[2]) {
   31880           0 :     {
   31881             :       /* %typemap(in) char **dict */
   31882           0 :       arg3 = NULL;
   31883           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31884           0 :         int bErr = FALSE;
   31885           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31886           0 :         if ( bErr )
   31887             :         {
   31888           0 :           SWIG_fail;
   31889             :         }
   31890             :       }
   31891           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31892           0 :         int bErr = FALSE;
   31893           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31894           0 :         if ( bErr )
   31895             :         {
   31896           0 :           SWIG_fail;
   31897             :         }
   31898             :       }
   31899             :       else {
   31900           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31901           0 :         SWIG_fail;
   31902             :       }
   31903             :     }
   31904             :   }
   31905          14 :   {
   31906          14 :     const int bLocalUseExceptions = GetUseExceptions();
   31907          14 :     if ( bLocalUseExceptions ) {
   31908          13 :       pushErrorHandler();
   31909             :     }
   31910          14 :     {
   31911          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31912          14 :       result = (GDALGroupHS *)GDALGroupHS_SubsetDimensionFromSelection(arg1,(char const *)arg2,arg3);
   31913          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31914             :     }
   31915          14 :     if ( bLocalUseExceptions ) {
   31916          13 :       popErrorHandler();
   31917             :     }
   31918             : #ifndef SED_HACKS
   31919             :     if ( bLocalUseExceptions ) {
   31920             :       CPLErr eclass = CPLGetLastErrorType();
   31921             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31922             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31923             :       }
   31924             :     }
   31925             : #endif
   31926             :   }
   31927          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   31928          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31929          14 :   {
   31930             :     /* %typemap(freearg) char **dict */
   31931          14 :     CSLDestroy( arg3 );
   31932             :   }
   31933          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; } }
   31934             :   return resultobj;
   31935           0 : fail:
   31936           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31937           0 :   {
   31938             :     /* %typemap(freearg) char **dict */
   31939           0 :     CSLDestroy( arg3 );
   31940             :   }
   31941             :   return NULL;
   31942             : }
   31943             : 
   31944             : 
   31945           2 : SWIGINTERN PyObject *_wrap_Group_GetDataTypeCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31946           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31947           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31948           2 :   void *argp1 = 0 ;
   31949           2 :   int res1 = 0 ;
   31950           2 :   PyObject *swig_obj[1] ;
   31951           2 :   size_t result;
   31952             :   
   31953           2 :   if (!args) SWIG_fail;
   31954           2 :   swig_obj[0] = args;
   31955           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31956           2 :   if (!SWIG_IsOK(res1)) {
   31957           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataTypeCount" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31958             :   }
   31959           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31960           2 :   {
   31961           2 :     const int bLocalUseExceptions = GetUseExceptions();
   31962           2 :     if ( bLocalUseExceptions ) {
   31963           2 :       pushErrorHandler();
   31964             :     }
   31965           2 :     {
   31966           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31967           2 :       result = GDALGroupHS_GetDataTypeCount(arg1);
   31968           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31969             :     }
   31970           2 :     if ( bLocalUseExceptions ) {
   31971           2 :       popErrorHandler();
   31972             :     }
   31973             : #ifndef SED_HACKS
   31974             :     if ( bLocalUseExceptions ) {
   31975             :       CPLErr eclass = CPLGetLastErrorType();
   31976             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31977             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31978             :       }
   31979             :     }
   31980             : #endif
   31981             :   }
   31982           2 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   31983           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; } }
   31984             :   return resultobj;
   31985             : fail:
   31986             :   return NULL;
   31987             : }
   31988             : 
   31989             : 
   31990           2 : SWIGINTERN PyObject *_wrap_Group_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31991           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31992           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31993           2 :   size_t arg2 ;
   31994           2 :   void *argp1 = 0 ;
   31995           2 :   int res1 = 0 ;
   31996           2 :   size_t val2 ;
   31997           2 :   int ecode2 = 0 ;
   31998           2 :   PyObject *swig_obj[2] ;
   31999           2 :   GDALExtendedDataTypeHS *result = 0 ;
   32000             :   
   32001           2 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDataType", 2, 2, swig_obj)) SWIG_fail;
   32002           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   32003           2 :   if (!SWIG_IsOK(res1)) {
   32004           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataType" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   32005             :   }
   32006           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   32007           2 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   32008           2 :   if (!SWIG_IsOK(ecode2)) {
   32009           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Group_GetDataType" "', argument " "2"" of type '" "size_t""'");
   32010             :   } 
   32011           2 :   arg2 = static_cast< size_t >(val2);
   32012           2 :   {
   32013           2 :     const int bLocalUseExceptions = GetUseExceptions();
   32014           2 :     if ( bLocalUseExceptions ) {
   32015           2 :       pushErrorHandler();
   32016             :     }
   32017           2 :     {
   32018           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32019           2 :       result = (GDALExtendedDataTypeHS *)GDALGroupHS_GetDataType(arg1,arg2);
   32020           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32021             :     }
   32022           2 :     if ( bLocalUseExceptions ) {
   32023           2 :       popErrorHandler();
   32024             :     }
   32025             : #ifndef SED_HACKS
   32026             :     if ( bLocalUseExceptions ) {
   32027             :       CPLErr eclass = CPLGetLastErrorType();
   32028             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32029             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32030             :       }
   32031             :     }
   32032             : #endif
   32033             :   }
   32034           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   32035           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; } }
   32036             :   return resultobj;
   32037             : fail:
   32038             :   return NULL;
   32039             : }
   32040             : 
   32041             : 
   32042         277 : SWIGINTERN PyObject *Group_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32043         277 :   PyObject *obj;
   32044         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   32045         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGroupHS, SWIG_NewClientData(obj));
   32046         277 :   return SWIG_Py_Void();
   32047             : }
   32048             : 
   32049          12 : SWIGINTERN PyObject *_wrap_Statistics_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32050          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32051          12 :   Statistics *arg1 = (Statistics *) 0 ;
   32052          12 :   void *argp1 = 0 ;
   32053          12 :   int res1 = 0 ;
   32054          12 :   PyObject *swig_obj[1] ;
   32055          12 :   double result;
   32056             :   
   32057          12 :   if (!args) SWIG_fail;
   32058          12 :   swig_obj[0] = args;
   32059          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32060          12 :   if (!SWIG_IsOK(res1)) {
   32061           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_min_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32062             :   }
   32063          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32064          12 :   {
   32065          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32066          12 :     result = (double) ((arg1)->min);
   32067          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32068             :   }
   32069          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   32070          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; } }
   32071             :   return resultobj;
   32072             : fail:
   32073             :   return NULL;
   32074             : }
   32075             : 
   32076             : 
   32077          12 : SWIGINTERN PyObject *_wrap_Statistics_max_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32078          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32079          12 :   Statistics *arg1 = (Statistics *) 0 ;
   32080          12 :   void *argp1 = 0 ;
   32081          12 :   int res1 = 0 ;
   32082          12 :   PyObject *swig_obj[1] ;
   32083          12 :   double result;
   32084             :   
   32085          12 :   if (!args) SWIG_fail;
   32086          12 :   swig_obj[0] = args;
   32087          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32088          12 :   if (!SWIG_IsOK(res1)) {
   32089           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_max_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32090             :   }
   32091          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32092          12 :   {
   32093          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32094          12 :     result = (double) ((arg1)->max);
   32095          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32096             :   }
   32097          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   32098          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; } }
   32099             :   return resultobj;
   32100             : fail:
   32101             :   return NULL;
   32102             : }
   32103             : 
   32104             : 
   32105           5 : SWIGINTERN PyObject *_wrap_Statistics_mean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32106           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32107           5 :   Statistics *arg1 = (Statistics *) 0 ;
   32108           5 :   void *argp1 = 0 ;
   32109           5 :   int res1 = 0 ;
   32110           5 :   PyObject *swig_obj[1] ;
   32111           5 :   double result;
   32112             :   
   32113           5 :   if (!args) SWIG_fail;
   32114           5 :   swig_obj[0] = args;
   32115           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32116           5 :   if (!SWIG_IsOK(res1)) {
   32117           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_mean_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32118             :   }
   32119           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32120           5 :   {
   32121           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32122           5 :     result = (double) ((arg1)->mean);
   32123           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32124             :   }
   32125           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   32126           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; } }
   32127             :   return resultobj;
   32128             : fail:
   32129             :   return NULL;
   32130             : }
   32131             : 
   32132             : 
   32133           5 : SWIGINTERN PyObject *_wrap_Statistics_std_dev_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32134           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32135           5 :   Statistics *arg1 = (Statistics *) 0 ;
   32136           5 :   void *argp1 = 0 ;
   32137           5 :   int res1 = 0 ;
   32138           5 :   PyObject *swig_obj[1] ;
   32139           5 :   double result;
   32140             :   
   32141           5 :   if (!args) SWIG_fail;
   32142           5 :   swig_obj[0] = args;
   32143           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32144           5 :   if (!SWIG_IsOK(res1)) {
   32145           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_std_dev_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32146             :   }
   32147           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32148           5 :   {
   32149           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32150           5 :     result = (double) ((arg1)->std_dev);
   32151           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32152             :   }
   32153           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   32154           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; } }
   32155             :   return resultobj;
   32156             : fail:
   32157             :   return NULL;
   32158             : }
   32159             : 
   32160             : 
   32161           5 : SWIGINTERN PyObject *_wrap_Statistics_valid_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32162           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32163           5 :   Statistics *arg1 = (Statistics *) 0 ;
   32164           5 :   void *argp1 = 0 ;
   32165           5 :   int res1 = 0 ;
   32166           5 :   PyObject *swig_obj[1] ;
   32167           5 :   GIntBig result;
   32168             :   
   32169           5 :   if (!args) SWIG_fail;
   32170           5 :   swig_obj[0] = args;
   32171           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32172           5 :   if (!SWIG_IsOK(res1)) {
   32173           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_valid_count_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32174             :   }
   32175           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32176           5 :   {
   32177           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32178           5 :     result =  ((arg1)->valid_count);
   32179           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32180             :   }
   32181           5 :   {
   32182           5 :     resultobj = PyLong_FromLongLong(result);
   32183             :   }
   32184           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; } }
   32185             :   return resultobj;
   32186             : fail:
   32187             :   return NULL;
   32188             : }
   32189             : 
   32190             : 
   32191           0 : SWIGINTERN PyObject *_wrap_delete_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32192           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32193           0 :   Statistics *arg1 = (Statistics *) 0 ;
   32194           0 :   void *argp1 = 0 ;
   32195           0 :   int res1 = 0 ;
   32196           0 :   PyObject *swig_obj[1] ;
   32197             :   
   32198           0 :   if (!args) SWIG_fail;
   32199           0 :   swig_obj[0] = args;
   32200           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, SWIG_POINTER_DISOWN |  0 );
   32201           0 :   if (!SWIG_IsOK(res1)) {
   32202           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Statistics" "', argument " "1"" of type '" "Statistics *""'"); 
   32203             :   }
   32204           0 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32205           0 :   {
   32206           0 :     const int bLocalUseExceptions = GetUseExceptions();
   32207           0 :     if ( bLocalUseExceptions ) {
   32208           0 :       pushErrorHandler();
   32209             :     }
   32210           0 :     {
   32211           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32212           0 :       delete_Statistics(arg1);
   32213           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32214             :     }
   32215           0 :     if ( bLocalUseExceptions ) {
   32216           0 :       popErrorHandler();
   32217             :     }
   32218             : #ifndef SED_HACKS
   32219             :     if ( bLocalUseExceptions ) {
   32220             :       CPLErr eclass = CPLGetLastErrorType();
   32221             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32222             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32223             :       }
   32224             :     }
   32225             : #endif
   32226             :   }
   32227           0 :   resultobj = SWIG_Py_Void();
   32228           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; } }
   32229             :   return resultobj;
   32230             : fail:
   32231             :   return NULL;
   32232             : }
   32233             : 
   32234             : 
   32235           0 : SWIGINTERN PyObject *_wrap_new_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32236           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32237           0 :   Statistics *result = 0 ;
   32238             :   
   32239           0 :   if (!SWIG_Python_UnpackTuple(args, "new_Statistics", 0, 0, 0)) SWIG_fail;
   32240           0 :   {
   32241           0 :     const int bLocalUseExceptions = GetUseExceptions();
   32242           0 :     if ( bLocalUseExceptions ) {
   32243           0 :       pushErrorHandler();
   32244             :     }
   32245           0 :     {
   32246           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32247           0 :       result = (Statistics *)new Statistics();
   32248           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32249             :     }
   32250           0 :     if ( bLocalUseExceptions ) {
   32251           0 :       popErrorHandler();
   32252             :     }
   32253             : #ifndef SED_HACKS
   32254             :     if ( bLocalUseExceptions ) {
   32255             :       CPLErr eclass = CPLGetLastErrorType();
   32256             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32257             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32258             :       }
   32259             :     }
   32260             : #endif
   32261             :   }
   32262           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, SWIG_POINTER_NEW |  0 );
   32263           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; } }
   32264             :   return resultobj;
   32265           0 : fail:
   32266           0 :   return NULL;
   32267             : }
   32268             : 
   32269             : 
   32270         277 : SWIGINTERN PyObject *Statistics_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32271         277 :   PyObject *obj;
   32272         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   32273         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_Statistics, SWIG_NewClientData(obj));
   32274         277 :   return SWIG_Py_Void();
   32275             : }
   32276             : 
   32277           0 : SWIGINTERN PyObject *Statistics_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32278           0 :   return SWIG_Python_InitShadowInstance(args);
   32279             : }
   32280             : 
   32281        2057 : SWIGINTERN PyObject *_wrap_delete_MDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32282        2057 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32283        2057 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32284        2057 :   void *argp1 = 0 ;
   32285        2057 :   int res1 = 0 ;
   32286        2057 :   PyObject *swig_obj[1] ;
   32287             :   
   32288        2057 :   if (!args) SWIG_fail;
   32289        2057 :   swig_obj[0] = args;
   32290        2057 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_DISOWN |  0 );
   32291        2057 :   if (!SWIG_IsOK(res1)) {
   32292           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MDArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32293             :   }
   32294        2057 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32295        2057 :   {
   32296        2057 :     const int bLocalUseExceptions = GetUseExceptions();
   32297        2057 :     if ( bLocalUseExceptions ) {
   32298         457 :       pushErrorHandler();
   32299             :     }
   32300        2057 :     {
   32301        2057 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32302        2057 :       delete_GDALMDArrayHS(arg1);
   32303        2057 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32304             :     }
   32305        2057 :     if ( bLocalUseExceptions ) {
   32306         457 :       popErrorHandler();
   32307             :     }
   32308             : #ifndef SED_HACKS
   32309             :     if ( bLocalUseExceptions ) {
   32310             :       CPLErr eclass = CPLGetLastErrorType();
   32311             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32312             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32313             :       }
   32314             :     }
   32315             : #endif
   32316             :   }
   32317        2057 :   resultobj = SWIG_Py_Void();
   32318        2057 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32319             :   return resultobj;
   32320             : fail:
   32321             :   return NULL;
   32322             : }
   32323             : 
   32324             : 
   32325          83 : SWIGINTERN PyObject *_wrap_MDArray_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32326          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32327          83 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32328          83 :   void *argp1 = 0 ;
   32329          83 :   int res1 = 0 ;
   32330          83 :   PyObject *swig_obj[1] ;
   32331          83 :   char *result = 0 ;
   32332             :   
   32333          83 :   if (!args) SWIG_fail;
   32334          83 :   swig_obj[0] = args;
   32335          83 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32336          83 :   if (!SWIG_IsOK(res1)) {
   32337           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32338             :   }
   32339          83 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32340          83 :   {
   32341          83 :     const int bLocalUseExceptions = GetUseExceptions();
   32342          83 :     if ( bLocalUseExceptions ) {
   32343          27 :       pushErrorHandler();
   32344             :     }
   32345          83 :     {
   32346          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32347          83 :       result = (char *)GDALMDArrayHS_GetName(arg1);
   32348          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32349             :     }
   32350          83 :     if ( bLocalUseExceptions ) {
   32351          27 :       popErrorHandler();
   32352             :     }
   32353             : #ifndef SED_HACKS
   32354             :     if ( bLocalUseExceptions ) {
   32355             :       CPLErr eclass = CPLGetLastErrorType();
   32356             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32357             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32358             :       }
   32359             :     }
   32360             : #endif
   32361             :   }
   32362          83 :   resultobj = SWIG_FromCharPtr((const char *)result);
   32363          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; } }
   32364             :   return resultobj;
   32365             : fail:
   32366             :   return NULL;
   32367             : }
   32368             : 
   32369             : 
   32370          50 : SWIGINTERN PyObject *_wrap_MDArray_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32371          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32372          50 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32373          50 :   void *argp1 = 0 ;
   32374          50 :   int res1 = 0 ;
   32375          50 :   PyObject *swig_obj[1] ;
   32376          50 :   char *result = 0 ;
   32377             :   
   32378          50 :   if (!args) SWIG_fail;
   32379          50 :   swig_obj[0] = args;
   32380          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32381          50 :   if (!SWIG_IsOK(res1)) {
   32382           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetFullName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32383             :   }
   32384          50 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32385          50 :   {
   32386          50 :     const int bLocalUseExceptions = GetUseExceptions();
   32387          50 :     if ( bLocalUseExceptions ) {
   32388          27 :       pushErrorHandler();
   32389             :     }
   32390          50 :     {
   32391          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32392          50 :       result = (char *)GDALMDArrayHS_GetFullName(arg1);
   32393          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32394             :     }
   32395          50 :     if ( bLocalUseExceptions ) {
   32396          27 :       popErrorHandler();
   32397             :     }
   32398             : #ifndef SED_HACKS
   32399             :     if ( bLocalUseExceptions ) {
   32400             :       CPLErr eclass = CPLGetLastErrorType();
   32401             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32402             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32403             :       }
   32404             :     }
   32405             : #endif
   32406             :   }
   32407          50 :   resultobj = SWIG_FromCharPtr((const char *)result);
   32408          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; } }
   32409             :   return resultobj;
   32410             : fail:
   32411             :   return NULL;
   32412             : }
   32413             : 
   32414             : 
   32415           6 : SWIGINTERN PyObject *_wrap_MDArray_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32416           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32417           6 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32418           6 :   void *argp1 = 0 ;
   32419           6 :   int res1 = 0 ;
   32420           6 :   PyObject *swig_obj[1] ;
   32421           6 :   GUIntBig result;
   32422             :   
   32423           6 :   if (!args) SWIG_fail;
   32424           6 :   swig_obj[0] = args;
   32425           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32426           6 :   if (!SWIG_IsOK(res1)) {
   32427           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetTotalElementsCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32428             :   }
   32429           6 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32430           6 :   {
   32431           6 :     const int bLocalUseExceptions = GetUseExceptions();
   32432           6 :     if ( bLocalUseExceptions ) {
   32433           0 :       pushErrorHandler();
   32434             :     }
   32435           6 :     {
   32436           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32437           6 :       result = GDALMDArrayHS_GetTotalElementsCount(arg1);
   32438           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32439             :     }
   32440           6 :     if ( bLocalUseExceptions ) {
   32441           0 :       popErrorHandler();
   32442             :     }
   32443             : #ifndef SED_HACKS
   32444             :     if ( bLocalUseExceptions ) {
   32445             :       CPLErr eclass = CPLGetLastErrorType();
   32446             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32447             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32448             :       }
   32449             :     }
   32450             : #endif
   32451             :   }
   32452           6 :   {
   32453           6 :     resultobj = PyLong_FromUnsignedLongLong(result);
   32454             :   }
   32455           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; } }
   32456             :   return resultobj;
   32457             : fail:
   32458             :   return NULL;
   32459             : }
   32460             : 
   32461             : 
   32462        3547 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32463        3547 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32464        3547 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32465        3547 :   void *argp1 = 0 ;
   32466        3547 :   int res1 = 0 ;
   32467        3547 :   PyObject *swig_obj[1] ;
   32468        3547 :   size_t result;
   32469             :   
   32470        3547 :   if (!args) SWIG_fail;
   32471        3547 :   swig_obj[0] = args;
   32472        3547 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32473        3547 :   if (!SWIG_IsOK(res1)) {
   32474           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensionCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32475             :   }
   32476        3547 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32477        3547 :   {
   32478        3547 :     const int bLocalUseExceptions = GetUseExceptions();
   32479        3547 :     if ( bLocalUseExceptions ) {
   32480         490 :       pushErrorHandler();
   32481             :     }
   32482        3547 :     {
   32483        3547 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32484        3547 :       result = GDALMDArrayHS_GetDimensionCount(arg1);
   32485        3547 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32486             :     }
   32487        3547 :     if ( bLocalUseExceptions ) {
   32488         490 :       popErrorHandler();
   32489             :     }
   32490             : #ifndef SED_HACKS
   32491             :     if ( bLocalUseExceptions ) {
   32492             :       CPLErr eclass = CPLGetLastErrorType();
   32493             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32494             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32495             :       }
   32496             :     }
   32497             : #endif
   32498             :   }
   32499        3547 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   32500        3547 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32501             :   return resultobj;
   32502             : fail:
   32503             :   return NULL;
   32504             : }
   32505             : 
   32506             : 
   32507        2319 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32508        2319 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32509        2319 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32510        2319 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   32511        2319 :   size_t *arg3 = (size_t *) 0 ;
   32512        2319 :   void *argp1 = 0 ;
   32513        2319 :   int res1 = 0 ;
   32514        2319 :   GDALDimensionHS **dims2 = 0 ;
   32515        2319 :   size_t nCount2 = 0 ;
   32516        2319 :   PyObject *swig_obj[1] ;
   32517             :   
   32518        2319 :   {
   32519             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32520        2319 :     arg2 = &dims2;
   32521        2319 :     arg3 = &nCount2;
   32522             :   }
   32523        2319 :   if (!args) SWIG_fail;
   32524        2319 :   swig_obj[0] = args;
   32525        2319 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32526        2319 :   if (!SWIG_IsOK(res1)) {
   32527           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensions" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32528             :   }
   32529        2319 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32530        2319 :   {
   32531        2319 :     const int bLocalUseExceptions = GetUseExceptions();
   32532        2319 :     if ( bLocalUseExceptions ) {
   32533         329 :       pushErrorHandler();
   32534             :     }
   32535        2319 :     {
   32536        2319 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32537        2319 :       GDALMDArrayHS_GetDimensions(arg1,arg2,arg3);
   32538        2319 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32539             :     }
   32540        2319 :     if ( bLocalUseExceptions ) {
   32541         329 :       popErrorHandler();
   32542             :     }
   32543             : #ifndef SED_HACKS
   32544             :     if ( bLocalUseExceptions ) {
   32545             :       CPLErr eclass = CPLGetLastErrorType();
   32546             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32547             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32548             :       }
   32549             :     }
   32550             : #endif
   32551             :   }
   32552        2319 :   resultobj = SWIG_Py_Void();
   32553        2319 :   {
   32554             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32555        2319 :     Py_DECREF(resultobj);
   32556        2319 :     resultobj = PyList_New( *arg3 );
   32557        2319 :     if( !resultobj ) {
   32558           0 :       SWIG_fail;
   32559             :     }
   32560        6507 :     for( size_t i = 0; i < *arg3; i++ ) {
   32561        4188 :       PyList_SetItem(resultobj, i,
   32562        4188 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   32563             :       /* We have borrowed the GDALDimensionHS */
   32564        4188 :       (*arg2)[i] = NULL;
   32565             :     }
   32566             :   }
   32567        2319 :   {
   32568             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32569        2319 :     GDALReleaseDimensions(*arg2, *arg3);
   32570             :   }
   32571        2319 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32572             :   return resultobj;
   32573           0 : fail:
   32574           0 :   {
   32575             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32576           0 :     GDALReleaseDimensions(*arg2, *arg3);
   32577             :   }
   32578             :   return NULL;
   32579             : }
   32580             : 
   32581             : 
   32582          13 : SWIGINTERN PyObject *_wrap_MDArray_GetCoordinateVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32583          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32584          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32585          13 :   GDALMDArrayHS ***arg2 = (GDALMDArrayHS ***) 0 ;
   32586          13 :   size_t *arg3 = (size_t *) 0 ;
   32587          13 :   void *argp1 = 0 ;
   32588          13 :   int res1 = 0 ;
   32589          13 :   GDALMDArrayHS **arrays2 = 0 ;
   32590          13 :   size_t nCount2 = 0 ;
   32591          13 :   PyObject *swig_obj[1] ;
   32592             :   
   32593          13 :   {
   32594             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32595          13 :     arg2 = &arrays2;
   32596          13 :     arg3 = &nCount2;
   32597             :   }
   32598          13 :   if (!args) SWIG_fail;
   32599          13 :   swig_obj[0] = args;
   32600          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32601          13 :   if (!SWIG_IsOK(res1)) {
   32602           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetCoordinateVariables" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32603             :   }
   32604          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32605          13 :   {
   32606          13 :     const int bLocalUseExceptions = GetUseExceptions();
   32607          13 :     if ( bLocalUseExceptions ) {
   32608           3 :       pushErrorHandler();
   32609             :     }
   32610          13 :     {
   32611          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32612          13 :       GDALMDArrayHS_GetCoordinateVariables(arg1,arg2,arg3);
   32613          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32614             :     }
   32615          13 :     if ( bLocalUseExceptions ) {
   32616           3 :       popErrorHandler();
   32617             :     }
   32618             : #ifndef SED_HACKS
   32619             :     if ( bLocalUseExceptions ) {
   32620             :       CPLErr eclass = CPLGetLastErrorType();
   32621             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32622             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32623             :       }
   32624             :     }
   32625             : #endif
   32626             :   }
   32627          13 :   resultobj = SWIG_Py_Void();
   32628          13 :   {
   32629             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32630          13 :     Py_DECREF(resultobj);
   32631          13 :     resultobj = PyList_New( *arg3 );
   32632          13 :     if( !resultobj ) {
   32633           0 :       SWIG_fail;
   32634             :     }
   32635          29 :     for( size_t i = 0; i < *arg3; i++ ) {
   32636          16 :       PyList_SetItem(resultobj, i,
   32637          16 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   32638             :       /* We have borrowed the GDALMDArrayHS */
   32639          16 :       (*arg2)[i] = NULL;
   32640             :     }
   32641             :   }
   32642          13 :   {
   32643             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32644          13 :     GDALReleaseArrays(*arg2, *arg3);
   32645             :   }
   32646          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; } }
   32647             :   return resultobj;
   32648           0 : fail:
   32649           0 :   {
   32650             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32651           0 :     GDALReleaseArrays(*arg2, *arg3);
   32652             :   }
   32653             :   return NULL;
   32654             : }
   32655             : 
   32656             : 
   32657          95 : SWIGINTERN PyObject *_wrap_MDArray_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32658          95 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32659          95 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32660          95 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   32661          95 :   size_t *arg3 = (size_t *) 0 ;
   32662          95 :   void *argp1 = 0 ;
   32663          95 :   int res1 = 0 ;
   32664          95 :   GUIntBig *vals2 = 0 ;
   32665          95 :   size_t nCount2 = 0 ;
   32666          95 :   PyObject *swig_obj[1] ;
   32667             :   
   32668          95 :   {
   32669             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32670          95 :     arg2 = &vals2;
   32671          95 :     arg3 = &nCount2;
   32672             :   }
   32673          95 :   if (!args) SWIG_fail;
   32674          95 :   swig_obj[0] = args;
   32675          95 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32676          95 :   if (!SWIG_IsOK(res1)) {
   32677           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetBlockSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32678             :   }
   32679          95 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32680          95 :   {
   32681          95 :     const int bLocalUseExceptions = GetUseExceptions();
   32682          95 :     if ( bLocalUseExceptions ) {
   32683           3 :       pushErrorHandler();
   32684             :     }
   32685          95 :     {
   32686          95 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32687          95 :       GDALMDArrayHS_GetBlockSize(arg1,arg2,arg3);
   32688          95 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32689             :     }
   32690          95 :     if ( bLocalUseExceptions ) {
   32691           3 :       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          95 :   resultobj = SWIG_Py_Void();
   32703          95 :   {
   32704             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32705          95 :     Py_DECREF(resultobj);
   32706          95 :     resultobj = PyList_New( *arg3 );
   32707          95 :     if( !resultobj ) {
   32708           0 :       SWIG_fail;
   32709             :     }
   32710         293 :     for( size_t i = 0; i < *arg3; i++ ) {
   32711         198 :       char szTmp[32];
   32712         198 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   32713         198 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32714         198 :       PyList_SetItem(resultobj, i, o );
   32715             :     }
   32716             :   }
   32717          95 :   {
   32718             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32719          95 :     CPLFree(*arg2);
   32720             :   }
   32721          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; } }
   32722             :   return resultobj;
   32723           0 : fail:
   32724           0 :   {
   32725             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32726           0 :     CPLFree(*arg2);
   32727             :   }
   32728             :   return NULL;
   32729             : }
   32730             : 
   32731             : 
   32732           1 : SWIGINTERN PyObject *_wrap_MDArray_GetProcessingChunkSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32733           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32734           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32735           1 :   size_t arg2 ;
   32736           1 :   GUIntBig **arg3 = (GUIntBig **) 0 ;
   32737           1 :   size_t *arg4 = (size_t *) 0 ;
   32738           1 :   void *argp1 = 0 ;
   32739           1 :   int res1 = 0 ;
   32740           1 :   size_t val2 ;
   32741           1 :   int ecode2 = 0 ;
   32742           1 :   GUIntBig *vals3 = 0 ;
   32743           1 :   size_t nCount3 = 0 ;
   32744           1 :   PyObject *swig_obj[2] ;
   32745             :   
   32746           1 :   {
   32747             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32748           1 :     arg3 = &vals3;
   32749           1 :     arg4 = &nCount3;
   32750             :   }
   32751           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetProcessingChunkSize", 2, 2, swig_obj)) SWIG_fail;
   32752           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32753           1 :   if (!SWIG_IsOK(res1)) {
   32754           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32755             :   }
   32756           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32757           1 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   32758           1 :   if (!SWIG_IsOK(ecode2)) {
   32759           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "2"" of type '" "size_t""'");
   32760             :   } 
   32761           1 :   arg2 = static_cast< size_t >(val2);
   32762           1 :   {
   32763           1 :     const int bLocalUseExceptions = GetUseExceptions();
   32764           1 :     if ( bLocalUseExceptions ) {
   32765           0 :       pushErrorHandler();
   32766             :     }
   32767           1 :     {
   32768           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32769           1 :       GDALMDArrayHS_GetProcessingChunkSize(arg1,arg2,arg3,arg4);
   32770           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32771             :     }
   32772           1 :     if ( bLocalUseExceptions ) {
   32773           0 :       popErrorHandler();
   32774             :     }
   32775             : #ifndef SED_HACKS
   32776             :     if ( bLocalUseExceptions ) {
   32777             :       CPLErr eclass = CPLGetLastErrorType();
   32778             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32779             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32780             :       }
   32781             :     }
   32782             : #endif
   32783             :   }
   32784           1 :   resultobj = SWIG_Py_Void();
   32785           1 :   {
   32786             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32787           1 :     Py_DECREF(resultobj);
   32788           1 :     resultobj = PyList_New( *arg4 );
   32789           1 :     if( !resultobj ) {
   32790           0 :       SWIG_fail;
   32791             :     }
   32792           3 :     for( size_t i = 0; i < *arg4; i++ ) {
   32793           2 :       char szTmp[32];
   32794           2 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg3)[i]);
   32795           2 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32796           2 :       PyList_SetItem(resultobj, i, o );
   32797             :     }
   32798             :   }
   32799           1 :   {
   32800             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32801           1 :     CPLFree(*arg3);
   32802             :   }
   32803           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; } }
   32804             :   return resultobj;
   32805           0 : fail:
   32806           0 :   {
   32807             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32808           0 :     CPLFree(*arg3);
   32809             :   }
   32810             :   return NULL;
   32811             : }
   32812             : 
   32813             : 
   32814        1997 : SWIGINTERN PyObject *_wrap_MDArray_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32815        1997 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32816        1997 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32817        1997 :   void *argp1 = 0 ;
   32818        1997 :   int res1 = 0 ;
   32819        1997 :   PyObject *swig_obj[1] ;
   32820        1997 :   GDALExtendedDataTypeHS *result = 0 ;
   32821             :   
   32822        1997 :   if (!args) SWIG_fail;
   32823        1997 :   swig_obj[0] = args;
   32824        1997 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32825        1997 :   if (!SWIG_IsOK(res1)) {
   32826           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDataType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32827             :   }
   32828        1997 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32829        1997 :   {
   32830        1997 :     const int bLocalUseExceptions = GetUseExceptions();
   32831        1997 :     if ( bLocalUseExceptions ) {
   32832         409 :       pushErrorHandler();
   32833             :     }
   32834        1997 :     {
   32835        1997 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32836        1997 :       result = (GDALExtendedDataTypeHS *)GDALMDArrayHS_GetDataType(arg1);
   32837        1997 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32838             :     }
   32839        1997 :     if ( bLocalUseExceptions ) {
   32840         409 :       popErrorHandler();
   32841             :     }
   32842             : #ifndef SED_HACKS
   32843             :     if ( bLocalUseExceptions ) {
   32844             :       CPLErr eclass = CPLGetLastErrorType();
   32845             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32846             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32847             :       }
   32848             :     }
   32849             : #endif
   32850             :   }
   32851        1997 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   32852        1997 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32853             :   return resultobj;
   32854             : fail:
   32855             :   return NULL;
   32856             : }
   32857             : 
   32858             : 
   32859          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32860          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32861          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32862          15 :   void *argp1 = 0 ;
   32863          15 :   int res1 = 0 ;
   32864          15 :   PyObject *swig_obj[1] ;
   32865          15 :   char **result = 0 ;
   32866             :   
   32867          15 :   if (!args) SWIG_fail;
   32868          15 :   swig_obj[0] = args;
   32869          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32870          15 :   if (!SWIG_IsOK(res1)) {
   32871           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStructuralInfo" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32872             :   }
   32873          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32874          15 :   {
   32875          15 :     const int bLocalUseExceptions = GetUseExceptions();
   32876          15 :     if ( bLocalUseExceptions ) {
   32877           2 :       pushErrorHandler();
   32878             :     }
   32879          15 :     {
   32880          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32881          15 :       result = (char **)GDALMDArrayHS_GetStructuralInfo(arg1);
   32882          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32883             :     }
   32884          15 :     if ( bLocalUseExceptions ) {
   32885           2 :       popErrorHandler();
   32886             :     }
   32887             : #ifndef SED_HACKS
   32888             :     if ( bLocalUseExceptions ) {
   32889             :       CPLErr eclass = CPLGetLastErrorType();
   32890             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32891             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32892             :       }
   32893             :     }
   32894             : #endif
   32895             :   }
   32896          15 :   {
   32897             :     /* %typemap(out) char **dict */
   32898          15 :     resultobj = GetCSLStringAsPyDict(result, false);
   32899             :   }
   32900          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; } }
   32901             :   return resultobj;
   32902             : fail:
   32903             :   return NULL;
   32904             : }
   32905             : 
   32906             : 
   32907          44 : SWIGINTERN PyObject *_wrap_MDArray_Resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32908          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32909          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32910          44 :   int arg2 ;
   32911          44 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32912          44 :   char **arg4 = (char **) NULL ;
   32913          44 :   void *argp1 = 0 ;
   32914          44 :   int res1 = 0 ;
   32915          44 :   PyObject *swig_obj[3] ;
   32916          44 :   CPLErr result;
   32917             :   
   32918          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Resize", 2, 3, swig_obj)) SWIG_fail;
   32919          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32920          44 :   if (!SWIG_IsOK(res1)) {
   32921           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Resize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32922             :   }
   32923          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32924          44 :   {
   32925             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32926          44 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32927          44 :     if( arg2 < 0 ) {
   32928           0 :       SWIG_fail;
   32929             :     }
   32930             :   }
   32931          44 :   if (swig_obj[2]) {
   32932           0 :     {
   32933             :       /* %typemap(in) char **dict */
   32934           0 :       arg4 = NULL;
   32935           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   32936           0 :         int bErr = FALSE;
   32937           0 :         arg4 = CSLFromPySequence(swig_obj[2], &bErr);
   32938           0 :         if ( bErr )
   32939             :         {
   32940           0 :           SWIG_fail;
   32941             :         }
   32942             :       }
   32943           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   32944           0 :         int bErr = FALSE;
   32945           0 :         arg4 = CSLFromPyMapping(swig_obj[2], &bErr);
   32946           0 :         if ( bErr )
   32947             :         {
   32948           0 :           SWIG_fail;
   32949             :         }
   32950             :       }
   32951             :       else {
   32952           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32953           0 :         SWIG_fail;
   32954             :       }
   32955             :     }
   32956             :   }
   32957          44 :   {
   32958          44 :     const int bLocalUseExceptions = GetUseExceptions();
   32959          44 :     if ( bLocalUseExceptions ) {
   32960           0 :       pushErrorHandler();
   32961             :     }
   32962          44 :     {
   32963          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32964          44 :       result = (CPLErr)GDALMDArrayHS_Resize(arg1,arg2,arg3,arg4);
   32965          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32966             :     }
   32967          44 :     if ( bLocalUseExceptions ) {
   32968           0 :       popErrorHandler();
   32969             :     }
   32970             : #ifndef SED_HACKS
   32971             :     if ( bLocalUseExceptions ) {
   32972             :       CPLErr eclass = CPLGetLastErrorType();
   32973             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32974             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32975             :       }
   32976             :     }
   32977             : #endif
   32978             :   }
   32979          44 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32980          44 :   {
   32981             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32982          44 :     free(arg3);
   32983             :   }
   32984          44 :   {
   32985             :     /* %typemap(freearg) char **dict */
   32986          44 :     CSLDestroy( arg4 );
   32987             :   }
   32988          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; } }
   32989             :   return resultobj;
   32990           0 : fail:
   32991           0 :   {
   32992             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32993           0 :     free(arg3);
   32994             :   }
   32995           0 :   {
   32996             :     /* %typemap(freearg) char **dict */
   32997           0 :     CSLDestroy( arg4 );
   32998             :   }
   32999             :   return NULL;
   33000             : }
   33001             : 
   33002             : 
   33003        1909 : SWIGINTERN PyObject *_wrap_MDArray_Read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33004        1909 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33005        1909 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33006        1909 :   int arg2 ;
   33007        1909 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33008        1909 :   int arg4 ;
   33009        1909 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33010        1909 :   int arg6 ;
   33011        1909 :   GIntBig *arg7 = (GIntBig *) 0 ;
   33012        1909 :   int arg8 ;
   33013        1909 :   GIntBig *arg9 = (GIntBig *) 0 ;
   33014        1909 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   33015        1909 :   void **arg11 = (void **) 0 ;
   33016        1909 :   void *argp1 = 0 ;
   33017        1909 :   int res1 = 0 ;
   33018        1909 :   void *argp10 = 0 ;
   33019        1909 :   int res10 = 0 ;
   33020        1909 :   void *pyObject11 = NULL ;
   33021        1909 :   PyObject *swig_obj[6] ;
   33022        1909 :   CPLErr result;
   33023             :   
   33024        1909 :   {
   33025             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject11 = NULL ) */
   33026        1909 :     arg11 = &pyObject11;
   33027             :   }
   33028        1909 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Read", 6, 6, swig_obj)) SWIG_fail;
   33029        1909 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33030        1909 :   if (!SWIG_IsOK(res1)) {
   33031           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Read" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33032             :   }
   33033        1909 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33034        1909 :   {
   33035             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33036        1909 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33037        1909 :     if( arg2 < 0 ) {
   33038           0 :       SWIG_fail;
   33039             :     }
   33040             :   }
   33041        1909 :   {
   33042             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33043        1909 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33044        1909 :     if( arg4 < 0 ) {
   33045           0 :       SWIG_fail;
   33046             :     }
   33047             :   }
   33048        1909 :   {
   33049             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33050        1909 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   33051        1909 :     if( arg6 < 0 ) {
   33052           0 :       SWIG_fail;
   33053             :     }
   33054             :   }
   33055        1909 :   {
   33056             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33057        1909 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   33058        1909 :     if( arg8 < 0 ) {
   33059           0 :       SWIG_fail;
   33060             :     }
   33061             :   }
   33062        1909 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33063        1909 :   if (!SWIG_IsOK(res10)) {
   33064           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Read" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33065             :   }
   33066        1909 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   33067        1909 :   {
   33068        1909 :     if (!arg10) {
   33069           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33070             :     }
   33071             :   }
   33072        1909 :   {
   33073        1909 :     const int bLocalUseExceptions = GetUseExceptions();
   33074        1909 :     if ( bLocalUseExceptions ) {
   33075         158 :       pushErrorHandler();
   33076             :     }
   33077        1909 :     {
   33078        1909 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33079        1909 :       result = (CPLErr)GDALMDArrayHS_Read(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   33080        1909 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33081             :     }
   33082        1909 :     if ( bLocalUseExceptions ) {
   33083         158 :       popErrorHandler();
   33084             :     }
   33085             : #ifndef SED_HACKS
   33086             :     if ( bLocalUseExceptions ) {
   33087             :       CPLErr eclass = CPLGetLastErrorType();
   33088             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33089             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33090             :       }
   33091             :     }
   33092             : #endif
   33093             :   }
   33094        1909 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33095        1909 :   {
   33096             :     /* %typemap(argout) ( void **outPythonObject ) */
   33097        1909 :     Py_XDECREF(resultobj);
   33098        1909 :     if (*arg11)
   33099             :     {
   33100             :       resultobj = (PyObject*)*arg11;
   33101             :     }
   33102             :     else
   33103             :     {
   33104          41 :       resultobj = Py_None;
   33105          41 :       Py_INCREF(resultobj);
   33106             :     }
   33107             :   }
   33108        1909 :   {
   33109             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33110        1909 :     free(arg3);
   33111             :   }
   33112        1909 :   {
   33113             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33114        1909 :     free(arg5);
   33115             :   }
   33116        1909 :   {
   33117             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33118        1909 :     free(arg7);
   33119             :   }
   33120        1909 :   {
   33121             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33122        1909 :     free(arg9);
   33123             :   }
   33124        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; } }
   33125             :   return resultobj;
   33126           0 : fail:
   33127           0 :   {
   33128             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33129           0 :     free(arg3);
   33130             :   }
   33131           0 :   {
   33132             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33133           0 :     free(arg5);
   33134             :   }
   33135           0 :   {
   33136             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33137           0 :     free(arg7);
   33138             :   }
   33139           0 :   {
   33140             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33141           0 :     free(arg9);
   33142             :   }
   33143           0 :   return NULL;
   33144             : }
   33145             : 
   33146             : 
   33147          13 : SWIGINTERN PyObject *_wrap_MDArray_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33148          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33149          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33150          13 :   int arg2 ;
   33151          13 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33152          13 :   int arg4 ;
   33153          13 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33154          13 :   int arg6 ;
   33155          13 :   GIntBig *arg7 = (GIntBig *) 0 ;
   33156          13 :   GDALExtendedDataTypeHS *arg8 = (GDALExtendedDataTypeHS *) 0 ;
   33157          13 :   char **arg9 = (char **) 0 ;
   33158          13 :   void *argp1 = 0 ;
   33159          13 :   int res1 = 0 ;
   33160          13 :   void *argp8 = 0 ;
   33161          13 :   int res8 = 0 ;
   33162          13 :   PyObject *swig_obj[6] ;
   33163          13 :   CPLErr result;
   33164             :   
   33165          13 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_WriteStringArray", 6, 6, swig_obj)) SWIG_fail;
   33166          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33167          13 :   if (!SWIG_IsOK(res1)) {
   33168           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_WriteStringArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33169             :   }
   33170          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33171          13 :   {
   33172             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33173          13 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33174          13 :     if( arg2 < 0 ) {
   33175           0 :       SWIG_fail;
   33176             :     }
   33177             :   }
   33178          13 :   {
   33179             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33180          13 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33181          13 :     if( arg4 < 0 ) {
   33182           0 :       SWIG_fail;
   33183             :     }
   33184             :   }
   33185          13 :   {
   33186             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33187          13 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   33188          13 :     if( arg6 < 0 ) {
   33189           0 :       SWIG_fail;
   33190             :     }
   33191             :   }
   33192          13 :   res8 = SWIG_ConvertPtr(swig_obj[4], &argp8,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33193          13 :   if (!SWIG_IsOK(res8)) {
   33194           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "MDArray_WriteStringArray" "', argument " "8"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33195             :   }
   33196          13 :   arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8);
   33197          13 :   {
   33198             :     /* %typemap(in) char **dict */
   33199          13 :     arg9 = NULL;
   33200          13 :     if ( PySequence_Check( swig_obj[5] ) ) {
   33201          13 :       int bErr = FALSE;
   33202          13 :       arg9 = CSLFromPySequence(swig_obj[5], &bErr);
   33203          13 :       if ( bErr )
   33204             :       {
   33205           0 :         SWIG_fail;
   33206             :       }
   33207             :     }
   33208           0 :     else if ( PyMapping_Check( swig_obj[5] ) ) {
   33209           0 :       int bErr = FALSE;
   33210           0 :       arg9 = CSLFromPyMapping(swig_obj[5], &bErr);
   33211           0 :       if ( bErr )
   33212             :       {
   33213           0 :         SWIG_fail;
   33214             :       }
   33215             :     }
   33216             :     else {
   33217           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33218           0 :       SWIG_fail;
   33219             :     }
   33220             :   }
   33221          13 :   {
   33222          13 :     if (!arg8) {
   33223           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33224             :     }
   33225             :   }
   33226          13 :   {
   33227          13 :     const int bLocalUseExceptions = GetUseExceptions();
   33228          13 :     if ( bLocalUseExceptions ) {
   33229           3 :       pushErrorHandler();
   33230             :     }
   33231          13 :     {
   33232          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33233          13 :       result = (CPLErr)GDALMDArrayHS_WriteStringArray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   33234          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33235             :     }
   33236          13 :     if ( bLocalUseExceptions ) {
   33237           3 :       popErrorHandler();
   33238             :     }
   33239             : #ifndef SED_HACKS
   33240             :     if ( bLocalUseExceptions ) {
   33241             :       CPLErr eclass = CPLGetLastErrorType();
   33242             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33243             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33244             :       }
   33245             :     }
   33246             : #endif
   33247             :   }
   33248          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33249          13 :   {
   33250             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33251          13 :     free(arg3);
   33252             :   }
   33253          13 :   {
   33254             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33255          13 :     free(arg5);
   33256             :   }
   33257          13 :   {
   33258             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33259          13 :     free(arg7);
   33260             :   }
   33261          13 :   {
   33262             :     /* %typemap(freearg) char **dict */
   33263          13 :     CSLDestroy( arg9 );
   33264             :   }
   33265          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; } }
   33266             :   return resultobj;
   33267           0 : fail:
   33268           0 :   {
   33269             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33270           0 :     free(arg3);
   33271             :   }
   33272           0 :   {
   33273             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33274           0 :     free(arg5);
   33275             :   }
   33276           0 :   {
   33277             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33278           0 :     free(arg7);
   33279             :   }
   33280           0 :   {
   33281             :     /* %typemap(freearg) char **dict */
   33282           0 :     CSLDestroy( arg9 );
   33283             :   }
   33284             :   return NULL;
   33285             : }
   33286             : 
   33287             : 
   33288         517 : SWIGINTERN PyObject *_wrap_MDArray_Write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33289         517 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33290         517 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33291         517 :   int arg2 ;
   33292         517 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33293         517 :   int arg4 ;
   33294         517 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33295         517 :   int arg6 ;
   33296         517 :   GIntBig *arg7 = (GIntBig *) 0 ;
   33297         517 :   int arg8 ;
   33298         517 :   GIntBig *arg9 = (GIntBig *) 0 ;
   33299         517 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   33300         517 :   GIntBig arg11 ;
   33301         517 :   char *arg12 = (char *) 0 ;
   33302         517 :   void *argp1 = 0 ;
   33303         517 :   int res1 = 0 ;
   33304         517 :   void *argp10 = 0 ;
   33305         517 :   int res10 = 0 ;
   33306         517 :   int alloc11 = 0 ;
   33307         517 :   bool viewIsValid11 = false ;
   33308         517 :   Py_buffer view11 ;
   33309         517 :   PyObject *swig_obj[7] ;
   33310         517 :   CPLErr result;
   33311             :   
   33312         517 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Write", 7, 7, swig_obj)) SWIG_fail;
   33313         517 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33314         517 :   if (!SWIG_IsOK(res1)) {
   33315           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Write" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33316             :   }
   33317         517 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33318         517 :   {
   33319             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33320         517 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33321         517 :     if( arg2 < 0 ) {
   33322           0 :       SWIG_fail;
   33323             :     }
   33324             :   }
   33325         517 :   {
   33326             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33327         517 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33328         517 :     if( arg4 < 0 ) {
   33329           0 :       SWIG_fail;
   33330             :     }
   33331             :   }
   33332         517 :   {
   33333             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33334         517 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   33335         517 :     if( arg6 < 0 ) {
   33336           0 :       SWIG_fail;
   33337             :     }
   33338             :   }
   33339         517 :   {
   33340             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33341         517 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   33342         517 :     if( arg8 < 0 ) {
   33343           0 :       SWIG_fail;
   33344             :     }
   33345             :   }
   33346         517 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33347         517 :   if (!SWIG_IsOK(res10)) {
   33348           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Write" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33349             :   }
   33350         517 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   33351         517 :   {
   33352             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   33353         517 :     char* ptr = NULL;
   33354         517 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[6], &arg11, &ptr, &alloc11, &viewIsValid11, &view11) ) {
   33355           0 :       SWIG_fail;
   33356             :     }
   33357         517 :     arg12 = (char *)ptr;
   33358             :   }
   33359         517 :   {
   33360         517 :     if (!arg10) {
   33361           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33362             :     }
   33363             :   }
   33364         517 :   {
   33365         517 :     const int bLocalUseExceptions = GetUseExceptions();
   33366         517 :     if ( bLocalUseExceptions ) {
   33367          45 :       pushErrorHandler();
   33368             :     }
   33369         517 :     {
   33370         517 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33371         517 :       result = (CPLErr)GDALMDArrayHS_Write(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   33372         517 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33373             :     }
   33374         517 :     if ( bLocalUseExceptions ) {
   33375          45 :       popErrorHandler();
   33376             :     }
   33377             : #ifndef SED_HACKS
   33378             :     if ( bLocalUseExceptions ) {
   33379             :       CPLErr eclass = CPLGetLastErrorType();
   33380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33382             :       }
   33383             :     }
   33384             : #endif
   33385             :   }
   33386         517 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33387         517 :   {
   33388             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33389         517 :     free(arg3);
   33390             :   }
   33391         517 :   {
   33392             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33393         517 :     free(arg5);
   33394             :   }
   33395         517 :   {
   33396             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33397         517 :     free(arg7);
   33398             :   }
   33399         517 :   {
   33400             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33401         517 :     free(arg9);
   33402             :   }
   33403         517 :   {
   33404             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33405         517 :     if( viewIsValid11 ) {
   33406         516 :       PyBuffer_Release(&view11);
   33407             :     }
   33408           1 :     else if( alloc11 == SWIG_NEWOBJ ) {
   33409           1 :       delete[] arg12;
   33410             :     }
   33411             :   }
   33412         519 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33413             :   return resultobj;
   33414           0 : fail:
   33415           0 :   {
   33416             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33417           0 :     free(arg3);
   33418             :   }
   33419           0 :   {
   33420             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33421           0 :     free(arg5);
   33422             :   }
   33423           0 :   {
   33424             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33425           0 :     free(arg7);
   33426             :   }
   33427           0 :   {
   33428             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33429           0 :     free(arg9);
   33430             :   }
   33431           0 :   {
   33432             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33433           0 :     if( viewIsValid11 ) {
   33434           0 :       PyBuffer_Release(&view11);
   33435             :     }
   33436           0 :     else if( alloc11 == SWIG_NEWOBJ ) {
   33437           0 :       delete[] arg12;
   33438             :     }
   33439             :   }
   33440             :   return NULL;
   33441             : }
   33442             : 
   33443             : 
   33444          22 : SWIGINTERN PyObject *_wrap_MDArray_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33445          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33446          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33447          22 :   int arg2 ;
   33448          22 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33449          22 :   int arg4 ;
   33450          22 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33451          22 :   char **arg6 = (char **) 0 ;
   33452          22 :   void *argp1 = 0 ;
   33453          22 :   int res1 = 0 ;
   33454          22 :   PyObject *swig_obj[4] ;
   33455          22 :   CPLErr result;
   33456             :   
   33457          22 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AdviseRead", 3, 4, swig_obj)) SWIG_fail;
   33458          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33459          22 :   if (!SWIG_IsOK(res1)) {
   33460           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AdviseRead" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33461             :   }
   33462          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33463          22 :   {
   33464             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33465          22 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33466          22 :     if( arg2 < 0 ) {
   33467           0 :       SWIG_fail;
   33468             :     }
   33469             :   }
   33470          22 :   {
   33471             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33472          22 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33473          22 :     if( arg4 < 0 ) {
   33474           0 :       SWIG_fail;
   33475             :     }
   33476             :   }
   33477          22 :   if (swig_obj[3]) {
   33478          22 :     {
   33479             :       /* %typemap(in) char **dict */
   33480          22 :       arg6 = NULL;
   33481          22 :       if ( PySequence_Check( swig_obj[3] ) ) {
   33482          22 :         int bErr = FALSE;
   33483          22 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   33484          22 :         if ( bErr )
   33485             :         {
   33486           0 :           SWIG_fail;
   33487             :         }
   33488             :       }
   33489           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   33490           0 :         int bErr = FALSE;
   33491           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   33492           0 :         if ( bErr )
   33493             :         {
   33494           0 :           SWIG_fail;
   33495             :         }
   33496             :       }
   33497             :       else {
   33498           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33499           0 :         SWIG_fail;
   33500             :       }
   33501             :     }
   33502             :   }
   33503          22 :   {
   33504          22 :     const int bLocalUseExceptions = GetUseExceptions();
   33505          22 :     if ( bLocalUseExceptions ) {
   33506           0 :       pushErrorHandler();
   33507             :     }
   33508          22 :     {
   33509          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33510          22 :       result = (CPLErr)GDALMDArrayHS_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6);
   33511          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33512             :     }
   33513          22 :     if ( bLocalUseExceptions ) {
   33514           0 :       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          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33526          22 :   {
   33527             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33528          22 :     free(arg3);
   33529             :   }
   33530          22 :   {
   33531             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33532          22 :     free(arg5);
   33533             :   }
   33534          22 :   {
   33535             :     /* %typemap(freearg) char **dict */
   33536          22 :     CSLDestroy( arg6 );
   33537             :   }
   33538          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; } }
   33539             :   return resultobj;
   33540           0 : fail:
   33541           0 :   {
   33542             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33543           0 :     free(arg3);
   33544             :   }
   33545           0 :   {
   33546             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33547           0 :     free(arg5);
   33548             :   }
   33549           0 :   {
   33550             :     /* %typemap(freearg) char **dict */
   33551           0 :     CSLDestroy( arg6 );
   33552             :   }
   33553             :   return NULL;
   33554             : }
   33555             : 
   33556             : 
   33557         120 : SWIGINTERN PyObject *_wrap_MDArray_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33558         120 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33559         120 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33560         120 :   char *arg2 = (char *) 0 ;
   33561         120 :   void *argp1 = 0 ;
   33562         120 :   int res1 = 0 ;
   33563         120 :   int res2 ;
   33564         120 :   char *buf2 = 0 ;
   33565         120 :   int alloc2 = 0 ;
   33566         120 :   PyObject *swig_obj[2] ;
   33567         120 :   GDALAttributeHS *result = 0 ;
   33568             :   
   33569         120 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   33570         120 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33571         120 :   if (!SWIG_IsOK(res1)) {
   33572           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33573             :   }
   33574         120 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33575         120 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33576         120 :   if (!SWIG_IsOK(res2)) {
   33577           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   33578             :   }
   33579         120 :   arg2 = reinterpret_cast< char * >(buf2);
   33580         120 :   {
   33581         120 :     if (!arg2) {
   33582           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33583             :     }
   33584             :   }
   33585         120 :   {
   33586         120 :     const int bLocalUseExceptions = GetUseExceptions();
   33587         120 :     if ( bLocalUseExceptions ) {
   33588          59 :       pushErrorHandler();
   33589             :     }
   33590         120 :     {
   33591         120 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33592         120 :       result = (GDALAttributeHS *)GDALMDArrayHS_GetAttribute(arg1,(char const *)arg2);
   33593         120 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33594             :     }
   33595         120 :     if ( bLocalUseExceptions ) {
   33596          59 :       popErrorHandler();
   33597             :     }
   33598             : #ifndef SED_HACKS
   33599             :     if ( bLocalUseExceptions ) {
   33600             :       CPLErr eclass = CPLGetLastErrorType();
   33601             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33602             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33603             :       }
   33604             :     }
   33605             : #endif
   33606             :   }
   33607         120 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33608         120 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33609         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; } }
   33610             :   return resultobj;
   33611           0 : fail:
   33612           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33613             :   return NULL;
   33614             : }
   33615             : 
   33616             : 
   33617          59 : SWIGINTERN PyObject *_wrap_MDArray_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33618          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33619          59 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33620          59 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   33621          59 :   size_t *arg3 = (size_t *) 0 ;
   33622          59 :   char **arg4 = (char **) 0 ;
   33623          59 :   void *argp1 = 0 ;
   33624          59 :   int res1 = 0 ;
   33625          59 :   GDALAttributeHS **attrs2 = 0 ;
   33626          59 :   size_t nCount2 = 0 ;
   33627          59 :   PyObject *swig_obj[2] ;
   33628             :   
   33629          59 :   {
   33630             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33631          59 :     arg2 = &attrs2;
   33632          59 :     arg3 = &nCount2;
   33633             :   }
   33634          59 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   33635          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33636          59 :   if (!SWIG_IsOK(res1)) {
   33637           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttributes" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33638             :   }
   33639          59 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33640          59 :   if (swig_obj[1]) {
   33641           0 :     {
   33642             :       /* %typemap(in) char **dict */
   33643           0 :       arg4 = NULL;
   33644           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   33645           0 :         int bErr = FALSE;
   33646           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   33647           0 :         if ( bErr )
   33648             :         {
   33649           0 :           SWIG_fail;
   33650             :         }
   33651             :       }
   33652           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   33653           0 :         int bErr = FALSE;
   33654           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   33655           0 :         if ( bErr )
   33656             :         {
   33657           0 :           SWIG_fail;
   33658             :         }
   33659             :       }
   33660             :       else {
   33661           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33662           0 :         SWIG_fail;
   33663             :       }
   33664             :     }
   33665             :   }
   33666          59 :   {
   33667          59 :     const int bLocalUseExceptions = GetUseExceptions();
   33668          59 :     if ( bLocalUseExceptions ) {
   33669          42 :       pushErrorHandler();
   33670             :     }
   33671          59 :     {
   33672          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33673          59 :       GDALMDArrayHS_GetAttributes(arg1,arg2,arg3,arg4);
   33674          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33675             :     }
   33676          59 :     if ( bLocalUseExceptions ) {
   33677          42 :       popErrorHandler();
   33678             :     }
   33679             : #ifndef SED_HACKS
   33680             :     if ( bLocalUseExceptions ) {
   33681             :       CPLErr eclass = CPLGetLastErrorType();
   33682             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33683             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33684             :       }
   33685             :     }
   33686             : #endif
   33687             :   }
   33688          59 :   resultobj = SWIG_Py_Void();
   33689          59 :   {
   33690             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33691          59 :     Py_DECREF(resultobj);
   33692          59 :     resultobj = PyList_New( *arg3 );
   33693          59 :     if( !resultobj ) {
   33694           0 :       SWIG_fail;
   33695             :     }
   33696         189 :     for( size_t i = 0; i < *arg3; i++ ) {
   33697         130 :       PyList_SetItem(resultobj, i,
   33698         130 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   33699             :       /* We have borrowed the GDALAttributeHS */
   33700         130 :       (*arg2)[i] = NULL;
   33701             :     }
   33702             :   }
   33703          59 :   {
   33704             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33705          59 :     GDALReleaseAttributes(*arg2, *arg3);
   33706             :   }
   33707          59 :   {
   33708             :     /* %typemap(freearg) char **dict */
   33709          59 :     CSLDestroy( arg4 );
   33710             :   }
   33711          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; } }
   33712             :   return resultobj;
   33713           0 : fail:
   33714           0 :   {
   33715             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33716           0 :     GDALReleaseAttributes(*arg2, *arg3);
   33717             :   }
   33718           0 :   {
   33719             :     /* %typemap(freearg) char **dict */
   33720           0 :     CSLDestroy( arg4 );
   33721             :   }
   33722             :   return NULL;
   33723             : }
   33724             : 
   33725             : 
   33726         163 : SWIGINTERN PyObject *_wrap_MDArray_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33727         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33728         163 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33729         163 :   char *arg2 = (char *) 0 ;
   33730         163 :   int arg3 ;
   33731         163 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   33732         163 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   33733         163 :   char **arg6 = (char **) 0 ;
   33734         163 :   void *argp1 = 0 ;
   33735         163 :   int res1 = 0 ;
   33736         163 :   int res2 ;
   33737         163 :   char *buf2 = 0 ;
   33738         163 :   int alloc2 = 0 ;
   33739         163 :   void *argp5 = 0 ;
   33740         163 :   int res5 = 0 ;
   33741         163 :   PyObject *swig_obj[5] ;
   33742         163 :   GDALAttributeHS *result = 0 ;
   33743             :   
   33744         163 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   33745         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33746         163 :   if (!SWIG_IsOK(res1)) {
   33747           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_CreateAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33748             :   }
   33749         163 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33750         163 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33751         163 :   if (!SWIG_IsOK(res2)) {
   33752           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   33753             :   }
   33754         163 :   arg2 = reinterpret_cast< char * >(buf2);
   33755         163 :   {
   33756             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33757         163 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   33758         163 :     if( arg3 < 0 ) {
   33759           0 :       SWIG_fail;
   33760             :     }
   33761             :   }
   33762         163 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33763         163 :   if (!SWIG_IsOK(res5)) {
   33764           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MDArray_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33765             :   }
   33766         163 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   33767         163 :   if (swig_obj[4]) {
   33768           0 :     {
   33769             :       /* %typemap(in) char **dict */
   33770           0 :       arg6 = NULL;
   33771           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   33772           0 :         int bErr = FALSE;
   33773           0 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   33774           0 :         if ( bErr )
   33775             :         {
   33776           0 :           SWIG_fail;
   33777             :         }
   33778             :       }
   33779           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   33780           0 :         int bErr = FALSE;
   33781           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   33782           0 :         if ( bErr )
   33783             :         {
   33784           0 :           SWIG_fail;
   33785             :         }
   33786             :       }
   33787             :       else {
   33788           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33789           0 :         SWIG_fail;
   33790             :       }
   33791             :     }
   33792             :   }
   33793         163 :   {
   33794         163 :     if (!arg2) {
   33795           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33796             :     }
   33797             :   }
   33798         162 :   {
   33799         162 :     if (!arg5) {
   33800           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33801             :     }
   33802             :   }
   33803         162 :   {
   33804         162 :     const int bLocalUseExceptions = GetUseExceptions();
   33805         162 :     if ( bLocalUseExceptions ) {
   33806         118 :       pushErrorHandler();
   33807             :     }
   33808         162 :     {
   33809         162 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33810         162 :       result = (GDALAttributeHS *)GDALMDArrayHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   33811         162 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33812             :     }
   33813         162 :     if ( bLocalUseExceptions ) {
   33814         118 :       popErrorHandler();
   33815             :     }
   33816             : #ifndef SED_HACKS
   33817             :     if ( bLocalUseExceptions ) {
   33818             :       CPLErr eclass = CPLGetLastErrorType();
   33819             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33820             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33821             :       }
   33822             :     }
   33823             : #endif
   33824             :   }
   33825         162 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33826         162 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33827         162 :   {
   33828             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33829         162 :     free(arg4);
   33830             :   }
   33831         162 :   {
   33832             :     /* %typemap(freearg) char **dict */
   33833         162 :     CSLDestroy( arg6 );
   33834             :   }
   33835         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; } }
   33836             :   return resultobj;
   33837           1 : fail:
   33838           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33839           1 :   {
   33840             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33841           1 :     free(arg4);
   33842             :   }
   33843           1 :   {
   33844             :     /* %typemap(freearg) char **dict */
   33845           1 :     CSLDestroy( arg6 );
   33846             :   }
   33847             :   return NULL;
   33848             : }
   33849             : 
   33850             : 
   33851          24 : SWIGINTERN PyObject *_wrap_MDArray_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33852          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33853          24 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33854          24 :   char *arg2 = (char *) 0 ;
   33855          24 :   char **arg3 = (char **) 0 ;
   33856          24 :   void *argp1 = 0 ;
   33857          24 :   int res1 = 0 ;
   33858          24 :   int res2 ;
   33859          24 :   char *buf2 = 0 ;
   33860          24 :   int alloc2 = 0 ;
   33861          24 :   PyObject *swig_obj[3] ;
   33862          24 :   CPLErr result;
   33863             :   
   33864          24 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   33865          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33866          24 :   if (!SWIG_IsOK(res1)) {
   33867           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33868             :   }
   33869          24 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33870          24 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33871          24 :   if (!SWIG_IsOK(res2)) {
   33872           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   33873             :   }
   33874          24 :   arg2 = reinterpret_cast< char * >(buf2);
   33875          24 :   if (swig_obj[2]) {
   33876           0 :     {
   33877             :       /* %typemap(in) char **dict */
   33878           0 :       arg3 = NULL;
   33879           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   33880           0 :         int bErr = FALSE;
   33881           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   33882           0 :         if ( bErr )
   33883             :         {
   33884           0 :           SWIG_fail;
   33885             :         }
   33886             :       }
   33887           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   33888           0 :         int bErr = FALSE;
   33889           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   33890           0 :         if ( bErr )
   33891             :         {
   33892           0 :           SWIG_fail;
   33893             :         }
   33894             :       }
   33895             :       else {
   33896           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33897           0 :         SWIG_fail;
   33898             :       }
   33899             :     }
   33900             :   }
   33901          24 :   {
   33902          24 :     if (!arg2) {
   33903           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33904             :     }
   33905             :   }
   33906          24 :   {
   33907          24 :     const int bLocalUseExceptions = GetUseExceptions();
   33908          24 :     if ( bLocalUseExceptions ) {
   33909          24 :       pushErrorHandler();
   33910             :     }
   33911          24 :     {
   33912          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33913          24 :       result = (CPLErr)GDALMDArrayHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   33914          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33915             :     }
   33916          24 :     if ( bLocalUseExceptions ) {
   33917          24 :       popErrorHandler();
   33918             :     }
   33919             : #ifndef SED_HACKS
   33920             :     if ( bLocalUseExceptions ) {
   33921             :       CPLErr eclass = CPLGetLastErrorType();
   33922             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33923             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33924             :       }
   33925             :     }
   33926             : #endif
   33927             :   }
   33928          24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33929          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33930          24 :   {
   33931             :     /* %typemap(freearg) char **dict */
   33932          24 :     CSLDestroy( arg3 );
   33933             :   }
   33934          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; } }
   33935             :   return resultobj;
   33936           0 : fail:
   33937           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33938           0 :   {
   33939             :     /* %typemap(freearg) char **dict */
   33940           0 :     CSLDestroy( arg3 );
   33941             :   }
   33942             :   return NULL;
   33943             : }
   33944             : 
   33945             : 
   33946          73 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33947          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33948          73 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33949          73 :   void **arg2 = (void **) 0 ;
   33950          73 :   void *argp1 = 0 ;
   33951          73 :   int res1 = 0 ;
   33952          73 :   void *pyObject2 = NULL ;
   33953          73 :   PyObject *swig_obj[1] ;
   33954          73 :   CPLErr result;
   33955             :   
   33956          73 :   {
   33957             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   33958          73 :     arg2 = &pyObject2;
   33959             :   }
   33960          73 :   if (!args) SWIG_fail;
   33961          73 :   swig_obj[0] = args;
   33962          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33963          73 :   if (!SWIG_IsOK(res1)) {
   33964           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33965             :   }
   33966          73 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33967          73 :   {
   33968          73 :     const int bLocalUseExceptions = GetUseExceptions();
   33969          73 :     if ( bLocalUseExceptions ) {
   33970          20 :       pushErrorHandler();
   33971             :     }
   33972          73 :     {
   33973          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33974          73 :       result = (CPLErr)GDALMDArrayHS_GetNoDataValueAsRaw(arg1,arg2);
   33975          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33976             :     }
   33977          73 :     if ( bLocalUseExceptions ) {
   33978          20 :       popErrorHandler();
   33979             :     }
   33980             : #ifndef SED_HACKS
   33981             :     if ( bLocalUseExceptions ) {
   33982             :       CPLErr eclass = CPLGetLastErrorType();
   33983             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33984             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33985             :       }
   33986             :     }
   33987             : #endif
   33988             :   }
   33989          73 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33990          73 :   {
   33991             :     /* %typemap(argout) ( void **outPythonObject ) */
   33992          73 :     Py_XDECREF(resultobj);
   33993          73 :     if (*arg2)
   33994             :     {
   33995             :       resultobj = (PyObject*)*arg2;
   33996             :     }
   33997             :     else
   33998             :     {
   33999          37 :       resultobj = Py_None;
   34000          37 :       Py_INCREF(resultobj);
   34001             :     }
   34002             :   }
   34003          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; } }
   34004             :   return resultobj;
   34005             : fail:
   34006             :   return NULL;
   34007             : }
   34008             : 
   34009             : 
   34010         121 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34011         121 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34012         121 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34013         121 :   double *arg2 = (double *) 0 ;
   34014         121 :   int *arg3 = (int *) 0 ;
   34015         121 :   void *argp1 = 0 ;
   34016         121 :   int res1 = 0 ;
   34017         121 :   double tmpval2 ;
   34018         121 :   int tmphasval2 ;
   34019         121 :   PyObject *swig_obj[1] ;
   34020             :   
   34021         121 :   {
   34022             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34023         121 :     arg2 = &tmpval2;
   34024         121 :     arg3 = &tmphasval2;
   34025             :   }
   34026         121 :   if (!args) SWIG_fail;
   34027         121 :   swig_obj[0] = args;
   34028         121 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34029         121 :   if (!SWIG_IsOK(res1)) {
   34030           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34031             :   }
   34032         121 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34033         121 :   {
   34034         121 :     const int bLocalUseExceptions = GetUseExceptions();
   34035         121 :     if ( bLocalUseExceptions ) {
   34036           8 :       pushErrorHandler();
   34037             :     }
   34038         121 :     {
   34039         121 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34040         121 :       GDALMDArrayHS_GetNoDataValueAsDouble(arg1,arg2,arg3);
   34041         121 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34042             :     }
   34043         121 :     if ( bLocalUseExceptions ) {
   34044           8 :       popErrorHandler();
   34045             :     }
   34046             : #ifndef SED_HACKS
   34047             :     if ( bLocalUseExceptions ) {
   34048             :       CPLErr eclass = CPLGetLastErrorType();
   34049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34051             :       }
   34052             :     }
   34053             : #endif
   34054             :   }
   34055         121 :   resultobj = SWIG_Py_Void();
   34056         121 :   {
   34057             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34058         121 :     PyObject *r;
   34059         121 :     if ( !*arg3 ) {
   34060          48 :       Py_INCREF(Py_None);
   34061          48 :       r = Py_None;
   34062             :     }
   34063             :     else {
   34064          73 :       r = PyFloat_FromDouble( *arg2 );
   34065             :     }
   34066             : #if SWIG_VERSION >= 0x040300
   34067             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34068             : #else
   34069         121 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34070             : #endif
   34071             :   }
   34072         121 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34073             :   return resultobj;
   34074             : fail:
   34075             :   return NULL;
   34076             : }
   34077             : 
   34078             : 
   34079          11 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34080          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34081          11 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34082          11 :   GIntBig *arg2 = (GIntBig *) 0 ;
   34083          11 :   int *arg3 = (int *) 0 ;
   34084          11 :   void *argp1 = 0 ;
   34085          11 :   int res1 = 0 ;
   34086          11 :   GIntBig tmpval2 ;
   34087          11 :   int tmphasval2 ;
   34088          11 :   PyObject *swig_obj[1] ;
   34089             :   
   34090          11 :   {
   34091             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   34092          11 :     arg2 = &tmpval2;
   34093          11 :     arg3 = &tmphasval2;
   34094             :   }
   34095          11 :   if (!args) SWIG_fail;
   34096          11 :   swig_obj[0] = args;
   34097          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34098          11 :   if (!SWIG_IsOK(res1)) {
   34099           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34100             :   }
   34101          11 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34102          11 :   {
   34103          11 :     const int bLocalUseExceptions = GetUseExceptions();
   34104          11 :     if ( bLocalUseExceptions ) {
   34105           0 :       pushErrorHandler();
   34106             :     }
   34107          11 :     {
   34108          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34109          11 :       GDALMDArrayHS_GetNoDataValueAsInt64(arg1,arg2,arg3);
   34110          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34111             :     }
   34112          11 :     if ( bLocalUseExceptions ) {
   34113           0 :       popErrorHandler();
   34114             :     }
   34115             : #ifndef SED_HACKS
   34116             :     if ( bLocalUseExceptions ) {
   34117             :       CPLErr eclass = CPLGetLastErrorType();
   34118             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34119             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34120             :       }
   34121             :     }
   34122             : #endif
   34123             :   }
   34124          11 :   resultobj = SWIG_Py_Void();
   34125          11 :   {
   34126             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   34127          11 :     PyObject *r;
   34128          11 :     if ( !*arg3 ) {
   34129           4 :       Py_INCREF(Py_None);
   34130           4 :       r = Py_None;
   34131             :     }
   34132             :     else {
   34133           7 :       r = PyLong_FromLongLong( *arg2 );
   34134             :     }
   34135             : #if SWIG_VERSION >= 0x040300
   34136             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34137             : #else
   34138          11 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34139             : #endif
   34140             :   }
   34141          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; } }
   34142             :   return resultobj;
   34143             : fail:
   34144             :   return NULL;
   34145             : }
   34146             : 
   34147             : 
   34148           7 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34149           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34150           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34151           7 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   34152           7 :   int *arg3 = (int *) 0 ;
   34153           7 :   void *argp1 = 0 ;
   34154           7 :   int res1 = 0 ;
   34155           7 :   GUIntBig tmpval2 ;
   34156           7 :   int tmphasval2 ;
   34157           7 :   PyObject *swig_obj[1] ;
   34158             :   
   34159           7 :   {
   34160             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   34161           7 :     arg2 = &tmpval2;
   34162           7 :     arg3 = &tmphasval2;
   34163             :   }
   34164           7 :   if (!args) SWIG_fail;
   34165           7 :   swig_obj[0] = args;
   34166           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34167           7 :   if (!SWIG_IsOK(res1)) {
   34168           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34169             :   }
   34170           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34171           7 :   {
   34172           7 :     const int bLocalUseExceptions = GetUseExceptions();
   34173           7 :     if ( bLocalUseExceptions ) {
   34174           0 :       pushErrorHandler();
   34175             :     }
   34176           7 :     {
   34177           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34178           7 :       GDALMDArrayHS_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   34179           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34180             :     }
   34181           7 :     if ( bLocalUseExceptions ) {
   34182           0 :       popErrorHandler();
   34183             :     }
   34184             : #ifndef SED_HACKS
   34185             :     if ( bLocalUseExceptions ) {
   34186             :       CPLErr eclass = CPLGetLastErrorType();
   34187             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34188             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34189             :       }
   34190             :     }
   34191             : #endif
   34192             :   }
   34193           7 :   resultobj = SWIG_Py_Void();
   34194           7 :   {
   34195             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   34196           7 :     PyObject *r;
   34197           7 :     if ( !*arg3 ) {
   34198           2 :       Py_INCREF(Py_None);
   34199           2 :       r = Py_None;
   34200             :     }
   34201             :     else {
   34202           5 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   34203             :     }
   34204             : #if SWIG_VERSION >= 0x040300
   34205             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34206             : #else
   34207           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34208             : #endif
   34209             :   }
   34210           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; } }
   34211             :   return resultobj;
   34212             : fail:
   34213             :   return NULL;
   34214             : }
   34215             : 
   34216             : 
   34217           5 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34218           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34219           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34220           5 :   void *argp1 = 0 ;
   34221           5 :   int res1 = 0 ;
   34222           5 :   PyObject *swig_obj[1] ;
   34223           5 :   retStringAndCPLFree *result = 0 ;
   34224             :   
   34225           5 :   if (!args) SWIG_fail;
   34226           5 :   swig_obj[0] = args;
   34227           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34228           5 :   if (!SWIG_IsOK(res1)) {
   34229           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34230             :   }
   34231           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34232           5 :   {
   34233           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34234           5 :     if ( bLocalUseExceptions ) {
   34235           0 :       pushErrorHandler();
   34236             :     }
   34237           5 :     {
   34238           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34239           5 :       result = (retStringAndCPLFree *)GDALMDArrayHS_GetNoDataValueAsString(arg1);
   34240           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34241             :     }
   34242           5 :     if ( bLocalUseExceptions ) {
   34243           0 :       popErrorHandler();
   34244             :     }
   34245             : #ifndef SED_HACKS
   34246             :     if ( bLocalUseExceptions ) {
   34247             :       CPLErr eclass = CPLGetLastErrorType();
   34248             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34249             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34250             :       }
   34251             :     }
   34252             : #endif
   34253             :   }
   34254           5 :   {
   34255             :     /* %typemap(out) (retStringAndCPLFree*) */
   34256           5 :     Py_XDECREF(resultobj);
   34257           5 :     if(result)
   34258             :     {
   34259           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   34260           2 :       CPLFree(result);
   34261             :     }
   34262             :     else
   34263             :     {
   34264           3 :       resultobj = Py_None;
   34265           3 :       Py_INCREF(resultobj);
   34266             :     }
   34267             :   }
   34268           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; } }
   34269             :   return resultobj;
   34270             : fail:
   34271             :   return NULL;
   34272             : }
   34273             : 
   34274             : 
   34275          51 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34276          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34277          51 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34278          51 :   double arg2 ;
   34279          51 :   void *argp1 = 0 ;
   34280          51 :   int res1 = 0 ;
   34281          51 :   double val2 ;
   34282          51 :   int ecode2 = 0 ;
   34283          51 :   PyObject *swig_obj[2] ;
   34284          51 :   CPLErr result;
   34285             :   
   34286          51 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueDouble", 2, 2, swig_obj)) SWIG_fail;
   34287          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34288          51 :   if (!SWIG_IsOK(res1)) {
   34289           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34290             :   }
   34291          51 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34292          51 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   34293          51 :   if (!SWIG_IsOK(ecode2)) {
   34294           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "2"" of type '" "double""'");
   34295             :   } 
   34296          51 :   arg2 = static_cast< double >(val2);
   34297          51 :   {
   34298          51 :     const int bLocalUseExceptions = GetUseExceptions();
   34299          51 :     if ( bLocalUseExceptions ) {
   34300           4 :       pushErrorHandler();
   34301             :     }
   34302          51 :     {
   34303          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34304          51 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueDouble(arg1,arg2);
   34305          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34306             :     }
   34307          51 :     if ( bLocalUseExceptions ) {
   34308           4 :       popErrorHandler();
   34309             :     }
   34310             : #ifndef SED_HACKS
   34311             :     if ( bLocalUseExceptions ) {
   34312             :       CPLErr eclass = CPLGetLastErrorType();
   34313             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34314             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34315             :       }
   34316             :     }
   34317             : #endif
   34318             :   }
   34319          51 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34320          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; } }
   34321             :   return resultobj;
   34322             : fail:
   34323             :   return NULL;
   34324             : }
   34325             : 
   34326             : 
   34327           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34328           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34329           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34330           1 :   GIntBig arg2 ;
   34331           1 :   void *argp1 = 0 ;
   34332           1 :   int res1 = 0 ;
   34333           1 :   PyObject *swig_obj[2] ;
   34334           1 :   CPLErr result;
   34335             :   
   34336           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueInt64", 2, 2, swig_obj)) SWIG_fail;
   34337           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34338           1 :   if (!SWIG_IsOK(res1)) {
   34339           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34340             :   }
   34341           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34342           1 :   {
   34343           1 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   34344             :   }
   34345           1 :   {
   34346           1 :     const int bLocalUseExceptions = GetUseExceptions();
   34347           1 :     if ( bLocalUseExceptions ) {
   34348           0 :       pushErrorHandler();
   34349             :     }
   34350           1 :     {
   34351           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34352           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueInt64(arg1,arg2);
   34353           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34354             :     }
   34355           1 :     if ( bLocalUseExceptions ) {
   34356           0 :       popErrorHandler();
   34357             :     }
   34358             : #ifndef SED_HACKS
   34359             :     if ( bLocalUseExceptions ) {
   34360             :       CPLErr eclass = CPLGetLastErrorType();
   34361             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34362             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34363             :       }
   34364             :     }
   34365             : #endif
   34366             :   }
   34367           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34368           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; } }
   34369             :   return resultobj;
   34370             : fail:
   34371             :   return NULL;
   34372             : }
   34373             : 
   34374             : 
   34375           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34376           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34377           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34378           1 :   GUIntBig arg2 ;
   34379           1 :   void *argp1 = 0 ;
   34380           1 :   int res1 = 0 ;
   34381           1 :   PyObject *swig_obj[2] ;
   34382           1 :   CPLErr result;
   34383             :   
   34384           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueUInt64", 2, 2, swig_obj)) SWIG_fail;
   34385           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34386           1 :   if (!SWIG_IsOK(res1)) {
   34387           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34388             :   }
   34389           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34390           1 :   {
   34391           1 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   34392             :   }
   34393           1 :   {
   34394           1 :     const int bLocalUseExceptions = GetUseExceptions();
   34395           1 :     if ( bLocalUseExceptions ) {
   34396           0 :       pushErrorHandler();
   34397             :     }
   34398           1 :     {
   34399           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34400           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueUInt64(arg1,arg2);
   34401           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34402             :     }
   34403           1 :     if ( bLocalUseExceptions ) {
   34404           0 :       popErrorHandler();
   34405             :     }
   34406             : #ifndef SED_HACKS
   34407             :     if ( bLocalUseExceptions ) {
   34408             :       CPLErr eclass = CPLGetLastErrorType();
   34409             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34410             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34411             :       }
   34412             :     }
   34413             : #endif
   34414             :   }
   34415           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34416           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; } }
   34417             :   return resultobj;
   34418             : fail:
   34419             :   return NULL;
   34420             : }
   34421             : 
   34422             : 
   34423           3 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34424           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34425           3 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34426           3 :   char *arg2 = (char *) 0 ;
   34427           3 :   void *argp1 = 0 ;
   34428           3 :   int res1 = 0 ;
   34429           3 :   int res2 ;
   34430           3 :   char *buf2 = 0 ;
   34431           3 :   int alloc2 = 0 ;
   34432           3 :   PyObject *swig_obj[2] ;
   34433           3 :   CPLErr result;
   34434             :   
   34435           3 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueString", 2, 2, swig_obj)) SWIG_fail;
   34436           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34437           3 :   if (!SWIG_IsOK(res1)) {
   34438           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34439             :   }
   34440           3 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34441           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34442           3 :   if (!SWIG_IsOK(res2)) {
   34443           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetNoDataValueString" "', argument " "2"" of type '" "char const *""'");
   34444             :   }
   34445           3 :   arg2 = reinterpret_cast< char * >(buf2);
   34446           3 :   {
   34447           3 :     const int bLocalUseExceptions = GetUseExceptions();
   34448           3 :     if ( bLocalUseExceptions ) {
   34449           0 :       pushErrorHandler();
   34450             :     }
   34451           3 :     {
   34452           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34453           3 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueString(arg1,(char const *)arg2);
   34454           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34455             :     }
   34456           3 :     if ( bLocalUseExceptions ) {
   34457           0 :       popErrorHandler();
   34458             :     }
   34459             : #ifndef SED_HACKS
   34460             :     if ( bLocalUseExceptions ) {
   34461             :       CPLErr eclass = CPLGetLastErrorType();
   34462             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34463             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34464             :       }
   34465             :     }
   34466             : #endif
   34467             :   }
   34468           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34469           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34470           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; } }
   34471             :   return resultobj;
   34472           0 : fail:
   34473           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34474             :   return NULL;
   34475             : }
   34476             : 
   34477             : 
   34478           8 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34479           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34480           8 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34481           8 :   GIntBig arg2 ;
   34482           8 :   char *arg3 = (char *) 0 ;
   34483           8 :   void *argp1 = 0 ;
   34484           8 :   int res1 = 0 ;
   34485           8 :   int alloc2 = 0 ;
   34486           8 :   bool viewIsValid2 = false ;
   34487           8 :   Py_buffer view2 ;
   34488           8 :   PyObject *swig_obj[2] ;
   34489           8 :   CPLErr result;
   34490             :   
   34491           8 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueRaw", 2, 2, swig_obj)) SWIG_fail;
   34492           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34493           8 :   if (!SWIG_IsOK(res1)) {
   34494           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34495             :   }
   34496           8 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34497           8 :   {
   34498             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   34499           8 :     char* ptr = NULL;
   34500           8 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   34501           0 :       SWIG_fail;
   34502             :     }
   34503           8 :     arg3 = (char *)ptr;
   34504             :   }
   34505           8 :   {
   34506           8 :     const int bLocalUseExceptions = GetUseExceptions();
   34507           8 :     if ( bLocalUseExceptions ) {
   34508           1 :       pushErrorHandler();
   34509             :     }
   34510           8 :     {
   34511           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34512           8 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueRaw(arg1,arg2,arg3);
   34513           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34514             :     }
   34515           8 :     if ( bLocalUseExceptions ) {
   34516           1 :       popErrorHandler();
   34517             :     }
   34518             : #ifndef SED_HACKS
   34519             :     if ( bLocalUseExceptions ) {
   34520             :       CPLErr eclass = CPLGetLastErrorType();
   34521             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34522             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34523             :       }
   34524             :     }
   34525             : #endif
   34526             :   }
   34527           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34528           8 :   {
   34529             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34530           8 :     if( viewIsValid2 ) {
   34531           8 :       PyBuffer_Release(&view2);
   34532             :     }
   34533           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34534           0 :       delete[] arg3;
   34535             :     }
   34536             :   }
   34537           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; } }
   34538             :   return resultobj;
   34539           0 : fail:
   34540           0 :   {
   34541             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34542           0 :     if( viewIsValid2 ) {
   34543           0 :       PyBuffer_Release(&view2);
   34544             :     }
   34545           8 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34546             :       delete[] arg3;
   34547             :     }
   34548             :   }
   34549             :   return NULL;
   34550             : }
   34551             : 
   34552             : 
   34553           4 : SWIGINTERN PyObject *_wrap_MDArray_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34554           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34555           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34556           4 :   void *argp1 = 0 ;
   34557           4 :   int res1 = 0 ;
   34558           4 :   PyObject *swig_obj[1] ;
   34559           4 :   CPLErr result;
   34560             :   
   34561           4 :   if (!args) SWIG_fail;
   34562           4 :   swig_obj[0] = args;
   34563           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34564           4 :   if (!SWIG_IsOK(res1)) {
   34565           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteNoDataValue" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34566             :   }
   34567           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34568           4 :   {
   34569           4 :     const int bLocalUseExceptions = GetUseExceptions();
   34570           4 :     if ( bLocalUseExceptions ) {
   34571           0 :       pushErrorHandler();
   34572             :     }
   34573           4 :     {
   34574           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34575           4 :       result = (CPLErr)GDALMDArrayHS_DeleteNoDataValue(arg1);
   34576           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34577             :     }
   34578           4 :     if ( bLocalUseExceptions ) {
   34579           0 :       popErrorHandler();
   34580             :     }
   34581             : #ifndef SED_HACKS
   34582             :     if ( bLocalUseExceptions ) {
   34583             :       CPLErr eclass = CPLGetLastErrorType();
   34584             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34585             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34586             :       }
   34587             :     }
   34588             : #endif
   34589             :   }
   34590           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34591           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; } }
   34592             :   return resultobj;
   34593             : fail:
   34594             :   return NULL;
   34595             : }
   34596             : 
   34597             : 
   34598         102 : SWIGINTERN PyObject *_wrap_MDArray_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34599         102 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34600         102 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34601         102 :   double *arg2 = (double *) 0 ;
   34602         102 :   int *arg3 = (int *) 0 ;
   34603         102 :   void *argp1 = 0 ;
   34604         102 :   int res1 = 0 ;
   34605         102 :   double tmpval2 ;
   34606         102 :   int tmphasval2 ;
   34607         102 :   PyObject *swig_obj[1] ;
   34608             :   
   34609         102 :   {
   34610             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34611         102 :     arg2 = &tmpval2;
   34612         102 :     arg3 = &tmphasval2;
   34613             :   }
   34614         102 :   if (!args) SWIG_fail;
   34615         102 :   swig_obj[0] = args;
   34616         102 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34617         102 :   if (!SWIG_IsOK(res1)) {
   34618           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34619             :   }
   34620         102 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34621         102 :   {
   34622         102 :     const int bLocalUseExceptions = GetUseExceptions();
   34623         102 :     if ( bLocalUseExceptions ) {
   34624           1 :       pushErrorHandler();
   34625             :     }
   34626         102 :     {
   34627         102 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34628         102 :       GDALMDArrayHS_GetOffset(arg1,arg2,arg3);
   34629         102 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34630             :     }
   34631         102 :     if ( bLocalUseExceptions ) {
   34632           1 :       popErrorHandler();
   34633             :     }
   34634             : #ifndef SED_HACKS
   34635             :     if ( bLocalUseExceptions ) {
   34636             :       CPLErr eclass = CPLGetLastErrorType();
   34637             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34638             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34639             :       }
   34640             :     }
   34641             : #endif
   34642             :   }
   34643         102 :   resultobj = SWIG_Py_Void();
   34644         102 :   {
   34645             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34646         102 :     PyObject *r;
   34647         102 :     if ( !*arg3 ) {
   34648          83 :       Py_INCREF(Py_None);
   34649          83 :       r = Py_None;
   34650             :     }
   34651             :     else {
   34652          19 :       r = PyFloat_FromDouble( *arg2 );
   34653             :     }
   34654             : #if SWIG_VERSION >= 0x040300
   34655             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34656             : #else
   34657         102 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34658             : #endif
   34659             :   }
   34660         102 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34661             :   return resultobj;
   34662             : fail:
   34663             :   return NULL;
   34664             : }
   34665             : 
   34666             : 
   34667           5 : SWIGINTERN PyObject *_wrap_MDArray_GetOffsetStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34668           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34669           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34670           5 :   void *argp1 = 0 ;
   34671           5 :   int res1 = 0 ;
   34672           5 :   PyObject *swig_obj[1] ;
   34673           5 :   GDALDataType result;
   34674             :   
   34675           5 :   if (!args) SWIG_fail;
   34676           5 :   swig_obj[0] = args;
   34677           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34678           5 :   if (!SWIG_IsOK(res1)) {
   34679           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffsetStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34680             :   }
   34681           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34682           5 :   {
   34683           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34684           5 :     if ( bLocalUseExceptions ) {
   34685           0 :       pushErrorHandler();
   34686             :     }
   34687           5 :     {
   34688           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34689           5 :       result = (GDALDataType)GDALMDArrayHS_GetOffsetStorageType(arg1);
   34690           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34691             :     }
   34692           5 :     if ( bLocalUseExceptions ) {
   34693           0 :       popErrorHandler();
   34694             :     }
   34695             : #ifndef SED_HACKS
   34696             :     if ( bLocalUseExceptions ) {
   34697             :       CPLErr eclass = CPLGetLastErrorType();
   34698             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34699             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34700             :       }
   34701             :     }
   34702             : #endif
   34703             :   }
   34704           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34705           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; } }
   34706             :   return resultobj;
   34707             : fail:
   34708             :   return NULL;
   34709             : }
   34710             : 
   34711             : 
   34712         105 : SWIGINTERN PyObject *_wrap_MDArray_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34713         105 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34714         105 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34715         105 :   double *arg2 = (double *) 0 ;
   34716         105 :   int *arg3 = (int *) 0 ;
   34717         105 :   void *argp1 = 0 ;
   34718         105 :   int res1 = 0 ;
   34719         105 :   double tmpval2 ;
   34720         105 :   int tmphasval2 ;
   34721         105 :   PyObject *swig_obj[1] ;
   34722             :   
   34723         105 :   {
   34724             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34725         105 :     arg2 = &tmpval2;
   34726         105 :     arg3 = &tmphasval2;
   34727             :   }
   34728         105 :   if (!args) SWIG_fail;
   34729         105 :   swig_obj[0] = args;
   34730         105 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34731         105 :   if (!SWIG_IsOK(res1)) {
   34732           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34733             :   }
   34734         105 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34735         105 :   {
   34736         105 :     const int bLocalUseExceptions = GetUseExceptions();
   34737         105 :     if ( bLocalUseExceptions ) {
   34738           1 :       pushErrorHandler();
   34739             :     }
   34740         105 :     {
   34741         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34742         105 :       GDALMDArrayHS_GetScale(arg1,arg2,arg3);
   34743         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34744             :     }
   34745         105 :     if ( bLocalUseExceptions ) {
   34746           1 :       popErrorHandler();
   34747             :     }
   34748             : #ifndef SED_HACKS
   34749             :     if ( bLocalUseExceptions ) {
   34750             :       CPLErr eclass = CPLGetLastErrorType();
   34751             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34752             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34753             :       }
   34754             :     }
   34755             : #endif
   34756             :   }
   34757         105 :   resultobj = SWIG_Py_Void();
   34758         105 :   {
   34759             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34760         105 :     PyObject *r;
   34761         105 :     if ( !*arg3 ) {
   34762          83 :       Py_INCREF(Py_None);
   34763          83 :       r = Py_None;
   34764             :     }
   34765             :     else {
   34766          22 :       r = PyFloat_FromDouble( *arg2 );
   34767             :     }
   34768             : #if SWIG_VERSION >= 0x040300
   34769             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34770             : #else
   34771         105 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34772             : #endif
   34773             :   }
   34774         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; } }
   34775             :   return resultobj;
   34776             : fail:
   34777             :   return NULL;
   34778             : }
   34779             : 
   34780             : 
   34781           5 : SWIGINTERN PyObject *_wrap_MDArray_GetScaleStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34782           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34783           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34784           5 :   void *argp1 = 0 ;
   34785           5 :   int res1 = 0 ;
   34786           5 :   PyObject *swig_obj[1] ;
   34787           5 :   GDALDataType result;
   34788             :   
   34789           5 :   if (!args) SWIG_fail;
   34790           5 :   swig_obj[0] = args;
   34791           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34792           5 :   if (!SWIG_IsOK(res1)) {
   34793           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScaleStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34794             :   }
   34795           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34796           5 :   {
   34797           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34798           5 :     if ( bLocalUseExceptions ) {
   34799           0 :       pushErrorHandler();
   34800             :     }
   34801           5 :     {
   34802           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34803           5 :       result = (GDALDataType)GDALMDArrayHS_GetScaleStorageType(arg1);
   34804           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34805             :     }
   34806           5 :     if ( bLocalUseExceptions ) {
   34807           0 :       popErrorHandler();
   34808             :     }
   34809             : #ifndef SED_HACKS
   34810             :     if ( bLocalUseExceptions ) {
   34811             :       CPLErr eclass = CPLGetLastErrorType();
   34812             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34813             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34814             :       }
   34815             :     }
   34816             : #endif
   34817             :   }
   34818           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34819           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; } }
   34820             :   return resultobj;
   34821             : fail:
   34822             :   return NULL;
   34823             : }
   34824             : 
   34825             : 
   34826          21 : SWIGINTERN PyObject *_wrap_MDArray_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34827          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34828          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34829          21 :   double arg2 ;
   34830          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34831          21 :   void *argp1 = 0 ;
   34832          21 :   int res1 = 0 ;
   34833          21 :   double val2 ;
   34834          21 :   int ecode2 = 0 ;
   34835          21 :   PyObject * obj0 = 0 ;
   34836          21 :   PyObject * obj1 = 0 ;
   34837          21 :   PyObject * obj2 = 0 ;
   34838          21 :   char * kwnames[] = {
   34839             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34840             :   };
   34841          21 :   CPLErr result;
   34842             :   
   34843          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetOffset", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34844          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34845          21 :   if (!SWIG_IsOK(res1)) {
   34846           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34847             :   }
   34848          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34849          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34850          21 :   if (!SWIG_IsOK(ecode2)) {
   34851           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetOffset" "', argument " "2"" of type '" "double""'");
   34852             :   } 
   34853          21 :   arg2 = static_cast< double >(val2);
   34854          21 :   if (obj2) {
   34855           2 :     {
   34856             :       // %typemap(in) GDALDataType
   34857           2 :       int val = 0;
   34858           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34859           2 :       if (!SWIG_IsOK(ecode)) {
   34860           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34861             :       }
   34862           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34863             :       {
   34864           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34865             :       }
   34866             :       arg3 = static_cast<GDALDataType>(val);
   34867             :     }
   34868             :   }
   34869          21 :   {
   34870          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34871          21 :     if ( bLocalUseExceptions ) {
   34872           2 :       pushErrorHandler();
   34873             :     }
   34874          21 :     {
   34875          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34876          21 :       result = (CPLErr)GDALMDArrayHS_SetOffset(arg1,arg2,arg3);
   34877          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34878             :     }
   34879          21 :     if ( bLocalUseExceptions ) {
   34880           2 :       popErrorHandler();
   34881             :     }
   34882             : #ifndef SED_HACKS
   34883             :     if ( bLocalUseExceptions ) {
   34884             :       CPLErr eclass = CPLGetLastErrorType();
   34885             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34886             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34887             :       }
   34888             :     }
   34889             : #endif
   34890             :   }
   34891          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34892          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; } }
   34893             :   return resultobj;
   34894             : fail:
   34895             :   return NULL;
   34896             : }
   34897             : 
   34898             : 
   34899          21 : SWIGINTERN PyObject *_wrap_MDArray_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34900          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34901          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34902          21 :   double arg2 ;
   34903          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34904          21 :   void *argp1 = 0 ;
   34905          21 :   int res1 = 0 ;
   34906          21 :   double val2 ;
   34907          21 :   int ecode2 = 0 ;
   34908          21 :   PyObject * obj0 = 0 ;
   34909          21 :   PyObject * obj1 = 0 ;
   34910          21 :   PyObject * obj2 = 0 ;
   34911          21 :   char * kwnames[] = {
   34912             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34913             :   };
   34914          21 :   CPLErr result;
   34915             :   
   34916          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetScale", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34917          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34918          21 :   if (!SWIG_IsOK(res1)) {
   34919           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34920             :   }
   34921          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34922          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34923          21 :   if (!SWIG_IsOK(ecode2)) {
   34924           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetScale" "', argument " "2"" of type '" "double""'");
   34925             :   } 
   34926          21 :   arg2 = static_cast< double >(val2);
   34927          21 :   if (obj2) {
   34928           2 :     {
   34929             :       // %typemap(in) GDALDataType
   34930           2 :       int val = 0;
   34931           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34932           2 :       if (!SWIG_IsOK(ecode)) {
   34933           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34934             :       }
   34935           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34936             :       {
   34937           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34938             :       }
   34939             :       arg3 = static_cast<GDALDataType>(val);
   34940             :     }
   34941             :   }
   34942          21 :   {
   34943          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34944          21 :     if ( bLocalUseExceptions ) {
   34945           2 :       pushErrorHandler();
   34946             :     }
   34947          21 :     {
   34948          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34949          21 :       result = (CPLErr)GDALMDArrayHS_SetScale(arg1,arg2,arg3);
   34950          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34951             :     }
   34952          21 :     if ( bLocalUseExceptions ) {
   34953           2 :       popErrorHandler();
   34954             :     }
   34955             : #ifndef SED_HACKS
   34956             :     if ( bLocalUseExceptions ) {
   34957             :       CPLErr eclass = CPLGetLastErrorType();
   34958             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34959             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34960             :       }
   34961             :     }
   34962             : #endif
   34963             :   }
   34964          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34965          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; } }
   34966             :   return resultobj;
   34967             : fail:
   34968             :   return NULL;
   34969             : }
   34970             : 
   34971             : 
   34972          15 : SWIGINTERN PyObject *_wrap_MDArray_SetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34973          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34974          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34975          15 :   char *arg2 = (char *) 0 ;
   34976          15 :   void *argp1 = 0 ;
   34977          15 :   int res1 = 0 ;
   34978          15 :   int res2 ;
   34979          15 :   char *buf2 = 0 ;
   34980          15 :   int alloc2 = 0 ;
   34981          15 :   PyObject *swig_obj[2] ;
   34982          15 :   CPLErr result;
   34983             :   
   34984          15 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetUnit", 2, 2, swig_obj)) SWIG_fail;
   34985          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34986          15 :   if (!SWIG_IsOK(res1)) {
   34987           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34988             :   }
   34989          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34990          15 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34991          15 :   if (!SWIG_IsOK(res2)) {
   34992           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetUnit" "', argument " "2"" of type '" "char const *""'");
   34993             :   }
   34994          15 :   arg2 = reinterpret_cast< char * >(buf2);
   34995          15 :   {
   34996          15 :     const int bLocalUseExceptions = GetUseExceptions();
   34997          15 :     if ( bLocalUseExceptions ) {
   34998           4 :       pushErrorHandler();
   34999             :     }
   35000          15 :     {
   35001          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35002          15 :       result = (CPLErr)GDALMDArrayHS_SetUnit(arg1,(char const *)arg2);
   35003          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35004             :     }
   35005          15 :     if ( bLocalUseExceptions ) {
   35006           4 :       popErrorHandler();
   35007             :     }
   35008             : #ifndef SED_HACKS
   35009             :     if ( bLocalUseExceptions ) {
   35010             :       CPLErr eclass = CPLGetLastErrorType();
   35011             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35012             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35013             :       }
   35014             :     }
   35015             : #endif
   35016             :   }
   35017          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35018          15 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35019          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; } }
   35020             :   return resultobj;
   35021           0 : fail:
   35022           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35023             :   return NULL;
   35024             : }
   35025             : 
   35026             : 
   35027         113 : SWIGINTERN PyObject *_wrap_MDArray_GetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35028         113 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35029         113 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35030         113 :   void *argp1 = 0 ;
   35031         113 :   int res1 = 0 ;
   35032         113 :   PyObject *swig_obj[1] ;
   35033         113 :   char *result = 0 ;
   35034             :   
   35035         113 :   if (!args) SWIG_fail;
   35036         113 :   swig_obj[0] = args;
   35037         113 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35038         113 :   if (!SWIG_IsOK(res1)) {
   35039           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35040             :   }
   35041         113 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35042         113 :   {
   35043         113 :     const int bLocalUseExceptions = GetUseExceptions();
   35044         113 :     if ( bLocalUseExceptions ) {
   35045           7 :       pushErrorHandler();
   35046             :     }
   35047         113 :     {
   35048         113 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35049         113 :       result = (char *)GDALMDArrayHS_GetUnit(arg1);
   35050         113 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35051             :     }
   35052         113 :     if ( bLocalUseExceptions ) {
   35053           7 :       popErrorHandler();
   35054             :     }
   35055             : #ifndef SED_HACKS
   35056             :     if ( bLocalUseExceptions ) {
   35057             :       CPLErr eclass = CPLGetLastErrorType();
   35058             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35059             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35060             :       }
   35061             :     }
   35062             : #endif
   35063             :   }
   35064         113 :   resultobj = SWIG_FromCharPtr((const char *)result);
   35065         113 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35066             :   return resultobj;
   35067             : fail:
   35068             :   return NULL;
   35069             : }
   35070             : 
   35071             : 
   35072          30 : SWIGINTERN PyObject *_wrap_MDArray_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35073          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35074          30 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35075          30 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   35076          30 :   void *argp1 = 0 ;
   35077          30 :   int res1 = 0 ;
   35078          30 :   void *argp2 = 0 ;
   35079          30 :   int res2 = 0 ;
   35080          30 :   PyObject *swig_obj[2] ;
   35081          30 :   OGRErr result;
   35082             :   
   35083          30 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   35084          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35085          30 :   if (!SWIG_IsOK(res1)) {
   35086           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35087             :   }
   35088          30 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35089          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   35090          30 :   if (!SWIG_IsOK(res2)) {
   35091           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   35092             :   }
   35093          30 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   35094          30 :   {
   35095          30 :     const int bLocalUseExceptions = GetUseExceptions();
   35096          30 :     if ( bLocalUseExceptions ) {
   35097           4 :       pushErrorHandler();
   35098             :     }
   35099          30 :     {
   35100          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35101          30 :       result = (OGRErr)GDALMDArrayHS_SetSpatialRef(arg1,arg2);
   35102          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35103             :     }
   35104          30 :     if ( bLocalUseExceptions ) {
   35105           4 :       popErrorHandler();
   35106             :     }
   35107             : #ifndef SED_HACKS
   35108             :     if ( bLocalUseExceptions ) {
   35109             :       CPLErr eclass = CPLGetLastErrorType();
   35110             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35111             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35112             :       }
   35113             :     }
   35114             : #endif
   35115             :   }
   35116          30 :   {
   35117             :     /* %typemap(out) OGRErr */
   35118          30 :     if ( result != 0 && GetUseExceptions()) {
   35119           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   35120           0 :       if( pszMessage[0] != '\0' )
   35121           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   35122             :       else
   35123           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   35124           0 :       SWIG_fail;
   35125             :     }
   35126             :   }
   35127          30 :   {
   35128             :     /* %typemap(ret) OGRErr */
   35129          30 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   35130          30 :       resultobj = PyInt_FromLong( result );
   35131             :     }
   35132             :   }
   35133          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; } }
   35134             :   return resultobj;
   35135             : fail:
   35136             :   return NULL;
   35137             : }
   35138             : 
   35139             : 
   35140          81 : SWIGINTERN PyObject *_wrap_MDArray_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35141          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35142          81 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35143          81 :   void *argp1 = 0 ;
   35144          81 :   int res1 = 0 ;
   35145          81 :   PyObject *swig_obj[1] ;
   35146          81 :   OSRSpatialReferenceShadow *result = 0 ;
   35147             :   
   35148          81 :   if (!args) SWIG_fail;
   35149          81 :   swig_obj[0] = args;
   35150          81 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35151          81 :   if (!SWIG_IsOK(res1)) {
   35152           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35153             :   }
   35154          81 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35155          81 :   {
   35156          81 :     const int bLocalUseExceptions = GetUseExceptions();
   35157          81 :     if ( bLocalUseExceptions ) {
   35158          13 :       pushErrorHandler();
   35159             :     }
   35160          81 :     {
   35161          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35162          81 :       result = (OSRSpatialReferenceShadow *)GDALMDArrayHS_GetSpatialRef(arg1);
   35163          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35164             :     }
   35165          81 :     if ( bLocalUseExceptions ) {
   35166          13 :       popErrorHandler();
   35167             :     }
   35168             : #ifndef SED_HACKS
   35169             :     if ( bLocalUseExceptions ) {
   35170             :       CPLErr eclass = CPLGetLastErrorType();
   35171             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35172             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35173             :       }
   35174             :     }
   35175             : #endif
   35176             :   }
   35177          81 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   35178          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; } }
   35179             :   return resultobj;
   35180             : fail:
   35181             :   return NULL;
   35182             : }
   35183             : 
   35184             : 
   35185         434 : SWIGINTERN PyObject *_wrap_MDArray_GetView(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35186         434 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35187         434 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35188         434 :   char *arg2 = (char *) 0 ;
   35189         434 :   void *argp1 = 0 ;
   35190         434 :   int res1 = 0 ;
   35191         434 :   int res2 ;
   35192         434 :   char *buf2 = 0 ;
   35193         434 :   int alloc2 = 0 ;
   35194         434 :   PyObject *swig_obj[2] ;
   35195         434 :   GDALMDArrayHS *result = 0 ;
   35196             :   
   35197         434 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetView", 2, 2, swig_obj)) SWIG_fail;
   35198         434 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35199         434 :   if (!SWIG_IsOK(res1)) {
   35200           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetView" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35201             :   }
   35202         434 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35203         434 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   35204         434 :   if (!SWIG_IsOK(res2)) {
   35205           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetView" "', argument " "2"" of type '" "char const *""'");
   35206             :   }
   35207         434 :   arg2 = reinterpret_cast< char * >(buf2);
   35208         434 :   {
   35209         434 :     if (!arg2) {
   35210           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35211             :     }
   35212             :   }
   35213         433 :   {
   35214         433 :     const int bLocalUseExceptions = GetUseExceptions();
   35215         433 :     if ( bLocalUseExceptions ) {
   35216          10 :       pushErrorHandler();
   35217             :     }
   35218         433 :     {
   35219         433 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35220         433 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetView(arg1,(char const *)arg2);
   35221         433 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35222             :     }
   35223         433 :     if ( bLocalUseExceptions ) {
   35224          10 :       popErrorHandler();
   35225             :     }
   35226             : #ifndef SED_HACKS
   35227             :     if ( bLocalUseExceptions ) {
   35228             :       CPLErr eclass = CPLGetLastErrorType();
   35229             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35230             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35231             :       }
   35232             :     }
   35233             : #endif
   35234             :   }
   35235         433 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35236         433 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35237         434 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35238             :   return resultobj;
   35239           1 : fail:
   35240           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35241             :   return NULL;
   35242             : }
   35243             : 
   35244             : 
   35245          44 : SWIGINTERN PyObject *_wrap_MDArray_Transpose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35246          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35247          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35248          44 :   int arg2 ;
   35249          44 :   int *arg3 = (int *) 0 ;
   35250          44 :   void *argp1 = 0 ;
   35251          44 :   int res1 = 0 ;
   35252          44 :   PyObject *swig_obj[2] ;
   35253          44 :   GDALMDArrayHS *result = 0 ;
   35254             :   
   35255          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Transpose", 2, 2, swig_obj)) SWIG_fail;
   35256          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35257          44 :   if (!SWIG_IsOK(res1)) {
   35258           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Transpose" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35259             :   }
   35260          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35261          44 :   {
   35262             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   35263          44 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   35264          44 :     if( arg2 < 0 ) {
   35265           0 :       SWIG_fail;
   35266             :     }
   35267             :   }
   35268          44 :   {
   35269          44 :     const int bLocalUseExceptions = GetUseExceptions();
   35270          44 :     if ( bLocalUseExceptions ) {
   35271           1 :       pushErrorHandler();
   35272             :     }
   35273          44 :     {
   35274          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35275          44 :       result = (GDALMDArrayHS *)GDALMDArrayHS_Transpose(arg1,arg2,arg3);
   35276          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35277             :     }
   35278          44 :     if ( bLocalUseExceptions ) {
   35279           1 :       popErrorHandler();
   35280             :     }
   35281             : #ifndef SED_HACKS
   35282             :     if ( bLocalUseExceptions ) {
   35283             :       CPLErr eclass = CPLGetLastErrorType();
   35284             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35285             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35286             :       }
   35287             :     }
   35288             : #endif
   35289             :   }
   35290          44 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35291          44 :   {
   35292             :     /* %typemap(freearg) (int nList, int* pList) */
   35293          44 :     free(arg3);
   35294             :   }
   35295          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; } }
   35296             :   return resultobj;
   35297           0 : fail:
   35298           0 :   {
   35299             :     /* %typemap(freearg) (int nList, int* pList) */
   35300           0 :     free(arg3);
   35301             :   }
   35302           0 :   return NULL;
   35303             : }
   35304             : 
   35305             : 
   35306          13 : SWIGINTERN PyObject *_wrap_MDArray_GetUnscaled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35307          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35308          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35309          13 :   void *argp1 = 0 ;
   35310          13 :   int res1 = 0 ;
   35311          13 :   PyObject *swig_obj[1] ;
   35312          13 :   GDALMDArrayHS *result = 0 ;
   35313             :   
   35314          13 :   if (!args) SWIG_fail;
   35315          13 :   swig_obj[0] = args;
   35316          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35317          13 :   if (!SWIG_IsOK(res1)) {
   35318           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnscaled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35319             :   }
   35320          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35321          13 :   {
   35322          13 :     const int bLocalUseExceptions = GetUseExceptions();
   35323          13 :     if ( bLocalUseExceptions ) {
   35324           0 :       pushErrorHandler();
   35325             :     }
   35326          13 :     {
   35327          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35328          13 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetUnscaled(arg1);
   35329          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35330             :     }
   35331          13 :     if ( bLocalUseExceptions ) {
   35332           0 :       popErrorHandler();
   35333             :     }
   35334             : #ifndef SED_HACKS
   35335             :     if ( bLocalUseExceptions ) {
   35336             :       CPLErr eclass = CPLGetLastErrorType();
   35337             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35338             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35339             :       }
   35340             :     }
   35341             : #endif
   35342             :   }
   35343          13 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35344          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; } }
   35345             :   return resultobj;
   35346             : fail:
   35347             :   return NULL;
   35348             : }
   35349             : 
   35350             : 
   35351          35 : SWIGINTERN PyObject *_wrap_MDArray_GetMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35352          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35353          35 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35354          35 :   char **arg2 = (char **) 0 ;
   35355          35 :   void *argp1 = 0 ;
   35356          35 :   int res1 = 0 ;
   35357          35 :   PyObject *swig_obj[2] ;
   35358          35 :   GDALMDArrayHS *result = 0 ;
   35359             :   
   35360          35 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMask", 1, 2, swig_obj)) SWIG_fail;
   35361          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35362          35 :   if (!SWIG_IsOK(res1)) {
   35363           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetMask" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35364             :   }
   35365          35 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35366          35 :   if (swig_obj[1]) {
   35367          14 :     {
   35368             :       /* %typemap(in) char **dict */
   35369          14 :       arg2 = NULL;
   35370          14 :       if ( PySequence_Check( swig_obj[1] ) ) {
   35371          14 :         int bErr = FALSE;
   35372          14 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   35373          14 :         if ( bErr )
   35374             :         {
   35375           0 :           SWIG_fail;
   35376             :         }
   35377             :       }
   35378           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   35379           0 :         int bErr = FALSE;
   35380           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   35381           0 :         if ( bErr )
   35382             :         {
   35383           0 :           SWIG_fail;
   35384             :         }
   35385             :       }
   35386             :       else {
   35387           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35388           0 :         SWIG_fail;
   35389             :       }
   35390             :     }
   35391             :   }
   35392          35 :   {
   35393          35 :     const int bLocalUseExceptions = GetUseExceptions();
   35394          35 :     if ( bLocalUseExceptions ) {
   35395          14 :       pushErrorHandler();
   35396             :     }
   35397          35 :     {
   35398          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35399          35 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetMask(arg1,arg2);
   35400          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35401             :     }
   35402          35 :     if ( bLocalUseExceptions ) {
   35403          14 :       popErrorHandler();
   35404             :     }
   35405             : #ifndef SED_HACKS
   35406             :     if ( bLocalUseExceptions ) {
   35407             :       CPLErr eclass = CPLGetLastErrorType();
   35408             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35409             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35410             :       }
   35411             :     }
   35412             : #endif
   35413             :   }
   35414          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35415          35 :   {
   35416             :     /* %typemap(freearg) char **dict */
   35417          35 :     CSLDestroy( arg2 );
   35418             :   }
   35419          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; } }
   35420             :   return resultobj;
   35421           0 : fail:
   35422           0 :   {
   35423             :     /* %typemap(freearg) char **dict */
   35424           0 :     CSLDestroy( arg2 );
   35425             :   }
   35426             :   return NULL;
   35427             : }
   35428             : 
   35429             : 
   35430          22 : SWIGINTERN PyObject *_wrap_MDArray_GetGridded(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35431          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35432          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35433          22 :   char *arg2 = (char *) 0 ;
   35434          22 :   GDALMDArrayHS *arg3 = (GDALMDArrayHS *) NULL ;
   35435          22 :   GDALMDArrayHS *arg4 = (GDALMDArrayHS *) NULL ;
   35436          22 :   char **arg5 = (char **) 0 ;
   35437          22 :   void *argp1 = 0 ;
   35438          22 :   int res1 = 0 ;
   35439          22 :   int res2 ;
   35440          22 :   char *buf2 = 0 ;
   35441          22 :   int alloc2 = 0 ;
   35442          22 :   void *argp3 = 0 ;
   35443          22 :   int res3 = 0 ;
   35444          22 :   void *argp4 = 0 ;
   35445          22 :   int res4 = 0 ;
   35446          22 :   PyObject * obj0 = 0 ;
   35447          22 :   PyObject * obj1 = 0 ;
   35448          22 :   PyObject * obj2 = 0 ;
   35449          22 :   PyObject * obj3 = 0 ;
   35450          22 :   PyObject * obj4 = 0 ;
   35451          22 :   char * kwnames[] = {
   35452             :     (char *)"self",  (char *)"pszGridOptions",  (char *)"xArray",  (char *)"yArray",  (char *)"options",  NULL 
   35453             :   };
   35454          22 :   GDALMDArrayHS *result = 0 ;
   35455             :   
   35456          22 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:MDArray_GetGridded", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35457          22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35458          22 :   if (!SWIG_IsOK(res1)) {
   35459           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetGridded" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35460             :   }
   35461          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35462          22 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   35463          22 :   if (!SWIG_IsOK(res2)) {
   35464           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetGridded" "', argument " "2"" of type '" "char const *""'");
   35465             :   }
   35466          22 :   arg2 = reinterpret_cast< char * >(buf2);
   35467          22 :   if (obj2) {
   35468          14 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35469          14 :     if (!SWIG_IsOK(res3)) {
   35470           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MDArray_GetGridded" "', argument " "3"" of type '" "GDALMDArrayHS *""'"); 
   35471             :     }
   35472          14 :     arg3 = reinterpret_cast< GDALMDArrayHS * >(argp3);
   35473             :   }
   35474          22 :   if (obj3) {
   35475          13 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35476          13 :     if (!SWIG_IsOK(res4)) {
   35477           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_GetGridded" "', argument " "4"" of type '" "GDALMDArrayHS *""'"); 
   35478             :     }
   35479          13 :     arg4 = reinterpret_cast< GDALMDArrayHS * >(argp4);
   35480             :   }
   35481          22 :   if (obj4) {
   35482           3 :     {
   35483             :       /* %typemap(in) char **dict */
   35484           3 :       arg5 = NULL;
   35485           3 :       if ( PySequence_Check( obj4 ) ) {
   35486           3 :         int bErr = FALSE;
   35487           3 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35488           3 :         if ( bErr )
   35489             :         {
   35490           0 :           SWIG_fail;
   35491             :         }
   35492             :       }
   35493           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35494           0 :         int bErr = FALSE;
   35495           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35496           0 :         if ( bErr )
   35497             :         {
   35498           0 :           SWIG_fail;
   35499             :         }
   35500             :       }
   35501             :       else {
   35502           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35503           0 :         SWIG_fail;
   35504             :       }
   35505             :     }
   35506             :   }
   35507          22 :   {
   35508          22 :     if (!arg2) {
   35509           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35510             :     }
   35511             :   }
   35512          22 :   {
   35513          22 :     const int bLocalUseExceptions = GetUseExceptions();
   35514          22 :     if ( bLocalUseExceptions ) {
   35515           0 :       pushErrorHandler();
   35516             :     }
   35517          22 :     {
   35518          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35519          22 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetGridded(arg1,(char const *)arg2,arg3,arg4,arg5);
   35520          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35521             :     }
   35522          22 :     if ( bLocalUseExceptions ) {
   35523           0 :       popErrorHandler();
   35524             :     }
   35525             : #ifndef SED_HACKS
   35526             :     if ( bLocalUseExceptions ) {
   35527             :       CPLErr eclass = CPLGetLastErrorType();
   35528             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35529             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35530             :       }
   35531             :     }
   35532             : #endif
   35533             :   }
   35534          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35535          22 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35536          22 :   {
   35537             :     /* %typemap(freearg) char **dict */
   35538          22 :     CSLDestroy( arg5 );
   35539             :   }
   35540          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; } }
   35541             :   return resultobj;
   35542           0 : fail:
   35543           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35544           0 :   {
   35545             :     /* %typemap(freearg) char **dict */
   35546           0 :     CSLDestroy( arg5 );
   35547             :   }
   35548             :   return NULL;
   35549             : }
   35550             : 
   35551             : 
   35552         100 : SWIGINTERN PyObject *_wrap_MDArray_AsClassicDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35553         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35554         100 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35555         100 :   size_t arg2 ;
   35556         100 :   size_t arg3 ;
   35557         100 :   GDALGroupHS *arg4 = (GDALGroupHS *) NULL ;
   35558         100 :   char **arg5 = (char **) 0 ;
   35559         100 :   void *argp1 = 0 ;
   35560         100 :   int res1 = 0 ;
   35561         100 :   size_t val2 ;
   35562         100 :   int ecode2 = 0 ;
   35563         100 :   size_t val3 ;
   35564         100 :   int ecode3 = 0 ;
   35565         100 :   void *argp4 = 0 ;
   35566         100 :   int res4 = 0 ;
   35567         100 :   PyObject *swig_obj[5] ;
   35568         100 :   GDALDatasetShadow *result = 0 ;
   35569             :   
   35570         100 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AsClassicDataset", 3, 5, swig_obj)) SWIG_fail;
   35571         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35572         100 :   if (!SWIG_IsOK(res1)) {
   35573           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AsClassicDataset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35574             :   }
   35575         100 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35576         100 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   35577         100 :   if (!SWIG_IsOK(ecode2)) {
   35578           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_AsClassicDataset" "', argument " "2"" of type '" "size_t""'");
   35579             :   } 
   35580         100 :   arg2 = static_cast< size_t >(val2);
   35581         100 :   ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   35582         100 :   if (!SWIG_IsOK(ecode3)) {
   35583           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_AsClassicDataset" "', argument " "3"" of type '" "size_t""'");
   35584             :   } 
   35585         100 :   arg3 = static_cast< size_t >(val3);
   35586         100 :   if (swig_obj[3]) {
   35587          52 :     res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   35588          52 :     if (!SWIG_IsOK(res4)) {
   35589           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_AsClassicDataset" "', argument " "4"" of type '" "GDALGroupHS *""'"); 
   35590             :     }
   35591          52 :     arg4 = reinterpret_cast< GDALGroupHS * >(argp4);
   35592             :   }
   35593         100 :   if (swig_obj[4]) {
   35594          52 :     {
   35595             :       /* %typemap(in) char **dict */
   35596          52 :       arg5 = NULL;
   35597          52 :       if ( PySequence_Check( swig_obj[4] ) ) {
   35598          52 :         int bErr = FALSE;
   35599          52 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   35600          52 :         if ( bErr )
   35601             :         {
   35602           0 :           SWIG_fail;
   35603             :         }
   35604             :       }
   35605           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   35606           0 :         int bErr = FALSE;
   35607           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   35608           0 :         if ( bErr )
   35609             :         {
   35610           0 :           SWIG_fail;
   35611             :         }
   35612             :       }
   35613             :       else {
   35614           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35615           0 :         SWIG_fail;
   35616             :       }
   35617             :     }
   35618             :   }
   35619         100 :   {
   35620         100 :     const int bLocalUseExceptions = GetUseExceptions();
   35621         100 :     if ( bLocalUseExceptions ) {
   35622          70 :       pushErrorHandler();
   35623             :     }
   35624         100 :     {
   35625         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35626         100 :       result = (GDALDatasetShadow *)GDALMDArrayHS_AsClassicDataset(arg1,arg2,arg3,arg4,arg5);
   35627         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35628             :     }
   35629         100 :     if ( bLocalUseExceptions ) {
   35630          70 :       popErrorHandler();
   35631             :     }
   35632             : #ifndef SED_HACKS
   35633             :     if ( bLocalUseExceptions ) {
   35634             :       CPLErr eclass = CPLGetLastErrorType();
   35635             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35636             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35637             :       }
   35638             :     }
   35639             : #endif
   35640             :   }
   35641         100 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   35642         100 :   {
   35643             :     /* %typemap(freearg) char **dict */
   35644         100 :     CSLDestroy( arg5 );
   35645             :   }
   35646         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; } }
   35647             :   return resultobj;
   35648           0 : fail:
   35649           0 :   {
   35650             :     /* %typemap(freearg) char **dict */
   35651           0 :     CSLDestroy( arg5 );
   35652             :   }
   35653             :   return NULL;
   35654             : }
   35655             : 
   35656             : 
   35657          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35658          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35659          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35660          15 :   bool arg2 = (bool) FALSE ;
   35661          15 :   bool arg3 = (bool) TRUE ;
   35662          15 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   35663          15 :   void *arg5 = (void *) NULL ;
   35664          15 :   void *argp1 = 0 ;
   35665          15 :   int res1 = 0 ;
   35666          15 :   bool val2 ;
   35667          15 :   int ecode2 = 0 ;
   35668          15 :   bool val3 ;
   35669          15 :   int ecode3 = 0 ;
   35670          15 :   PyObject * obj0 = 0 ;
   35671          15 :   PyObject * obj1 = 0 ;
   35672          15 :   PyObject * obj2 = 0 ;
   35673          15 :   PyObject * obj3 = 0 ;
   35674          15 :   PyObject * obj4 = 0 ;
   35675          15 :   char * kwnames[] = {
   35676             :     (char *)"self",  (char *)"approx_ok",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   35677             :   };
   35678          15 :   Statistics *result = 0 ;
   35679             :   
   35680             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35681          15 :   PyProgressData *psProgressInfo;
   35682          15 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35683          15 :   psProgressInfo->nLastReported = -1;
   35684          15 :   psProgressInfo->psPyCallback = NULL;
   35685          15 :   psProgressInfo->psPyCallbackData = NULL;
   35686          15 :   arg5 = psProgressInfo;
   35687          15 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_GetStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35688          15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35689          15 :   if (!SWIG_IsOK(res1)) {
   35690           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35691             :   }
   35692          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35693          15 :   if (obj1) {
   35694          13 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35695          13 :     if (!SWIG_IsOK(ecode2)) {
   35696           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetStatistics" "', argument " "2"" of type '" "bool""'");
   35697             :     } 
   35698             :     arg2 = static_cast< bool >(val2);
   35699             :   }
   35700          15 :   if (obj2) {
   35701          13 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   35702          13 :     if (!SWIG_IsOK(ecode3)) {
   35703           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_GetStatistics" "', argument " "3"" of type '" "bool""'");
   35704             :     } 
   35705             :     arg3 = static_cast< bool >(val3);
   35706             :   }
   35707          15 :   if (obj3) {
   35708           0 :     {
   35709             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35710             :       /* callback_func typemap */
   35711             :       
   35712             :       /* In some cases 0 is passed instead of None. */
   35713             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35714           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   35715             :       {
   35716           0 :         if( PyLong_AsLong(obj3) == 0 )
   35717             :         {
   35718           0 :           obj3 = Py_None;
   35719             :         }
   35720             :       }
   35721             :       
   35722           0 :       if (obj3 && obj3 != Py_None ) {
   35723           0 :         void* cbfunction = NULL;
   35724           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   35725             :             (void**)&cbfunction,
   35726             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35727             :             SWIG_POINTER_EXCEPTION | 0 ));
   35728             :         
   35729           0 :         if ( cbfunction == GDALTermProgress ) {
   35730             :           arg4 = GDALTermProgress;
   35731             :         } else {
   35732           0 :           if (!PyCallable_Check(obj3)) {
   35733           0 :             PyErr_SetString( PyExc_RuntimeError,
   35734             :               "Object given is not a Python function" );
   35735           0 :             SWIG_fail;
   35736             :           }
   35737           0 :           psProgressInfo->psPyCallback = obj3;
   35738           0 :           arg4 = PyProgressProxy;
   35739             :         }
   35740             :         
   35741             :       }
   35742             :       
   35743             :     }
   35744             :   }
   35745          15 :   if (obj4) {
   35746           0 :     {
   35747             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35748           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   35749             :     }
   35750             :   }
   35751          15 :   {
   35752          15 :     const int bLocalUseExceptions = GetUseExceptions();
   35753          15 :     if ( bLocalUseExceptions ) {
   35754           5 :       pushErrorHandler();
   35755             :     }
   35756          15 :     {
   35757          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35758          15 :       result = (Statistics *)GDALMDArrayHS_GetStatistics(arg1,arg2,arg3,arg4,arg5);
   35759          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35760             :     }
   35761          15 :     if ( bLocalUseExceptions ) {
   35762           5 :       popErrorHandler();
   35763             :     }
   35764             : #ifndef SED_HACKS
   35765             :     if ( bLocalUseExceptions ) {
   35766             :       CPLErr eclass = CPLGetLastErrorType();
   35767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35769             :       }
   35770             :     }
   35771             : #endif
   35772             :   }
   35773          15 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35774          15 :   {
   35775             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35776             :     
   35777          15 :     CPLFree(psProgressInfo);
   35778             :     
   35779             :   }
   35780          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; } }
   35781             :   return resultobj;
   35782           0 : fail:
   35783           0 :   {
   35784             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35785             :     
   35786           0 :     CPLFree(psProgressInfo);
   35787             :     
   35788             :   }
   35789             :   return NULL;
   35790             : }
   35791             : 
   35792             : 
   35793           4 : SWIGINTERN PyObject *_wrap_MDArray_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35794           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35795           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35796           4 :   bool arg2 = (bool) FALSE ;
   35797           4 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   35798           4 :   void *arg4 = (void *) NULL ;
   35799           4 :   char **arg5 = (char **) 0 ;
   35800           4 :   void *argp1 = 0 ;
   35801           4 :   int res1 = 0 ;
   35802           4 :   bool val2 ;
   35803           4 :   int ecode2 = 0 ;
   35804           4 :   PyObject * obj0 = 0 ;
   35805           4 :   PyObject * obj1 = 0 ;
   35806           4 :   PyObject * obj2 = 0 ;
   35807           4 :   PyObject * obj3 = 0 ;
   35808           4 :   PyObject * obj4 = 0 ;
   35809           4 :   char * kwnames[] = {
   35810             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   35811             :   };
   35812           4 :   Statistics *result = 0 ;
   35813             :   
   35814             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35815           4 :   PyProgressData *psProgressInfo;
   35816           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35817           4 :   psProgressInfo->nLastReported = -1;
   35818           4 :   psProgressInfo->psPyCallback = NULL;
   35819           4 :   psProgressInfo->psPyCallbackData = NULL;
   35820           4 :   arg4 = psProgressInfo;
   35821           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35822           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35823           4 :   if (!SWIG_IsOK(res1)) {
   35824           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_ComputeStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35825             :   }
   35826           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35827           4 :   if (obj1) {
   35828           2 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35829           2 :     if (!SWIG_IsOK(ecode2)) {
   35830           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   35831             :     } 
   35832             :     arg2 = static_cast< bool >(val2);
   35833             :   }
   35834           4 :   if (obj2) {
   35835           0 :     {
   35836             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35837             :       /* callback_func typemap */
   35838             :       
   35839             :       /* In some cases 0 is passed instead of None. */
   35840             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35841           0 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   35842             :       {
   35843           0 :         if( PyLong_AsLong(obj2) == 0 )
   35844             :         {
   35845           0 :           obj2 = Py_None;
   35846             :         }
   35847             :       }
   35848             :       
   35849           0 :       if (obj2 && obj2 != Py_None ) {
   35850           0 :         void* cbfunction = NULL;
   35851           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   35852             :             (void**)&cbfunction,
   35853             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35854             :             SWIG_POINTER_EXCEPTION | 0 ));
   35855             :         
   35856           0 :         if ( cbfunction == GDALTermProgress ) {
   35857             :           arg3 = GDALTermProgress;
   35858             :         } else {
   35859           0 :           if (!PyCallable_Check(obj2)) {
   35860           0 :             PyErr_SetString( PyExc_RuntimeError,
   35861             :               "Object given is not a Python function" );
   35862           0 :             SWIG_fail;
   35863             :           }
   35864           0 :           psProgressInfo->psPyCallback = obj2;
   35865           0 :           arg3 = PyProgressProxy;
   35866             :         }
   35867             :         
   35868             :       }
   35869             :       
   35870             :     }
   35871             :   }
   35872           4 :   if (obj3) {
   35873           0 :     {
   35874             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35875           0 :       psProgressInfo->psPyCallbackData = obj3 ;
   35876             :     }
   35877             :   }
   35878           4 :   if (obj4) {
   35879           2 :     {
   35880             :       /* %typemap(in) char **dict */
   35881           2 :       arg5 = NULL;
   35882           2 :       if ( PySequence_Check( obj4 ) ) {
   35883           2 :         int bErr = FALSE;
   35884           2 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35885           2 :         if ( bErr )
   35886             :         {
   35887           0 :           SWIG_fail;
   35888             :         }
   35889             :       }
   35890           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35891           0 :         int bErr = FALSE;
   35892           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35893           0 :         if ( bErr )
   35894             :         {
   35895           0 :           SWIG_fail;
   35896             :         }
   35897             :       }
   35898             :       else {
   35899           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35900           0 :         SWIG_fail;
   35901             :       }
   35902             :     }
   35903             :   }
   35904           4 :   {
   35905           4 :     const int bLocalUseExceptions = GetUseExceptions();
   35906           4 :     if ( bLocalUseExceptions ) {
   35907           2 :       pushErrorHandler();
   35908             :     }
   35909           4 :     {
   35910           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35911           4 :       result = (Statistics *)GDALMDArrayHS_ComputeStatistics(arg1,arg2,arg3,arg4,arg5);
   35912           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35913             :     }
   35914           4 :     if ( bLocalUseExceptions ) {
   35915           2 :       popErrorHandler();
   35916             :     }
   35917             : #ifndef SED_HACKS
   35918             :     if ( bLocalUseExceptions ) {
   35919             :       CPLErr eclass = CPLGetLastErrorType();
   35920             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35921             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35922             :       }
   35923             :     }
   35924             : #endif
   35925             :   }
   35926           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35927           4 :   {
   35928             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35929             :     
   35930           4 :     CPLFree(psProgressInfo);
   35931             :     
   35932             :   }
   35933           4 :   {
   35934             :     /* %typemap(freearg) char **dict */
   35935           4 :     CSLDestroy( arg5 );
   35936             :   }
   35937           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; } }
   35938             :   return resultobj;
   35939           0 : fail:
   35940           0 :   {
   35941             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35942             :     
   35943           0 :     CPLFree(psProgressInfo);
   35944             :     
   35945             :   }
   35946           0 :   {
   35947             :     /* %typemap(freearg) char **dict */
   35948           0 :     CSLDestroy( arg5 );
   35949             :   }
   35950             :   return NULL;
   35951             : }
   35952             : 
   35953             : 
   35954          34 : SWIGINTERN PyObject *_wrap_MDArray_GetResampled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35955          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35956          34 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35957          34 :   int arg2 ;
   35958          34 :   GDALDimensionHS **arg3 = (GDALDimensionHS **) 0 ;
   35959          34 :   GDALRIOResampleAlg arg4 ;
   35960          34 :   OSRSpatialReferenceShadow **arg5 = (OSRSpatialReferenceShadow **) 0 ;
   35961          34 :   char **arg6 = (char **) 0 ;
   35962          34 :   void *argp1 = 0 ;
   35963          34 :   int res1 = 0 ;
   35964          34 :   OSRSpatialReferenceShadow *val5 ;
   35965          34 :   PyObject *swig_obj[5] ;
   35966          34 :   GDALMDArrayHS *result = 0 ;
   35967             :   
   35968          34 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetResampled", 4, 5, swig_obj)) SWIG_fail;
   35969          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35970          34 :   if (!SWIG_IsOK(res1)) {
   35971           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetResampled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35972             :   }
   35973          34 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35974          34 :   {
   35975             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   35976          34 :     if ( !PySequence_Check(swig_obj[1]) ) {
   35977           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   35978           0 :       SWIG_fail;
   35979             :     }
   35980          34 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   35981          34 :     if( size > (Py_ssize_t)INT_MAX ) {
   35982           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35983           0 :       SWIG_fail;
   35984             :     }
   35985          34 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   35986           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35987           0 :       SWIG_fail;
   35988             :     }
   35989          34 :     arg2 = (int)size;
   35990          34 :     arg3 = (GDALDimensionHS**) VSIMalloc(arg2*sizeof(GDALDimensionHS*));
   35991          34 :     if( !arg3) {
   35992           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35993           0 :       SWIG_fail;
   35994             :     }
   35995             :     
   35996         112 :     for( int i = 0; i<arg2; i++ ) {
   35997          78 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   35998          78 :       GDALDimensionHS* rawobjectpointer = NULL;
   35999          78 :       if( o != Py_None )
   36000             :       {
   36001           8 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   36002           8 :         if (!rawobjectpointer) {
   36003           0 :           Py_DECREF(o);
   36004           0 :           PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   36005           0 :           SWIG_fail;
   36006             :         }
   36007             :       }
   36008          78 :       arg3[i] = rawobjectpointer;
   36009          78 :       Py_DECREF(o);
   36010             :       
   36011             :     }
   36012             :   }
   36013          34 :   {
   36014             :     // %typemap(in) GDALRIOResampleAlg
   36015          34 :     int val = 0;
   36016          34 :     int ecode = SWIG_AsVal_int(swig_obj[2], &val);
   36017          34 :     if (!SWIG_IsOK(ecode)) {
   36018           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   36019             :     }
   36020          34 :     if( val < 0 ||
   36021          34 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   36022          34 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   36023             :       val > static_cast<int>(GRIORA_LAST) )
   36024             :     {
   36025           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   36026             :     }
   36027          34 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   36028             :   }
   36029          34 :   {
   36030             :     /* %typemap(in) (OSRSpatialReferenceShadow** optional_OSRSpatialReferenceShadow) */
   36031          34 :     if ( swig_obj[3] == Py_None ) {
   36032             :       arg5 = NULL;
   36033             :     }
   36034             :     else {
   36035           1 :       void* argp = NULL;
   36036           1 :       int res = SWIG_ConvertPtr(swig_obj[3], &argp, SWIGTYPE_p_OSRSpatialReferenceShadow,  0  | 0);
   36037           1 :       if (!SWIG_IsOK(res)) {
   36038           0 :         SWIG_exception_fail(SWIG_ArgError(res), "argument of type != OSRSpatialReferenceShadow");
   36039             :       }
   36040           1 :       val5 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp);
   36041           1 :       arg5 = &val5;
   36042             :     }
   36043             :   }
   36044          34 :   if (swig_obj[4]) {
   36045           5 :     {
   36046             :       /* %typemap(in) char **dict */
   36047           5 :       arg6 = NULL;
   36048           5 :       if ( PySequence_Check( swig_obj[4] ) ) {
   36049           5 :         int bErr = FALSE;
   36050           5 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   36051           5 :         if ( bErr )
   36052             :         {
   36053           0 :           SWIG_fail;
   36054             :         }
   36055             :       }
   36056           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   36057           0 :         int bErr = FALSE;
   36058           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   36059           0 :         if ( bErr )
   36060             :         {
   36061           0 :           SWIG_fail;
   36062             :         }
   36063             :       }
   36064             :       else {
   36065           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36066           0 :         SWIG_fail;
   36067             :       }
   36068             :     }
   36069             :   }
   36070          34 :   {
   36071          34 :     const int bLocalUseExceptions = GetUseExceptions();
   36072          34 :     if ( bLocalUseExceptions ) {
   36073           0 :       pushErrorHandler();
   36074             :     }
   36075          34 :     {
   36076          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36077          34 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetResampled(arg1,arg2,arg3,arg4,arg5,arg6);
   36078          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36079             :     }
   36080          34 :     if ( bLocalUseExceptions ) {
   36081           0 :       popErrorHandler();
   36082             :     }
   36083             : #ifndef SED_HACKS
   36084             :     if ( bLocalUseExceptions ) {
   36085             :       CPLErr eclass = CPLGetLastErrorType();
   36086             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36087             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36088             :       }
   36089             :     }
   36090             : #endif
   36091             :   }
   36092          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   36093          34 :   {
   36094             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   36095          34 :     CPLFree( arg3 );
   36096             :   }
   36097          34 :   {
   36098             :     /* %typemap(freearg) char **dict */
   36099          34 :     CSLDestroy( arg6 );
   36100             :   }
   36101          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; } }
   36102             :   return resultobj;
   36103           0 : fail:
   36104           0 :   {
   36105             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   36106           0 :     CPLFree( arg3 );
   36107             :   }
   36108           0 :   {
   36109             :     /* %typemap(freearg) char **dict */
   36110           0 :     CSLDestroy( arg6 );
   36111             :   }
   36112             :   return NULL;
   36113             : }
   36114             : 
   36115             : 
   36116           7 : SWIGINTERN PyObject *_wrap_MDArray_GetMeshGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36117           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36118           7 :   int arg1 ;
   36119           7 :   GDALMDArrayHS **arg2 = (GDALMDArrayHS **) 0 ;
   36120           7 :   GDALMDArrayHS ***arg3 = (GDALMDArrayHS ***) 0 ;
   36121           7 :   size_t *arg4 = (size_t *) 0 ;
   36122           7 :   char **arg5 = (char **) 0 ;
   36123           7 :   GDALMDArrayHS **arrays3 = 0 ;
   36124           7 :   size_t nCount3 = 0 ;
   36125           7 :   PyObject *swig_obj[2] ;
   36126             :   
   36127           7 :   {
   36128             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36129           7 :     arg3 = &arrays3;
   36130           7 :     arg4 = &nCount3;
   36131             :   }
   36132           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMeshGrid", 1, 2, swig_obj)) SWIG_fail;
   36133           7 :   {
   36134             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   36135           7 :     if ( !PySequence_Check(swig_obj[0]) ) {
   36136           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   36137           0 :       SWIG_fail;
   36138             :     }
   36139           7 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   36140           7 :     if( size > (Py_ssize_t)INT_MAX ) {
   36141           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   36142           0 :       SWIG_fail;
   36143             :     }
   36144           7 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   36145           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   36146           0 :       SWIG_fail;
   36147             :     }
   36148           7 :     arg1 = (int)size;
   36149           7 :     arg2 = (GDALMDArrayHS**) VSIMalloc(arg1*sizeof(GDALMDArrayHS*));
   36150           7 :     if( !arg2) {
   36151           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   36152           0 :       SWIG_fail;
   36153             :     }
   36154             :     
   36155          20 :     for( int i = 0; i<arg1; i++ ) {
   36156          13 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   36157          13 :       GDALMDArrayHS* rawobjectpointer = NULL;
   36158          13 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   36159          13 :       if (!rawobjectpointer) {
   36160           0 :         Py_DECREF(o);
   36161           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   36162           0 :         SWIG_fail;
   36163             :       }
   36164          13 :       arg2[i] = rawobjectpointer;
   36165          13 :       Py_DECREF(o);
   36166             :       
   36167             :     }
   36168             :   }
   36169           7 :   if (swig_obj[1]) {
   36170           5 :     {
   36171             :       /* %typemap(in) char **dict */
   36172           5 :       arg5 = NULL;
   36173           5 :       if ( PySequence_Check( swig_obj[1] ) ) {
   36174           5 :         int bErr = FALSE;
   36175           5 :         arg5 = CSLFromPySequence(swig_obj[1], &bErr);
   36176           5 :         if ( bErr )
   36177             :         {
   36178           0 :           SWIG_fail;
   36179             :         }
   36180             :       }
   36181           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   36182           0 :         int bErr = FALSE;
   36183           0 :         arg5 = CSLFromPyMapping(swig_obj[1], &bErr);
   36184           0 :         if ( bErr )
   36185             :         {
   36186           0 :           SWIG_fail;
   36187             :         }
   36188             :       }
   36189             :       else {
   36190           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36191           0 :         SWIG_fail;
   36192             :       }
   36193             :     }
   36194             :   }
   36195           7 :   {
   36196           7 :     const int bLocalUseExceptions = GetUseExceptions();
   36197           7 :     if ( bLocalUseExceptions ) {
   36198           7 :       pushErrorHandler();
   36199             :     }
   36200           7 :     {
   36201           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36202           7 :       GDALMDArrayHS_GetMeshGrid(arg1,arg2,arg3,arg4,arg5);
   36203           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36204             :     }
   36205           7 :     if ( bLocalUseExceptions ) {
   36206           7 :       popErrorHandler();
   36207             :     }
   36208             : #ifndef SED_HACKS
   36209             :     if ( bLocalUseExceptions ) {
   36210             :       CPLErr eclass = CPLGetLastErrorType();
   36211             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36212             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36213             :       }
   36214             :     }
   36215             : #endif
   36216             :   }
   36217           7 :   resultobj = SWIG_Py_Void();
   36218           7 :   {
   36219             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36220           7 :     Py_DECREF(resultobj);
   36221           7 :     resultobj = PyList_New( *arg4 );
   36222           7 :     if( !resultobj ) {
   36223           0 :       SWIG_fail;
   36224             :     }
   36225          17 :     for( size_t i = 0; i < *arg4; i++ ) {
   36226          10 :       PyList_SetItem(resultobj, i,
   36227          10 :         SWIG_NewPointerObj((void*)(*arg3)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   36228             :       /* We have borrowed the GDALMDArrayHS */
   36229          10 :       (*arg3)[i] = NULL;
   36230             :     }
   36231             :   }
   36232           7 :   {
   36233             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   36234           7 :     CPLFree( arg2 );
   36235             :   }
   36236           7 :   {
   36237             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36238           7 :     GDALReleaseArrays(*arg3, *arg4);
   36239             :   }
   36240           7 :   {
   36241             :     /* %typemap(freearg) char **dict */
   36242           7 :     CSLDestroy( arg5 );
   36243             :   }
   36244          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; } }
   36245             :   return resultobj;
   36246           0 : fail:
   36247           0 :   {
   36248             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   36249           0 :     CPLFree( arg2 );
   36250             :   }
   36251           0 :   {
   36252             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36253           0 :     GDALReleaseArrays(*arg3, *arg4);
   36254             :   }
   36255           0 :   {
   36256             :     /* %typemap(freearg) char **dict */
   36257           0 :     CSLDestroy( arg5 );
   36258             :   }
   36259             :   return NULL;
   36260             : }
   36261             : 
   36262             : 
   36263           7 : SWIGINTERN PyObject *_wrap_MDArray_Cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36264           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36265           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   36266           7 :   char **arg2 = (char **) NULL ;
   36267           7 :   void *argp1 = 0 ;
   36268           7 :   int res1 = 0 ;
   36269           7 :   PyObject *swig_obj[2] ;
   36270           7 :   bool result;
   36271             :   
   36272           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Cache", 1, 2, swig_obj)) SWIG_fail;
   36273           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   36274           7 :   if (!SWIG_IsOK(res1)) {
   36275           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Cache" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   36276             :   }
   36277           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   36278           7 :   if (swig_obj[1]) {
   36279           1 :     {
   36280             :       /* %typemap(in) char **dict */
   36281           1 :       arg2 = NULL;
   36282           1 :       if ( PySequence_Check( swig_obj[1] ) ) {
   36283           1 :         int bErr = FALSE;
   36284           1 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   36285           1 :         if ( bErr )
   36286             :         {
   36287           0 :           SWIG_fail;
   36288             :         }
   36289             :       }
   36290           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   36291           0 :         int bErr = FALSE;
   36292           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   36293           0 :         if ( bErr )
   36294             :         {
   36295           0 :           SWIG_fail;
   36296             :         }
   36297             :       }
   36298             :       else {
   36299           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36300           0 :         SWIG_fail;
   36301             :       }
   36302             :     }
   36303             :   }
   36304           7 :   {
   36305           7 :     const int bLocalUseExceptions = GetUseExceptions();
   36306           7 :     if ( bLocalUseExceptions ) {
   36307           1 :       pushErrorHandler();
   36308             :     }
   36309           7 :     {
   36310           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36311           7 :       result = (bool)GDALMDArrayHS_Cache(arg1,arg2);
   36312           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36313             :     }
   36314           7 :     if ( bLocalUseExceptions ) {
   36315           1 :       popErrorHandler();
   36316             :     }
   36317             : #ifndef SED_HACKS
   36318             :     if ( bLocalUseExceptions ) {
   36319             :       CPLErr eclass = CPLGetLastErrorType();
   36320             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36321             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36322             :       }
   36323             :     }
   36324             : #endif
   36325             :   }
   36326           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   36327           7 :   {
   36328             :     /* %typemap(freearg) char **dict */
   36329           7 :     CSLDestroy( arg2 );
   36330             :   }
   36331           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; } }
   36332             :   return resultobj;
   36333           0 : fail:
   36334           0 :   {
   36335             :     /* %typemap(freearg) char **dict */
   36336           0 :     CSLDestroy( arg2 );
   36337             :   }
   36338             :   return NULL;
   36339             : }
   36340             : 
   36341             : 
   36342          28 : SWIGINTERN PyObject *_wrap_MDArray_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36343          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36344          28 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   36345          28 :   char *arg2 = (char *) 0 ;
   36346          28 :   void *argp1 = 0 ;
   36347          28 :   int res1 = 0 ;
   36348          28 :   int res2 ;
   36349          28 :   char *buf2 = 0 ;
   36350          28 :   int alloc2 = 0 ;
   36351          28 :   PyObject *swig_obj[2] ;
   36352          28 :   CPLErr result;
   36353             :   
   36354          28 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Rename", 2, 2, swig_obj)) SWIG_fail;
   36355          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   36356          28 :   if (!SWIG_IsOK(res1)) {
   36357           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Rename" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   36358             :   }
   36359          28 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   36360          28 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   36361          28 :   if (!SWIG_IsOK(res2)) {
   36362           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_Rename" "', argument " "2"" of type '" "char const *""'");
   36363             :   }
   36364          28 :   arg2 = reinterpret_cast< char * >(buf2);
   36365          28 :   {
   36366          28 :     const int bLocalUseExceptions = GetUseExceptions();
   36367          28 :     if ( bLocalUseExceptions ) {
   36368          28 :       pushErrorHandler();
   36369             :     }
   36370          28 :     {
   36371          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36372          28 :       result = (CPLErr)GDALMDArrayHS_Rename(arg1,(char const *)arg2);
   36373          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36374             :     }
   36375          28 :     if ( bLocalUseExceptions ) {
   36376          28 :       popErrorHandler();
   36377             :     }
   36378             : #ifndef SED_HACKS
   36379             :     if ( bLocalUseExceptions ) {
   36380             :       CPLErr eclass = CPLGetLastErrorType();
   36381             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36382             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36383             :       }
   36384             :     }
   36385             : #endif
   36386             :   }
   36387          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36388          28 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36389          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; } }
   36390             :   return resultobj;
   36391           0 : fail:
   36392           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36393             :   return NULL;
   36394             : }
   36395             : 
   36396             : 
   36397         277 : SWIGINTERN PyObject *MDArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36398         277 :   PyObject *obj;
   36399         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   36400         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMDArrayHS, SWIG_NewClientData(obj));
   36401         277 :   return SWIG_Py_Void();
   36402             : }
   36403             : 
   36404         739 : SWIGINTERN PyObject *_wrap_delete_Attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36405         739 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36406         739 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36407         739 :   void *argp1 = 0 ;
   36408         739 :   int res1 = 0 ;
   36409         739 :   PyObject *swig_obj[1] ;
   36410             :   
   36411         739 :   if (!args) SWIG_fail;
   36412         739 :   swig_obj[0] = args;
   36413         739 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_DISOWN |  0 );
   36414         739 :   if (!SWIG_IsOK(res1)) {
   36415           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Attribute" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36416             :   }
   36417         739 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36418         739 :   {
   36419         739 :     const int bLocalUseExceptions = GetUseExceptions();
   36420         739 :     if ( bLocalUseExceptions ) {
   36421         372 :       pushErrorHandler();
   36422             :     }
   36423         739 :     {
   36424         739 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36425         739 :       delete_GDALAttributeHS(arg1);
   36426         739 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36427             :     }
   36428         739 :     if ( bLocalUseExceptions ) {
   36429         372 :       popErrorHandler();
   36430             :     }
   36431             : #ifndef SED_HACKS
   36432             :     if ( bLocalUseExceptions ) {
   36433             :       CPLErr eclass = CPLGetLastErrorType();
   36434             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36435             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36436             :       }
   36437             :     }
   36438             : #endif
   36439             :   }
   36440         739 :   resultobj = SWIG_Py_Void();
   36441         739 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36442             :   return resultobj;
   36443             : fail:
   36444             :   return NULL;
   36445             : }
   36446             : 
   36447             : 
   36448         361 : SWIGINTERN PyObject *_wrap_Attribute_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36449         361 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36450         361 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36451         361 :   void *argp1 = 0 ;
   36452         361 :   int res1 = 0 ;
   36453         361 :   PyObject *swig_obj[1] ;
   36454         361 :   char *result = 0 ;
   36455             :   
   36456         361 :   if (!args) SWIG_fail;
   36457         361 :   swig_obj[0] = args;
   36458         361 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36459         361 :   if (!SWIG_IsOK(res1)) {
   36460           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36461             :   }
   36462         361 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36463         361 :   {
   36464         361 :     const int bLocalUseExceptions = GetUseExceptions();
   36465         361 :     if ( bLocalUseExceptions ) {
   36466         149 :       pushErrorHandler();
   36467             :     }
   36468         361 :     {
   36469         361 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36470         361 :       result = (char *)GDALAttributeHS_GetName(arg1);
   36471         361 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36472             :     }
   36473         361 :     if ( bLocalUseExceptions ) {
   36474         149 :       popErrorHandler();
   36475             :     }
   36476             : #ifndef SED_HACKS
   36477             :     if ( bLocalUseExceptions ) {
   36478             :       CPLErr eclass = CPLGetLastErrorType();
   36479             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36480             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36481             :       }
   36482             :     }
   36483             : #endif
   36484             :   }
   36485         361 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36486         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; } }
   36487             :   return resultobj;
   36488             : fail:
   36489             :   return NULL;
   36490             : }
   36491             : 
   36492             : 
   36493          49 : SWIGINTERN PyObject *_wrap_Attribute_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36494          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36495          49 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36496          49 :   void *argp1 = 0 ;
   36497          49 :   int res1 = 0 ;
   36498          49 :   PyObject *swig_obj[1] ;
   36499          49 :   char *result = 0 ;
   36500             :   
   36501          49 :   if (!args) SWIG_fail;
   36502          49 :   swig_obj[0] = args;
   36503          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36504          49 :   if (!SWIG_IsOK(res1)) {
   36505           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetFullName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36506             :   }
   36507          49 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36508          49 :   {
   36509          49 :     const int bLocalUseExceptions = GetUseExceptions();
   36510          49 :     if ( bLocalUseExceptions ) {
   36511          41 :       pushErrorHandler();
   36512             :     }
   36513          49 :     {
   36514          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36515          49 :       result = (char *)GDALAttributeHS_GetFullName(arg1);
   36516          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36517             :     }
   36518          49 :     if ( bLocalUseExceptions ) {
   36519          41 :       popErrorHandler();
   36520             :     }
   36521             : #ifndef SED_HACKS
   36522             :     if ( bLocalUseExceptions ) {
   36523             :       CPLErr eclass = CPLGetLastErrorType();
   36524             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36525             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36526             :       }
   36527             :     }
   36528             : #endif
   36529             :   }
   36530          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36531          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; } }
   36532             :   return resultobj;
   36533             : fail:
   36534             :   return NULL;
   36535             : }
   36536             : 
   36537             : 
   36538         177 : SWIGINTERN PyObject *_wrap_Attribute_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36539         177 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36540         177 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36541         177 :   void *argp1 = 0 ;
   36542         177 :   int res1 = 0 ;
   36543         177 :   PyObject *swig_obj[1] ;
   36544         177 :   GUIntBig result;
   36545             :   
   36546         177 :   if (!args) SWIG_fail;
   36547         177 :   swig_obj[0] = args;
   36548         177 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36549         177 :   if (!SWIG_IsOK(res1)) {
   36550           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetTotalElementsCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36551             :   }
   36552         177 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36553         177 :   {
   36554         177 :     const int bLocalUseExceptions = GetUseExceptions();
   36555         177 :     if ( bLocalUseExceptions ) {
   36556          52 :       pushErrorHandler();
   36557             :     }
   36558         177 :     {
   36559         177 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36560         177 :       result = GDALAttributeHS_GetTotalElementsCount(arg1);
   36561         177 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36562             :     }
   36563         177 :     if ( bLocalUseExceptions ) {
   36564          52 :       popErrorHandler();
   36565             :     }
   36566             : #ifndef SED_HACKS
   36567             :     if ( bLocalUseExceptions ) {
   36568             :       CPLErr eclass = CPLGetLastErrorType();
   36569             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36570             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36571             :       }
   36572             :     }
   36573             : #endif
   36574             :   }
   36575         177 :   {
   36576         177 :     resultobj = PyLong_FromUnsignedLongLong(result);
   36577             :   }
   36578         177 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36579             :   return resultobj;
   36580             : fail:
   36581             :   return NULL;
   36582             : }
   36583             : 
   36584             : 
   36585          12 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36586          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36587          12 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36588          12 :   void *argp1 = 0 ;
   36589          12 :   int res1 = 0 ;
   36590          12 :   PyObject *swig_obj[1] ;
   36591          12 :   size_t result;
   36592             :   
   36593          12 :   if (!args) SWIG_fail;
   36594          12 :   swig_obj[0] = args;
   36595          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36596          12 :   if (!SWIG_IsOK(res1)) {
   36597           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36598             :   }
   36599          12 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36600          12 :   {
   36601          12 :     const int bLocalUseExceptions = GetUseExceptions();
   36602          12 :     if ( bLocalUseExceptions ) {
   36603           6 :       pushErrorHandler();
   36604             :     }
   36605          12 :     {
   36606          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36607          12 :       result = GDALAttributeHS_GetDimensionCount(arg1);
   36608          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36609             :     }
   36610          12 :     if ( bLocalUseExceptions ) {
   36611           6 :       popErrorHandler();
   36612             :     }
   36613             : #ifndef SED_HACKS
   36614             :     if ( bLocalUseExceptions ) {
   36615             :       CPLErr eclass = CPLGetLastErrorType();
   36616             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36617             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36618             :       }
   36619             :     }
   36620             : #endif
   36621             :   }
   36622          12 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   36623          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; } }
   36624             :   return resultobj;
   36625             : fail:
   36626             :   return NULL;
   36627             : }
   36628             : 
   36629             : 
   36630          11 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36631          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36632          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36633          11 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   36634          11 :   size_t *arg3 = (size_t *) 0 ;
   36635          11 :   void *argp1 = 0 ;
   36636          11 :   int res1 = 0 ;
   36637          11 :   GUIntBig *vals2 = 0 ;
   36638          11 :   size_t nCount2 = 0 ;
   36639          11 :   PyObject *swig_obj[1] ;
   36640             :   
   36641          11 :   {
   36642             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   36643          11 :     arg2 = &vals2;
   36644          11 :     arg3 = &nCount2;
   36645             :   }
   36646          11 :   if (!args) SWIG_fail;
   36647          11 :   swig_obj[0] = args;
   36648          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36649          11 :   if (!SWIG_IsOK(res1)) {
   36650           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionsSize" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36651             :   }
   36652          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36653          11 :   {
   36654          11 :     const int bLocalUseExceptions = GetUseExceptions();
   36655          11 :     if ( bLocalUseExceptions ) {
   36656           5 :       pushErrorHandler();
   36657             :     }
   36658          11 :     {
   36659          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36660          11 :       GDALAttributeHS_GetDimensionsSize(arg1,arg2,arg3);
   36661          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36662             :     }
   36663          11 :     if ( bLocalUseExceptions ) {
   36664           5 :       popErrorHandler();
   36665             :     }
   36666             : #ifndef SED_HACKS
   36667             :     if ( bLocalUseExceptions ) {
   36668             :       CPLErr eclass = CPLGetLastErrorType();
   36669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36671             :       }
   36672             :     }
   36673             : #endif
   36674             :   }
   36675          11 :   resultobj = SWIG_Py_Void();
   36676          11 :   {
   36677             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   36678          11 :     Py_DECREF(resultobj);
   36679          11 :     resultobj = PyList_New( *arg3 );
   36680          11 :     if( !resultobj ) {
   36681           0 :       SWIG_fail;
   36682             :     }
   36683          22 :     for( size_t i = 0; i < *arg3; i++ ) {
   36684          11 :       char szTmp[32];
   36685          11 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   36686          11 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   36687          11 :       PyList_SetItem(resultobj, i, o );
   36688             :     }
   36689             :   }
   36690          11 :   {
   36691             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36692          11 :     CPLFree(*arg2);
   36693             :   }
   36694          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; } }
   36695             :   return resultobj;
   36696           0 : fail:
   36697           0 :   {
   36698             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36699           0 :     CPLFree(*arg2);
   36700             :   }
   36701             :   return NULL;
   36702             : }
   36703             : 
   36704             : 
   36705         419 : SWIGINTERN PyObject *_wrap_Attribute_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36706         419 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36707         419 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36708         419 :   void *argp1 = 0 ;
   36709         419 :   int res1 = 0 ;
   36710         419 :   PyObject *swig_obj[1] ;
   36711         419 :   GDALExtendedDataTypeHS *result = 0 ;
   36712             :   
   36713         419 :   if (!args) SWIG_fail;
   36714         419 :   swig_obj[0] = args;
   36715         419 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36716         419 :   if (!SWIG_IsOK(res1)) {
   36717           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDataType" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36718             :   }
   36719         419 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36720         419 :   {
   36721         419 :     const int bLocalUseExceptions = GetUseExceptions();
   36722         419 :     if ( bLocalUseExceptions ) {
   36723         203 :       pushErrorHandler();
   36724             :     }
   36725         419 :     {
   36726         419 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36727         419 :       result = (GDALExtendedDataTypeHS *)GDALAttributeHS_GetDataType(arg1);
   36728         419 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36729             :     }
   36730         419 :     if ( bLocalUseExceptions ) {
   36731         203 :       popErrorHandler();
   36732             :     }
   36733             : #ifndef SED_HACKS
   36734             :     if ( bLocalUseExceptions ) {
   36735             :       CPLErr eclass = CPLGetLastErrorType();
   36736             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36737             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36738             :       }
   36739             :     }
   36740             : #endif
   36741             :   }
   36742         419 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   36743         419 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36744             :   return resultobj;
   36745             : fail:
   36746             :   return NULL;
   36747             : }
   36748             : 
   36749             : 
   36750          10 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36751          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36752          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36753          10 :   void **arg2 = (void **) 0 ;
   36754          10 :   void *argp1 = 0 ;
   36755          10 :   int res1 = 0 ;
   36756          10 :   void *pyObject2 = NULL ;
   36757          10 :   PyObject *swig_obj[1] ;
   36758          10 :   CPLErr result;
   36759             :   
   36760          10 :   {
   36761             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   36762          10 :     arg2 = &pyObject2;
   36763             :   }
   36764          10 :   if (!args) SWIG_fail;
   36765          10 :   swig_obj[0] = args;
   36766          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36767          10 :   if (!SWIG_IsOK(res1)) {
   36768           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36769             :   }
   36770          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36771          10 :   {
   36772          10 :     const int bLocalUseExceptions = GetUseExceptions();
   36773          10 :     if ( bLocalUseExceptions ) {
   36774           4 :       pushErrorHandler();
   36775             :     }
   36776          10 :     {
   36777          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36778          10 :       result = (CPLErr)GDALAttributeHS_ReadAsRaw(arg1,arg2);
   36779          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36780             :     }
   36781          10 :     if ( bLocalUseExceptions ) {
   36782           4 :       popErrorHandler();
   36783             :     }
   36784             : #ifndef SED_HACKS
   36785             :     if ( bLocalUseExceptions ) {
   36786             :       CPLErr eclass = CPLGetLastErrorType();
   36787             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36788             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36789             :       }
   36790             :     }
   36791             : #endif
   36792             :   }
   36793          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36794          10 :   {
   36795             :     /* %typemap(argout) ( void **outPythonObject ) */
   36796          10 :     Py_XDECREF(resultobj);
   36797          10 :     if (*arg2)
   36798             :     {
   36799             :       resultobj = (PyObject*)*arg2;
   36800             :     }
   36801             :     else
   36802             :     {
   36803           4 :       resultobj = Py_None;
   36804           4 :       Py_INCREF(resultobj);
   36805             :     }
   36806             :   }
   36807          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; } }
   36808             :   return resultobj;
   36809             : fail:
   36810             :   return NULL;
   36811             : }
   36812             : 
   36813             : 
   36814         108 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36815         108 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36816         108 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36817         108 :   void *argp1 = 0 ;
   36818         108 :   int res1 = 0 ;
   36819         108 :   PyObject *swig_obj[1] ;
   36820         108 :   char *result = 0 ;
   36821             :   
   36822         108 :   if (!args) SWIG_fail;
   36823         108 :   swig_obj[0] = args;
   36824         108 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36825         108 :   if (!SWIG_IsOK(res1)) {
   36826           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36827             :   }
   36828         108 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36829         108 :   {
   36830         108 :     const int bLocalUseExceptions = GetUseExceptions();
   36831         108 :     if ( bLocalUseExceptions ) {
   36832          31 :       pushErrorHandler();
   36833             :     }
   36834         108 :     {
   36835         108 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36836         108 :       result = (char *)GDALAttributeHS_ReadAsString(arg1);
   36837         108 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36838             :     }
   36839         108 :     if ( bLocalUseExceptions ) {
   36840          31 :       popErrorHandler();
   36841             :     }
   36842             : #ifndef SED_HACKS
   36843             :     if ( bLocalUseExceptions ) {
   36844             :       CPLErr eclass = CPLGetLastErrorType();
   36845             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36846             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36847             :       }
   36848             :     }
   36849             : #endif
   36850             :   }
   36851         108 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36852         108 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36853             :   return resultobj;
   36854             : fail:
   36855             :   return NULL;
   36856             : }
   36857             : 
   36858             : 
   36859          22 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36860          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36861          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36862          22 :   void *argp1 = 0 ;
   36863          22 :   int res1 = 0 ;
   36864          22 :   PyObject *swig_obj[1] ;
   36865          22 :   int result;
   36866             :   
   36867          22 :   if (!args) SWIG_fail;
   36868          22 :   swig_obj[0] = args;
   36869          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36870          22 :   if (!SWIG_IsOK(res1)) {
   36871           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36872             :   }
   36873          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36874          22 :   {
   36875          22 :     const int bLocalUseExceptions = GetUseExceptions();
   36876          22 :     if ( bLocalUseExceptions ) {
   36877           9 :       pushErrorHandler();
   36878             :     }
   36879          22 :     {
   36880          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36881          22 :       result = (int)GDALAttributeHS_ReadAsInt(arg1);
   36882          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36883             :     }
   36884          22 :     if ( bLocalUseExceptions ) {
   36885           9 :       popErrorHandler();
   36886             :     }
   36887             : #ifndef SED_HACKS
   36888             :     if ( bLocalUseExceptions ) {
   36889             :       CPLErr eclass = CPLGetLastErrorType();
   36890             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36891             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36892             :       }
   36893             :     }
   36894             : #endif
   36895             :   }
   36896          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36897          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; } }
   36898             :   return resultobj;
   36899             : fail:
   36900             :   return NULL;
   36901             : }
   36902             : 
   36903             : 
   36904          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36905          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36906          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36907          15 :   void *argp1 = 0 ;
   36908          15 :   int res1 = 0 ;
   36909          15 :   PyObject *swig_obj[1] ;
   36910          15 :   long long result;
   36911             :   
   36912          15 :   if (!args) SWIG_fail;
   36913          15 :   swig_obj[0] = args;
   36914          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36915          15 :   if (!SWIG_IsOK(res1)) {
   36916           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36917             :   }
   36918          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36919          15 :   {
   36920          15 :     const int bLocalUseExceptions = GetUseExceptions();
   36921          15 :     if ( bLocalUseExceptions ) {
   36922           1 :       pushErrorHandler();
   36923             :     }
   36924          15 :     {
   36925          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36926          15 :       result = (long long)GDALAttributeHS_ReadAsInt64(arg1);
   36927          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36928             :     }
   36929          15 :     if ( bLocalUseExceptions ) {
   36930           1 :       popErrorHandler();
   36931             :     }
   36932             : #ifndef SED_HACKS
   36933             :     if ( bLocalUseExceptions ) {
   36934             :       CPLErr eclass = CPLGetLastErrorType();
   36935             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36936             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36937             :       }
   36938             :     }
   36939             : #endif
   36940             :   }
   36941          15 :   resultobj = SWIG_From_long_SS_long(static_cast< long long >(result));
   36942          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; } }
   36943             :   return resultobj;
   36944             : fail:
   36945             :   return NULL;
   36946             : }
   36947             : 
   36948             : 
   36949          40 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36950          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36951          40 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36952          40 :   void *argp1 = 0 ;
   36953          40 :   int res1 = 0 ;
   36954          40 :   PyObject *swig_obj[1] ;
   36955          40 :   double result;
   36956             :   
   36957          40 :   if (!args) SWIG_fail;
   36958          40 :   swig_obj[0] = args;
   36959          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36960          40 :   if (!SWIG_IsOK(res1)) {
   36961           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36962             :   }
   36963          40 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36964          40 :   {
   36965          40 :     const int bLocalUseExceptions = GetUseExceptions();
   36966          40 :     if ( bLocalUseExceptions ) {
   36967           6 :       pushErrorHandler();
   36968             :     }
   36969          40 :     {
   36970          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36971          40 :       result = (double)GDALAttributeHS_ReadAsDouble(arg1);
   36972          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36973             :     }
   36974          40 :     if ( bLocalUseExceptions ) {
   36975           6 :       popErrorHandler();
   36976             :     }
   36977             : #ifndef SED_HACKS
   36978             :     if ( bLocalUseExceptions ) {
   36979             :       CPLErr eclass = CPLGetLastErrorType();
   36980             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36981             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36982             :       }
   36983             :     }
   36984             : #endif
   36985             :   }
   36986          40 :   resultobj = SWIG_From_double(static_cast< double >(result));
   36987          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; } }
   36988             :   return resultobj;
   36989             : fail:
   36990             :   return NULL;
   36991             : }
   36992             : 
   36993             : 
   36994          19 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36995          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36996          19 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36997          19 :   void *argp1 = 0 ;
   36998          19 :   int res1 = 0 ;
   36999          19 :   PyObject *swig_obj[1] ;
   37000          19 :   char **result = 0 ;
   37001             :   
   37002          19 :   if (!args) SWIG_fail;
   37003          19 :   swig_obj[0] = args;
   37004          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37005          19 :   if (!SWIG_IsOK(res1)) {
   37006           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37007             :   }
   37008          19 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37009          19 :   {
   37010          19 :     const int bLocalUseExceptions = GetUseExceptions();
   37011          19 :     if ( bLocalUseExceptions ) {
   37012           4 :       pushErrorHandler();
   37013             :     }
   37014          19 :     {
   37015          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37016          19 :       result = (char **)GDALAttributeHS_ReadAsStringArray(arg1);
   37017          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37018             :     }
   37019          19 :     if ( bLocalUseExceptions ) {
   37020           4 :       popErrorHandler();
   37021             :     }
   37022             : #ifndef SED_HACKS
   37023             :     if ( bLocalUseExceptions ) {
   37024             :       CPLErr eclass = CPLGetLastErrorType();
   37025             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37026             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37027             :       }
   37028             :     }
   37029             : #endif
   37030             :   }
   37031          19 :   {
   37032             :     /* %typemap(out) char **CSL -> ( string ) */
   37033          19 :     bool bErr = false;
   37034          19 :     resultobj = CSLToList(result, &bErr);
   37035          19 :     CSLDestroy(result);
   37036          19 :     if( bErr ) {
   37037           0 :       SWIG_fail;
   37038             :     }
   37039             :   }
   37040          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; } }
   37041             :   return resultobj;
   37042             : fail:
   37043             :   return NULL;
   37044             : }
   37045             : 
   37046             : 
   37047          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37048          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37049          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37050          15 :   int **arg2 = (int **) 0 ;
   37051          15 :   size_t *arg3 = (size_t *) 0 ;
   37052          15 :   void *argp1 = 0 ;
   37053          15 :   int res1 = 0 ;
   37054          15 :   int *vals2 = 0 ;
   37055          15 :   size_t nCount2 = 0 ;
   37056          15 :   PyObject *swig_obj[1] ;
   37057             :   
   37058          15 :   {
   37059             :     /* %typemap(in,numinputs=0) (int** pvals, size_t* pnCount) */
   37060          15 :     arg2 = &vals2;
   37061          15 :     arg3 = &nCount2;
   37062             :   }
   37063          15 :   if (!args) SWIG_fail;
   37064          15 :   swig_obj[0] = args;
   37065          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37066          15 :   if (!SWIG_IsOK(res1)) {
   37067           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37068             :   }
   37069          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37070          15 :   {
   37071          15 :     const int bLocalUseExceptions = GetUseExceptions();
   37072          15 :     if ( bLocalUseExceptions ) {
   37073           4 :       pushErrorHandler();
   37074             :     }
   37075          15 :     {
   37076          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37077          15 :       GDALAttributeHS_ReadAsIntArray(arg1,arg2,arg3);
   37078          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37079             :     }
   37080          15 :     if ( bLocalUseExceptions ) {
   37081           4 :       popErrorHandler();
   37082             :     }
   37083             : #ifndef SED_HACKS
   37084             :     if ( bLocalUseExceptions ) {
   37085             :       CPLErr eclass = CPLGetLastErrorType();
   37086             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37087             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37088             :       }
   37089             :     }
   37090             : #endif
   37091             :   }
   37092          15 :   resultobj = SWIG_Py_Void();
   37093          15 :   {
   37094             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   37095          15 :     PyObject *list = CreateTupleFromIntArray(*arg2, *arg3);
   37096          15 :     Py_DECREF(resultobj);
   37097          15 :     resultobj = list;
   37098             :   }
   37099          15 :   {
   37100             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   37101          15 :     CPLFree(*arg2);
   37102             :   }
   37103          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; } }
   37104             :   return resultobj;
   37105           0 : fail:
   37106           0 :   {
   37107             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   37108           0 :     CPLFree(*arg2);
   37109             :   }
   37110             :   return NULL;
   37111             : }
   37112             : 
   37113             : 
   37114          14 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37115          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37116          14 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37117          14 :   long long **arg2 = (long long **) 0 ;
   37118          14 :   size_t *arg3 = (size_t *) 0 ;
   37119          14 :   void *argp1 = 0 ;
   37120          14 :   int res1 = 0 ;
   37121          14 :   long long *vals2 = 0 ;
   37122          14 :   size_t nCount2 = 0 ;
   37123          14 :   PyObject *swig_obj[1] ;
   37124             :   
   37125          14 :   {
   37126             :     /* %typemap(in,numinputs=0) (long long** pvals, size_t* pnCount) */
   37127          14 :     arg2 = &vals2;
   37128          14 :     arg3 = &nCount2;
   37129             :   }
   37130          14 :   if (!args) SWIG_fail;
   37131          14 :   swig_obj[0] = args;
   37132          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37133          14 :   if (!SWIG_IsOK(res1)) {
   37134           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37135             :   }
   37136          14 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37137          14 :   {
   37138          14 :     const int bLocalUseExceptions = GetUseExceptions();
   37139          14 :     if ( bLocalUseExceptions ) {
   37140           1 :       pushErrorHandler();
   37141             :     }
   37142          14 :     {
   37143          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37144          14 :       GDALAttributeHS_ReadAsInt64Array(arg1,arg2,arg3);
   37145          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37146             :     }
   37147          14 :     if ( bLocalUseExceptions ) {
   37148           1 :       popErrorHandler();
   37149             :     }
   37150             : #ifndef SED_HACKS
   37151             :     if ( bLocalUseExceptions ) {
   37152             :       CPLErr eclass = CPLGetLastErrorType();
   37153             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37154             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37155             :       }
   37156             :     }
   37157             : #endif
   37158             :   }
   37159          14 :   resultobj = SWIG_Py_Void();
   37160          14 :   {
   37161             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   37162          14 :     PyObject *list = CreateTupleFromInt64Array(*arg2, *arg3);
   37163          14 :     Py_DECREF(resultobj);
   37164          14 :     resultobj = list;
   37165             :   }
   37166          14 :   {
   37167             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   37168          14 :     CPLFree(*arg2);
   37169             :   }
   37170          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; } }
   37171             :   return resultobj;
   37172           0 : fail:
   37173           0 :   {
   37174             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   37175           0 :     CPLFree(*arg2);
   37176             :   }
   37177             :   return NULL;
   37178             : }
   37179             : 
   37180             : 
   37181          29 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37182          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37183          29 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37184          29 :   double **arg2 = (double **) 0 ;
   37185          29 :   size_t *arg3 = (size_t *) 0 ;
   37186          29 :   void *argp1 = 0 ;
   37187          29 :   int res1 = 0 ;
   37188          29 :   double *vals2 = 0 ;
   37189          29 :   size_t nCount2 = 0 ;
   37190          29 :   PyObject *swig_obj[1] ;
   37191             :   
   37192          29 :   {
   37193             :     /* %typemap(in,numinputs=0) (double** pvals, size_t* pnCount) */
   37194          29 :     arg2 = &vals2;
   37195          29 :     arg3 = &nCount2;
   37196             :   }
   37197          29 :   if (!args) SWIG_fail;
   37198          29 :   swig_obj[0] = args;
   37199          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37200          29 :   if (!SWIG_IsOK(res1)) {
   37201           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37202             :   }
   37203          29 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37204          29 :   {
   37205          29 :     const int bLocalUseExceptions = GetUseExceptions();
   37206          29 :     if ( bLocalUseExceptions ) {
   37207           3 :       pushErrorHandler();
   37208             :     }
   37209          29 :     {
   37210          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37211          29 :       GDALAttributeHS_ReadAsDoubleArray(arg1,arg2,arg3);
   37212          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37213             :     }
   37214          29 :     if ( bLocalUseExceptions ) {
   37215           3 :       popErrorHandler();
   37216             :     }
   37217             : #ifndef SED_HACKS
   37218             :     if ( bLocalUseExceptions ) {
   37219             :       CPLErr eclass = CPLGetLastErrorType();
   37220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37222             :       }
   37223             :     }
   37224             : #endif
   37225             :   }
   37226          29 :   resultobj = SWIG_Py_Void();
   37227          29 :   {
   37228             :     /* %typemap(argout) (double** pvals, size_t* pnCount) */
   37229          29 :     PyObject *list = CreateTupleFromDoubleArray(*arg2, *arg3);
   37230          29 :     Py_DECREF(resultobj);
   37231          29 :     resultobj = list;
   37232             :   }
   37233          29 :   {
   37234             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   37235          29 :     CPLFree(*arg2);
   37236             :   }
   37237          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; } }
   37238             :   return resultobj;
   37239           0 : fail:
   37240           0 :   {
   37241             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   37242           0 :     CPLFree(*arg2);
   37243             :   }
   37244             :   return NULL;
   37245             : }
   37246             : 
   37247             : 
   37248           5 : SWIGINTERN PyObject *_wrap_Attribute_WriteRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37249           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37250           5 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37251           5 :   GIntBig arg2 ;
   37252           5 :   char *arg3 = (char *) 0 ;
   37253           5 :   void *argp1 = 0 ;
   37254           5 :   int res1 = 0 ;
   37255           5 :   int alloc2 = 0 ;
   37256           5 :   bool viewIsValid2 = false ;
   37257           5 :   Py_buffer view2 ;
   37258           5 :   PyObject *swig_obj[2] ;
   37259           5 :   CPLErr result;
   37260             :   
   37261           5 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteRaw", 2, 2, swig_obj)) SWIG_fail;
   37262           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37263           5 :   if (!SWIG_IsOK(res1)) {
   37264           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37265             :   }
   37266           5 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37267           5 :   {
   37268             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   37269           5 :     char* ptr = NULL;
   37270           5 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   37271           0 :       SWIG_fail;
   37272             :     }
   37273           5 :     arg3 = (char *)ptr;
   37274             :   }
   37275           5 :   {
   37276           5 :     const int bLocalUseExceptions = GetUseExceptions();
   37277           5 :     if ( bLocalUseExceptions ) {
   37278           4 :       pushErrorHandler();
   37279             :     }
   37280           5 :     {
   37281           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37282           5 :       result = (CPLErr)GDALAttributeHS_WriteRaw(arg1,arg2,arg3);
   37283           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37284             :     }
   37285           5 :     if ( bLocalUseExceptions ) {
   37286           4 :       popErrorHandler();
   37287             :     }
   37288             : #ifndef SED_HACKS
   37289             :     if ( bLocalUseExceptions ) {
   37290             :       CPLErr eclass = CPLGetLastErrorType();
   37291             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37292             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37293             :       }
   37294             :     }
   37295             : #endif
   37296             :   }
   37297           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37298           5 :   {
   37299             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   37300           5 :     if( viewIsValid2 ) {
   37301           5 :       PyBuffer_Release(&view2);
   37302             :     }
   37303           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   37304           0 :       delete[] arg3;
   37305             :     }
   37306             :   }
   37307           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; } }
   37308             :   return resultobj;
   37309           0 : fail:
   37310           0 :   {
   37311             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   37312           0 :     if( viewIsValid2 ) {
   37313           0 :       PyBuffer_Release(&view2);
   37314             :     }
   37315           5 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   37316             :       delete[] arg3;
   37317             :     }
   37318             :   }
   37319             :   return NULL;
   37320             : }
   37321             : 
   37322             : 
   37323         181 : SWIGINTERN PyObject *_wrap_Attribute_WriteString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37324         181 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37325         181 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37326         181 :   char *arg2 = (char *) 0 ;
   37327         181 :   void *argp1 = 0 ;
   37328         181 :   int res1 = 0 ;
   37329         181 :   int res2 ;
   37330         181 :   char *buf2 = 0 ;
   37331         181 :   int alloc2 = 0 ;
   37332         181 :   PyObject *swig_obj[2] ;
   37333         181 :   CPLErr result;
   37334             :   
   37335         181 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteString", 2, 2, swig_obj)) SWIG_fail;
   37336         181 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37337         181 :   if (!SWIG_IsOK(res1)) {
   37338           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37339             :   }
   37340         181 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37341         181 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37342         181 :   if (!SWIG_IsOK(res2)) {
   37343           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_WriteString" "', argument " "2"" of type '" "char const *""'");
   37344             :   }
   37345         181 :   arg2 = reinterpret_cast< char * >(buf2);
   37346         181 :   {
   37347         181 :     const int bLocalUseExceptions = GetUseExceptions();
   37348         181 :     if ( bLocalUseExceptions ) {
   37349         138 :       pushErrorHandler();
   37350             :     }
   37351         181 :     {
   37352         181 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37353         181 :       result = (CPLErr)GDALAttributeHS_WriteString(arg1,(char const *)arg2);
   37354         181 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37355             :     }
   37356         181 :     if ( bLocalUseExceptions ) {
   37357         138 :       popErrorHandler();
   37358             :     }
   37359             : #ifndef SED_HACKS
   37360             :     if ( bLocalUseExceptions ) {
   37361             :       CPLErr eclass = CPLGetLastErrorType();
   37362             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37363             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37364             :       }
   37365             :     }
   37366             : #endif
   37367             :   }
   37368         181 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37369         181 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37370         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; } }
   37371             :   return resultobj;
   37372           0 : fail:
   37373           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37374             :   return NULL;
   37375             : }
   37376             : 
   37377             : 
   37378           8 : SWIGINTERN PyObject *_wrap_Attribute_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37379           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37380           8 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37381           8 :   char **arg2 = (char **) 0 ;
   37382           8 :   void *argp1 = 0 ;
   37383           8 :   int res1 = 0 ;
   37384           8 :   PyObject *swig_obj[2] ;
   37385           8 :   CPLErr result;
   37386             :   
   37387           8 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteStringArray", 2, 2, swig_obj)) SWIG_fail;
   37388           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37389           8 :   if (!SWIG_IsOK(res1)) {
   37390           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37391             :   }
   37392           8 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37393           8 :   {
   37394             :     /* %typemap(in) char **dict */
   37395           8 :     arg2 = NULL;
   37396           8 :     if ( PySequence_Check( swig_obj[1] ) ) {
   37397           8 :       int bErr = FALSE;
   37398           8 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   37399           8 :       if ( bErr )
   37400             :       {
   37401           0 :         SWIG_fail;
   37402             :       }
   37403             :     }
   37404           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   37405           0 :       int bErr = FALSE;
   37406           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   37407           0 :       if ( bErr )
   37408             :       {
   37409           0 :         SWIG_fail;
   37410             :       }
   37411             :     }
   37412             :     else {
   37413           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   37414           0 :       SWIG_fail;
   37415             :     }
   37416             :   }
   37417           8 :   {
   37418           8 :     const int bLocalUseExceptions = GetUseExceptions();
   37419           8 :     if ( bLocalUseExceptions ) {
   37420           0 :       pushErrorHandler();
   37421             :     }
   37422           8 :     {
   37423           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37424           8 :       result = (CPLErr)GDALAttributeHS_WriteStringArray(arg1,arg2);
   37425           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37426             :     }
   37427           8 :     if ( bLocalUseExceptions ) {
   37428           0 :       popErrorHandler();
   37429             :     }
   37430             : #ifndef SED_HACKS
   37431             :     if ( bLocalUseExceptions ) {
   37432             :       CPLErr eclass = CPLGetLastErrorType();
   37433             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37434             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37435             :       }
   37436             :     }
   37437             : #endif
   37438             :   }
   37439           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37440           8 :   {
   37441             :     /* %typemap(freearg) char **dict */
   37442           8 :     CSLDestroy( arg2 );
   37443             :   }
   37444           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; } }
   37445             :   return resultobj;
   37446           0 : fail:
   37447           0 :   {
   37448             :     /* %typemap(freearg) char **dict */
   37449           0 :     CSLDestroy( arg2 );
   37450             :   }
   37451             :   return NULL;
   37452             : }
   37453             : 
   37454             : 
   37455          22 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37456          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37457          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37458          22 :   int arg2 ;
   37459          22 :   void *argp1 = 0 ;
   37460          22 :   int res1 = 0 ;
   37461          22 :   int val2 ;
   37462          22 :   int ecode2 = 0 ;
   37463          22 :   PyObject *swig_obj[2] ;
   37464          22 :   CPLErr result;
   37465             :   
   37466          22 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt", 2, 2, swig_obj)) SWIG_fail;
   37467          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37468          22 :   if (!SWIG_IsOK(res1)) {
   37469           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37470             :   }
   37471          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37472          22 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   37473          22 :   if (!SWIG_IsOK(ecode2)) {
   37474           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt" "', argument " "2"" of type '" "int""'");
   37475             :   } 
   37476          22 :   arg2 = static_cast< int >(val2);
   37477          22 :   {
   37478          22 :     const int bLocalUseExceptions = GetUseExceptions();
   37479          22 :     if ( bLocalUseExceptions ) {
   37480           4 :       pushErrorHandler();
   37481             :     }
   37482          22 :     {
   37483          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37484          22 :       result = (CPLErr)GDALAttributeHS_WriteInt(arg1,arg2);
   37485          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37486             :     }
   37487          22 :     if ( bLocalUseExceptions ) {
   37488           4 :       popErrorHandler();
   37489             :     }
   37490             : #ifndef SED_HACKS
   37491             :     if ( bLocalUseExceptions ) {
   37492             :       CPLErr eclass = CPLGetLastErrorType();
   37493             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37494             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37495             :       }
   37496             :     }
   37497             : #endif
   37498             :   }
   37499          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37500          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; } }
   37501             :   return resultobj;
   37502             : fail:
   37503             :   return NULL;
   37504             : }
   37505             : 
   37506             : 
   37507          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37508          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37509          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37510          11 :   long long arg2 ;
   37511          11 :   void *argp1 = 0 ;
   37512          11 :   int res1 = 0 ;
   37513          11 :   long long val2 ;
   37514          11 :   int ecode2 = 0 ;
   37515          11 :   PyObject *swig_obj[2] ;
   37516          11 :   CPLErr result;
   37517             :   
   37518          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64", 2, 2, swig_obj)) SWIG_fail;
   37519          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37520          11 :   if (!SWIG_IsOK(res1)) {
   37521           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37522             :   }
   37523          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37524          11 :   ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2);
   37525          11 :   if (!SWIG_IsOK(ecode2)) {
   37526           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt64" "', argument " "2"" of type '" "long long""'");
   37527             :   } 
   37528          11 :   arg2 = static_cast< long long >(val2);
   37529          11 :   {
   37530          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37531          11 :     if ( bLocalUseExceptions ) {
   37532           0 :       pushErrorHandler();
   37533             :     }
   37534          11 :     {
   37535          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37536          11 :       result = (CPLErr)GDALAttributeHS_WriteInt64(arg1,arg2);
   37537          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37538             :     }
   37539          11 :     if ( bLocalUseExceptions ) {
   37540           0 :       popErrorHandler();
   37541             :     }
   37542             : #ifndef SED_HACKS
   37543             :     if ( bLocalUseExceptions ) {
   37544             :       CPLErr eclass = CPLGetLastErrorType();
   37545             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37546             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37547             :       }
   37548             :     }
   37549             : #endif
   37550             :   }
   37551          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37552          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; } }
   37553             :   return resultobj;
   37554             : fail:
   37555             :   return NULL;
   37556             : }
   37557             : 
   37558             : 
   37559          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37560          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37561          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37562          11 :   double arg2 ;
   37563          11 :   void *argp1 = 0 ;
   37564          11 :   int res1 = 0 ;
   37565          11 :   double val2 ;
   37566          11 :   int ecode2 = 0 ;
   37567          11 :   PyObject *swig_obj[2] ;
   37568          11 :   CPLErr result;
   37569             :   
   37570          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDouble", 2, 2, swig_obj)) SWIG_fail;
   37571          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37572          11 :   if (!SWIG_IsOK(res1)) {
   37573           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37574             :   }
   37575          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37576          11 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   37577          11 :   if (!SWIG_IsOK(ecode2)) {
   37578           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteDouble" "', argument " "2"" of type '" "double""'");
   37579             :   } 
   37580          11 :   arg2 = static_cast< double >(val2);
   37581          11 :   {
   37582          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37583          11 :     if ( bLocalUseExceptions ) {
   37584           1 :       pushErrorHandler();
   37585             :     }
   37586          11 :     {
   37587          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37588          11 :       result = (CPLErr)GDALAttributeHS_WriteDouble(arg1,arg2);
   37589          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37590             :     }
   37591          11 :     if ( bLocalUseExceptions ) {
   37592           1 :       popErrorHandler();
   37593             :     }
   37594             : #ifndef SED_HACKS
   37595             :     if ( bLocalUseExceptions ) {
   37596             :       CPLErr eclass = CPLGetLastErrorType();
   37597             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37598             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37599             :       }
   37600             :     }
   37601             : #endif
   37602             :   }
   37603          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37604          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; } }
   37605             :   return resultobj;
   37606             : fail:
   37607             :   return NULL;
   37608             : }
   37609             : 
   37610             : 
   37611          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37612          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37613          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37614          11 :   int arg2 ;
   37615          11 :   int *arg3 = (int *) 0 ;
   37616          11 :   void *argp1 = 0 ;
   37617          11 :   int res1 = 0 ;
   37618          11 :   PyObject *swig_obj[2] ;
   37619          11 :   CPLErr result;
   37620             :   
   37621          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteIntArray", 2, 2, swig_obj)) SWIG_fail;
   37622          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37623          11 :   if (!SWIG_IsOK(res1)) {
   37624           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37625             :   }
   37626          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37627          11 :   {
   37628             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   37629          11 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   37630          11 :     if( arg2 < 0 ) {
   37631           0 :       SWIG_fail;
   37632             :     }
   37633             :   }
   37634          11 :   {
   37635          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37636          11 :     if ( bLocalUseExceptions ) {
   37637           3 :       pushErrorHandler();
   37638             :     }
   37639          11 :     {
   37640          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37641          11 :       result = (CPLErr)GDALAttributeHS_WriteIntArray(arg1,arg2,arg3);
   37642          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37643             :     }
   37644          11 :     if ( bLocalUseExceptions ) {
   37645           3 :       popErrorHandler();
   37646             :     }
   37647             : #ifndef SED_HACKS
   37648             :     if ( bLocalUseExceptions ) {
   37649             :       CPLErr eclass = CPLGetLastErrorType();
   37650             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37651             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37652             :       }
   37653             :     }
   37654             : #endif
   37655             :   }
   37656          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37657          11 :   {
   37658             :     /* %typemap(freearg) (int nList, int* pList) */
   37659          11 :     free(arg3);
   37660             :   }
   37661          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; } }
   37662             :   return resultobj;
   37663           0 : fail:
   37664           0 :   {
   37665             :     /* %typemap(freearg) (int nList, int* pList) */
   37666           0 :     free(arg3);
   37667             :   }
   37668           0 :   return NULL;
   37669             : }
   37670             : 
   37671             : 
   37672          10 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37673          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37674          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37675          10 :   int arg2 ;
   37676          10 :   long long *arg3 = (long long *) 0 ;
   37677          10 :   void *argp1 = 0 ;
   37678          10 :   int res1 = 0 ;
   37679          10 :   PyObject *swig_obj[2] ;
   37680          10 :   CPLErr result;
   37681             :   
   37682          10 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64Array", 2, 2, swig_obj)) SWIG_fail;
   37683          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37684          10 :   if (!SWIG_IsOK(res1)) {
   37685           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37686             :   }
   37687          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37688          10 :   {
   37689             :     /* %typemap(in,numinputs=1) (int nList, long long* pList)*/
   37690          10 :     arg3 = CreateCInt64ListFromSequence(swig_obj[1], &arg2);
   37691          10 :     if( arg2 < 0 ) {
   37692           0 :       SWIG_fail;
   37693             :     }
   37694             :   }
   37695          10 :   {
   37696          10 :     const int bLocalUseExceptions = GetUseExceptions();
   37697          10 :     if ( bLocalUseExceptions ) {
   37698           0 :       pushErrorHandler();
   37699             :     }
   37700          10 :     {
   37701          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37702          10 :       result = (CPLErr)GDALAttributeHS_WriteInt64Array(arg1,arg2,arg3);
   37703          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37704             :     }
   37705          10 :     if ( bLocalUseExceptions ) {
   37706           0 :       popErrorHandler();
   37707             :     }
   37708             : #ifndef SED_HACKS
   37709             :     if ( bLocalUseExceptions ) {
   37710             :       CPLErr eclass = CPLGetLastErrorType();
   37711             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37712             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37713             :       }
   37714             :     }
   37715             : #endif
   37716             :   }
   37717          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37718          10 :   {
   37719             :     /* %typemap(freearg) (int nList, long long* pList) */
   37720          10 :     free(arg3);
   37721             :   }
   37722          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; } }
   37723             :   return resultobj;
   37724           0 : fail:
   37725           0 :   {
   37726             :     /* %typemap(freearg) (int nList, long long* pList) */
   37727           0 :     free(arg3);
   37728             :   }
   37729           0 :   return NULL;
   37730             : }
   37731             : 
   37732             : 
   37733           7 : SWIGINTERN PyObject *_wrap_Attribute_WriteDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37734           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37735           7 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37736           7 :   int arg2 ;
   37737           7 :   double *arg3 = (double *) 0 ;
   37738           7 :   void *argp1 = 0 ;
   37739           7 :   int res1 = 0 ;
   37740           7 :   PyObject *swig_obj[2] ;
   37741           7 :   CPLErr result;
   37742             :   
   37743           7 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDoubleArray", 2, 2, swig_obj)) SWIG_fail;
   37744           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37745           7 :   if (!SWIG_IsOK(res1)) {
   37746           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37747             :   }
   37748           7 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37749           7 :   {
   37750             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   37751           7 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   37752           7 :     if( arg2 < 0 ) {
   37753           0 :       SWIG_fail;
   37754             :     }
   37755             :   }
   37756           7 :   {
   37757           7 :     const int bLocalUseExceptions = GetUseExceptions();
   37758           7 :     if ( bLocalUseExceptions ) {
   37759           0 :       pushErrorHandler();
   37760             :     }
   37761           7 :     {
   37762           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37763           7 :       result = (CPLErr)GDALAttributeHS_WriteDoubleArray(arg1,arg2,arg3);
   37764           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37765             :     }
   37766           7 :     if ( bLocalUseExceptions ) {
   37767           0 :       popErrorHandler();
   37768             :     }
   37769             : #ifndef SED_HACKS
   37770             :     if ( bLocalUseExceptions ) {
   37771             :       CPLErr eclass = CPLGetLastErrorType();
   37772             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37773             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37774             :       }
   37775             :     }
   37776             : #endif
   37777             :   }
   37778           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37779           7 :   {
   37780             :     /* %typemap(freearg) (int nList, double* pList) */
   37781           7 :     free(arg3);
   37782             :   }
   37783           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; } }
   37784             :   return resultobj;
   37785           0 : fail:
   37786           0 :   {
   37787             :     /* %typemap(freearg) (int nList, double* pList) */
   37788           0 :     free(arg3);
   37789             :   }
   37790           0 :   return NULL;
   37791             : }
   37792             : 
   37793             : 
   37794          27 : SWIGINTERN PyObject *_wrap_Attribute_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37795          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37796          27 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37797          27 :   char *arg2 = (char *) 0 ;
   37798          27 :   void *argp1 = 0 ;
   37799          27 :   int res1 = 0 ;
   37800          27 :   int res2 ;
   37801          27 :   char *buf2 = 0 ;
   37802          27 :   int alloc2 = 0 ;
   37803          27 :   PyObject *swig_obj[2] ;
   37804          27 :   CPLErr result;
   37805             :   
   37806          27 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_Rename", 2, 2, swig_obj)) SWIG_fail;
   37807          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37808          27 :   if (!SWIG_IsOK(res1)) {
   37809           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_Rename" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37810             :   }
   37811          27 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37812          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37813          27 :   if (!SWIG_IsOK(res2)) {
   37814           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_Rename" "', argument " "2"" of type '" "char const *""'");
   37815             :   }
   37816          27 :   arg2 = reinterpret_cast< char * >(buf2);
   37817          27 :   {
   37818          27 :     const int bLocalUseExceptions = GetUseExceptions();
   37819          27 :     if ( bLocalUseExceptions ) {
   37820          27 :       pushErrorHandler();
   37821             :     }
   37822          27 :     {
   37823          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37824          27 :       result = (CPLErr)GDALAttributeHS_Rename(arg1,(char const *)arg2);
   37825          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37826             :     }
   37827          27 :     if ( bLocalUseExceptions ) {
   37828          27 :       popErrorHandler();
   37829             :     }
   37830             : #ifndef SED_HACKS
   37831             :     if ( bLocalUseExceptions ) {
   37832             :       CPLErr eclass = CPLGetLastErrorType();
   37833             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37834             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37835             :       }
   37836             :     }
   37837             : #endif
   37838             :   }
   37839          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37840          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37841          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; } }
   37842             :   return resultobj;
   37843           0 : fail:
   37844           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37845             :   return NULL;
   37846             : }
   37847             : 
   37848             : 
   37849         277 : SWIGINTERN PyObject *Attribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37850         277 :   PyObject *obj;
   37851         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   37852         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAttributeHS, SWIG_NewClientData(obj));
   37853         277 :   return SWIG_Py_Void();
   37854             : }
   37855             : 
   37856        4995 : SWIGINTERN PyObject *_wrap_delete_Dimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37857        4995 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37858        4995 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37859        4995 :   void *argp1 = 0 ;
   37860        4995 :   int res1 = 0 ;
   37861        4995 :   PyObject *swig_obj[1] ;
   37862             :   
   37863        4995 :   if (!args) SWIG_fail;
   37864        4995 :   swig_obj[0] = args;
   37865        4995 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_DISOWN |  0 );
   37866        4995 :   if (!SWIG_IsOK(res1)) {
   37867           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dimension" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37868             :   }
   37869        4995 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37870        4995 :   {
   37871        4995 :     const int bLocalUseExceptions = GetUseExceptions();
   37872        4995 :     if ( bLocalUseExceptions ) {
   37873         751 :       pushErrorHandler();
   37874             :     }
   37875        4995 :     {
   37876        4995 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37877        4995 :       delete_GDALDimensionHS(arg1);
   37878        4995 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37879             :     }
   37880        4995 :     if ( bLocalUseExceptions ) {
   37881         751 :       popErrorHandler();
   37882             :     }
   37883             : #ifndef SED_HACKS
   37884             :     if ( bLocalUseExceptions ) {
   37885             :       CPLErr eclass = CPLGetLastErrorType();
   37886             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37887             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37888             :       }
   37889             :     }
   37890             : #endif
   37891             :   }
   37892        4995 :   resultobj = SWIG_Py_Void();
   37893        4995 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37894             :   return resultobj;
   37895             : fail:
   37896             :   return NULL;
   37897             : }
   37898             : 
   37899             : 
   37900         279 : SWIGINTERN PyObject *_wrap_Dimension_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37901         279 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37902         279 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37903         279 :   void *argp1 = 0 ;
   37904         279 :   int res1 = 0 ;
   37905         279 :   PyObject *swig_obj[1] ;
   37906         279 :   char *result = 0 ;
   37907             :   
   37908         279 :   if (!args) SWIG_fail;
   37909         279 :   swig_obj[0] = args;
   37910         279 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37911         279 :   if (!SWIG_IsOK(res1)) {
   37912           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37913             :   }
   37914         279 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37915         279 :   {
   37916         279 :     const int bLocalUseExceptions = GetUseExceptions();
   37917         279 :     if ( bLocalUseExceptions ) {
   37918         134 :       pushErrorHandler();
   37919             :     }
   37920         279 :     {
   37921         279 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37922         279 :       result = (char *)GDALDimensionHS_GetName(arg1);
   37923         279 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37924             :     }
   37925         279 :     if ( bLocalUseExceptions ) {
   37926         134 :       popErrorHandler();
   37927             :     }
   37928             : #ifndef SED_HACKS
   37929             :     if ( bLocalUseExceptions ) {
   37930             :       CPLErr eclass = CPLGetLastErrorType();
   37931             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37932             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37933             :       }
   37934             :     }
   37935             : #endif
   37936             :   }
   37937         279 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37938         279 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37939             :   return resultobj;
   37940             : fail:
   37941             :   return NULL;
   37942             : }
   37943             : 
   37944             : 
   37945          82 : SWIGINTERN PyObject *_wrap_Dimension_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37946          82 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37947          82 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37948          82 :   void *argp1 = 0 ;
   37949          82 :   int res1 = 0 ;
   37950          82 :   PyObject *swig_obj[1] ;
   37951          82 :   char *result = 0 ;
   37952             :   
   37953          82 :   if (!args) SWIG_fail;
   37954          82 :   swig_obj[0] = args;
   37955          82 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37956          82 :   if (!SWIG_IsOK(res1)) {
   37957           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetFullName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37958             :   }
   37959          82 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37960          82 :   {
   37961          82 :     const int bLocalUseExceptions = GetUseExceptions();
   37962          82 :     if ( bLocalUseExceptions ) {
   37963          51 :       pushErrorHandler();
   37964             :     }
   37965          82 :     {
   37966          82 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37967          82 :       result = (char *)GDALDimensionHS_GetFullName(arg1);
   37968          82 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37969             :     }
   37970          82 :     if ( bLocalUseExceptions ) {
   37971          51 :       popErrorHandler();
   37972             :     }
   37973             : #ifndef SED_HACKS
   37974             :     if ( bLocalUseExceptions ) {
   37975             :       CPLErr eclass = CPLGetLastErrorType();
   37976             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37977             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37978             :       }
   37979             :     }
   37980             : #endif
   37981             :   }
   37982          82 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37983          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; } }
   37984             :   return resultobj;
   37985             : fail:
   37986             :   return NULL;
   37987             : }
   37988             : 
   37989             : 
   37990          54 : SWIGINTERN PyObject *_wrap_Dimension_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37991          54 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37992          54 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37993          54 :   void *argp1 = 0 ;
   37994          54 :   int res1 = 0 ;
   37995          54 :   PyObject *swig_obj[1] ;
   37996          54 :   char *result = 0 ;
   37997             :   
   37998          54 :   if (!args) SWIG_fail;
   37999          54 :   swig_obj[0] = args;
   38000          54 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38001          54 :   if (!SWIG_IsOK(res1)) {
   38002           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetType" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38003             :   }
   38004          54 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38005          54 :   {
   38006          54 :     const int bLocalUseExceptions = GetUseExceptions();
   38007          54 :     if ( bLocalUseExceptions ) {
   38008           8 :       pushErrorHandler();
   38009             :     }
   38010          54 :     {
   38011          54 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38012          54 :       result = (char *)GDALDimensionHS_GetType(arg1);
   38013          54 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38014             :     }
   38015          54 :     if ( bLocalUseExceptions ) {
   38016           8 :       popErrorHandler();
   38017             :     }
   38018             : #ifndef SED_HACKS
   38019             :     if ( bLocalUseExceptions ) {
   38020             :       CPLErr eclass = CPLGetLastErrorType();
   38021             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38022             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38023             :       }
   38024             :     }
   38025             : #endif
   38026             :   }
   38027          54 :   resultobj = SWIG_FromCharPtr((const char *)result);
   38028          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; } }
   38029             :   return resultobj;
   38030             : fail:
   38031             :   return NULL;
   38032             : }
   38033             : 
   38034             : 
   38035          22 : SWIGINTERN PyObject *_wrap_Dimension_GetDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38036          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38037          22 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38038          22 :   void *argp1 = 0 ;
   38039          22 :   int res1 = 0 ;
   38040          22 :   PyObject *swig_obj[1] ;
   38041          22 :   char *result = 0 ;
   38042             :   
   38043          22 :   if (!args) SWIG_fail;
   38044          22 :   swig_obj[0] = args;
   38045          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38046          22 :   if (!SWIG_IsOK(res1)) {
   38047           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetDirection" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38048             :   }
   38049          22 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38050          22 :   {
   38051          22 :     const int bLocalUseExceptions = GetUseExceptions();
   38052          22 :     if ( bLocalUseExceptions ) {
   38053           2 :       pushErrorHandler();
   38054             :     }
   38055          22 :     {
   38056          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38057          22 :       result = (char *)GDALDimensionHS_GetDirection(arg1);
   38058          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38059             :     }
   38060          22 :     if ( bLocalUseExceptions ) {
   38061           2 :       popErrorHandler();
   38062             :     }
   38063             : #ifndef SED_HACKS
   38064             :     if ( bLocalUseExceptions ) {
   38065             :       CPLErr eclass = CPLGetLastErrorType();
   38066             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38067             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38068             :       }
   38069             :     }
   38070             : #endif
   38071             :   }
   38072          22 :   resultobj = SWIG_FromCharPtr((const char *)result);
   38073          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; } }
   38074             :   return resultobj;
   38075             : fail:
   38076             :   return NULL;
   38077             : }
   38078             : 
   38079             : 
   38080        3725 : SWIGINTERN PyObject *_wrap_Dimension_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38081        3725 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38082        3725 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38083        3725 :   void *argp1 = 0 ;
   38084        3725 :   int res1 = 0 ;
   38085        3725 :   PyObject *swig_obj[1] ;
   38086        3725 :   GUIntBig result;
   38087             :   
   38088        3725 :   if (!args) SWIG_fail;
   38089        3725 :   swig_obj[0] = args;
   38090        3725 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38091        3725 :   if (!SWIG_IsOK(res1)) {
   38092           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetSize" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38093             :   }
   38094        3725 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38095        3725 :   {
   38096        3725 :     const int bLocalUseExceptions = GetUseExceptions();
   38097        3725 :     if ( bLocalUseExceptions ) {
   38098         500 :       pushErrorHandler();
   38099             :     }
   38100        3725 :     {
   38101        3725 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38102        3725 :       result = GDALDimensionHS_GetSize(arg1);
   38103        3725 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38104             :     }
   38105        3725 :     if ( bLocalUseExceptions ) {
   38106         500 :       popErrorHandler();
   38107             :     }
   38108             : #ifndef SED_HACKS
   38109             :     if ( bLocalUseExceptions ) {
   38110             :       CPLErr eclass = CPLGetLastErrorType();
   38111             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38112             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38113             :       }
   38114             :     }
   38115             : #endif
   38116             :   }
   38117        3725 :   {
   38118        3725 :     resultobj = PyLong_FromUnsignedLongLong(result);
   38119             :   }
   38120        3725 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38121             :   return resultobj;
   38122             : fail:
   38123             :   return NULL;
   38124             : }
   38125             : 
   38126             : 
   38127         133 : SWIGINTERN PyObject *_wrap_Dimension_GetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38128         133 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38129         133 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38130         133 :   void *argp1 = 0 ;
   38131         133 :   int res1 = 0 ;
   38132         133 :   PyObject *swig_obj[1] ;
   38133         133 :   GDALMDArrayHS *result = 0 ;
   38134             :   
   38135         133 :   if (!args) SWIG_fail;
   38136         133 :   swig_obj[0] = args;
   38137         133 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38138         133 :   if (!SWIG_IsOK(res1)) {
   38139           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38140             :   }
   38141         133 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38142         133 :   {
   38143         133 :     const int bLocalUseExceptions = GetUseExceptions();
   38144         133 :     if ( bLocalUseExceptions ) {
   38145          49 :       pushErrorHandler();
   38146             :     }
   38147         133 :     {
   38148         133 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38149         133 :       result = (GDALMDArrayHS *)GDALDimensionHS_GetIndexingVariable(arg1);
   38150         133 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38151             :     }
   38152         133 :     if ( bLocalUseExceptions ) {
   38153          49 :       popErrorHandler();
   38154             :     }
   38155             : #ifndef SED_HACKS
   38156             :     if ( bLocalUseExceptions ) {
   38157             :       CPLErr eclass = CPLGetLastErrorType();
   38158             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38159             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38160             :       }
   38161             :     }
   38162             : #endif
   38163             :   }
   38164         133 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   38165         133 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38166             :   return resultobj;
   38167             : fail:
   38168             :   return NULL;
   38169             : }
   38170             : 
   38171             : 
   38172          23 : SWIGINTERN PyObject *_wrap_Dimension_SetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38173          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38174          23 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38175          23 :   GDALMDArrayHS *arg2 = (GDALMDArrayHS *) 0 ;
   38176          23 :   void *argp1 = 0 ;
   38177          23 :   int res1 = 0 ;
   38178          23 :   void *argp2 = 0 ;
   38179          23 :   int res2 = 0 ;
   38180          23 :   PyObject *swig_obj[2] ;
   38181          23 :   bool result;
   38182             :   
   38183          23 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_SetIndexingVariable", 2, 2, swig_obj)) SWIG_fail;
   38184          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38185          23 :   if (!SWIG_IsOK(res1)) {
   38186           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_SetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38187             :   }
   38188          23 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38189          23 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   38190          23 :   if (!SWIG_IsOK(res2)) {
   38191           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_SetIndexingVariable" "', argument " "2"" of type '" "GDALMDArrayHS *""'"); 
   38192             :   }
   38193          23 :   arg2 = reinterpret_cast< GDALMDArrayHS * >(argp2);
   38194          23 :   {
   38195          23 :     const int bLocalUseExceptions = GetUseExceptions();
   38196          23 :     if ( bLocalUseExceptions ) {
   38197           9 :       pushErrorHandler();
   38198             :     }
   38199          23 :     {
   38200          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38201          23 :       result = (bool)GDALDimensionHS_SetIndexingVariable(arg1,arg2);
   38202          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38203             :     }
   38204          23 :     if ( bLocalUseExceptions ) {
   38205           9 :       popErrorHandler();
   38206             :     }
   38207             : #ifndef SED_HACKS
   38208             :     if ( bLocalUseExceptions ) {
   38209             :       CPLErr eclass = CPLGetLastErrorType();
   38210             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38211             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38212             :       }
   38213             :     }
   38214             : #endif
   38215             :   }
   38216          23 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38217          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; } }
   38218             :   return resultobj;
   38219             : fail:
   38220             :   return NULL;
   38221             : }
   38222             : 
   38223             : 
   38224          31 : SWIGINTERN PyObject *_wrap_Dimension_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38225          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38226          31 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38227          31 :   char *arg2 = (char *) 0 ;
   38228          31 :   void *argp1 = 0 ;
   38229          31 :   int res1 = 0 ;
   38230          31 :   int res2 ;
   38231          31 :   char *buf2 = 0 ;
   38232          31 :   int alloc2 = 0 ;
   38233          31 :   PyObject *swig_obj[2] ;
   38234          31 :   CPLErr result;
   38235             :   
   38236          31 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_Rename", 2, 2, swig_obj)) SWIG_fail;
   38237          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38238          31 :   if (!SWIG_IsOK(res1)) {
   38239           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_Rename" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38240             :   }
   38241          31 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38242          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   38243          31 :   if (!SWIG_IsOK(res2)) {
   38244           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_Rename" "', argument " "2"" of type '" "char const *""'");
   38245             :   }
   38246          31 :   arg2 = reinterpret_cast< char * >(buf2);
   38247          31 :   {
   38248          31 :     const int bLocalUseExceptions = GetUseExceptions();
   38249          31 :     if ( bLocalUseExceptions ) {
   38250          31 :       pushErrorHandler();
   38251             :     }
   38252          31 :     {
   38253          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38254          31 :       result = (CPLErr)GDALDimensionHS_Rename(arg1,(char const *)arg2);
   38255          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38256             :     }
   38257          31 :     if ( bLocalUseExceptions ) {
   38258          31 :       popErrorHandler();
   38259             :     }
   38260             : #ifndef SED_HACKS
   38261             :     if ( bLocalUseExceptions ) {
   38262             :       CPLErr eclass = CPLGetLastErrorType();
   38263             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38264             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38265             :       }
   38266             :     }
   38267             : #endif
   38268             :   }
   38269          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38270          31 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   38271          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; } }
   38272             :   return resultobj;
   38273           0 : fail:
   38274           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   38275             :   return NULL;
   38276             : }
   38277             : 
   38278             : 
   38279         277 : SWIGINTERN PyObject *Dimension_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38280         277 :   PyObject *obj;
   38281         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   38282         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDimensionHS, SWIG_NewClientData(obj));
   38283         277 :   return SWIG_Py_Void();
   38284             : }
   38285             : 
   38286        4628 : SWIGINTERN PyObject *_wrap_delete_ExtendedDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38287        4628 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38288        4628 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38289        4628 :   void *argp1 = 0 ;
   38290        4628 :   int res1 = 0 ;
   38291        4628 :   PyObject *swig_obj[1] ;
   38292             :   
   38293        4628 :   if (!args) SWIG_fail;
   38294        4628 :   swig_obj[0] = args;
   38295        4628 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_DISOWN |  0 );
   38296        4628 :   if (!SWIG_IsOK(res1)) {
   38297           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExtendedDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38298             :   }
   38299        4628 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38300        4628 :   {
   38301        4628 :     const int bLocalUseExceptions = GetUseExceptions();
   38302        4628 :     if ( bLocalUseExceptions ) {
   38303        1132 :       pushErrorHandler();
   38304             :     }
   38305        4628 :     {
   38306        4628 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38307        4628 :       delete_GDALExtendedDataTypeHS(arg1);
   38308        4628 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38309             :     }
   38310        4628 :     if ( bLocalUseExceptions ) {
   38311        1132 :       popErrorHandler();
   38312             :     }
   38313             : #ifndef SED_HACKS
   38314             :     if ( bLocalUseExceptions ) {
   38315             :       CPLErr eclass = CPLGetLastErrorType();
   38316             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38317             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38318             :       }
   38319             :     }
   38320             : #endif
   38321             :   }
   38322        4628 :   resultobj = SWIG_Py_Void();
   38323        4628 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38324             :   return resultobj;
   38325             : fail:
   38326             :   return NULL;
   38327             : }
   38328             : 
   38329             : 
   38330        1972 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38331        1972 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38332        1972 :   GDALDataType arg1 ;
   38333        1972 :   PyObject *swig_obj[1] ;
   38334        1972 :   GDALExtendedDataTypeHS *result = 0 ;
   38335             :   
   38336        1972 :   if (!args) SWIG_fail;
   38337        1972 :   swig_obj[0] = args;
   38338        1972 :   {
   38339             :     // %typemap(in) GDALDataType
   38340        1972 :     int val = 0;
   38341        1972 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   38342        1972 :     if (!SWIG_IsOK(ecode)) {
   38343           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   38344             :     }
   38345        1972 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   38346             :     {
   38347           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   38348             :     }
   38349        1972 :     arg1 = static_cast<GDALDataType>(val);
   38350             :   }
   38351        1972 :   {
   38352        1972 :     const int bLocalUseExceptions = GetUseExceptions();
   38353        1972 :     if ( bLocalUseExceptions ) {
   38354         393 :       pushErrorHandler();
   38355             :     }
   38356        1972 :     {
   38357        1972 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38358        1972 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_Create(arg1);
   38359        1972 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38360             :     }
   38361        1972 :     if ( bLocalUseExceptions ) {
   38362         393 :       popErrorHandler();
   38363             :     }
   38364             : #ifndef SED_HACKS
   38365             :     if ( bLocalUseExceptions ) {
   38366             :       CPLErr eclass = CPLGetLastErrorType();
   38367             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38368             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38369             :       }
   38370             :     }
   38371             : #endif
   38372             :   }
   38373        1972 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38374        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; } }
   38375             :   return resultobj;
   38376             : fail:
   38377             :   return NULL;
   38378             : }
   38379             : 
   38380             : 
   38381         195 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38382         195 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38383         195 :   size_t arg1 = (size_t) 0 ;
   38384         195 :   GDALExtendedDataTypeSubType arg2 = (GDALExtendedDataTypeSubType) GEDTST_NONE ;
   38385         195 :   size_t val1 ;
   38386         195 :   int ecode1 = 0 ;
   38387         195 :   int val2 ;
   38388         195 :   int ecode2 = 0 ;
   38389         195 :   PyObject *swig_obj[2] ;
   38390         195 :   GDALExtendedDataTypeHS *result = 0 ;
   38391             :   
   38392         195 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateString", 0, 2, swig_obj)) SWIG_fail;
   38393         195 :   if (swig_obj[0]) {
   38394          11 :     ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1);
   38395          11 :     if (!SWIG_IsOK(ecode1)) {
   38396           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ExtendedDataType_CreateString" "', argument " "1"" of type '" "size_t""'");
   38397             :     } 
   38398             :     arg1 = static_cast< size_t >(val1);
   38399             :   }
   38400         195 :   if (swig_obj[1]) {
   38401           4 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   38402           4 :     if (!SWIG_IsOK(ecode2)) {
   38403           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateString" "', argument " "2"" of type '" "GDALExtendedDataTypeSubType""'");
   38404             :     } 
   38405           4 :     arg2 = static_cast< GDALExtendedDataTypeSubType >(val2);
   38406             :   }
   38407         195 :   {
   38408         195 :     const int bLocalUseExceptions = GetUseExceptions();
   38409         195 :     if ( bLocalUseExceptions ) {
   38410         120 :       pushErrorHandler();
   38411             :     }
   38412         195 :     {
   38413         195 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38414         195 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateString(arg1,arg2);
   38415         195 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38416             :     }
   38417         195 :     if ( bLocalUseExceptions ) {
   38418         120 :       popErrorHandler();
   38419             :     }
   38420             : #ifndef SED_HACKS
   38421             :     if ( bLocalUseExceptions ) {
   38422             :       CPLErr eclass = CPLGetLastErrorType();
   38423             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38424             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38425             :       }
   38426             :     }
   38427             : #endif
   38428             :   }
   38429         195 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38430         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; } }
   38431             :   return resultobj;
   38432             : fail:
   38433             :   return NULL;
   38434             : }
   38435             : 
   38436             : 
   38437          22 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38438          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38439          22 :   char *arg1 = (char *) 0 ;
   38440          22 :   size_t arg2 ;
   38441          22 :   int arg3 ;
   38442          22 :   GDALEDTComponentHS **arg4 = (GDALEDTComponentHS **) 0 ;
   38443          22 :   int res1 ;
   38444          22 :   char *buf1 = 0 ;
   38445          22 :   int alloc1 = 0 ;
   38446          22 :   size_t val2 ;
   38447          22 :   int ecode2 = 0 ;
   38448          22 :   PyObject *swig_obj[3] ;
   38449          22 :   GDALExtendedDataTypeHS *result = 0 ;
   38450             :   
   38451          22 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateCompound", 3, 3, swig_obj)) SWIG_fail;
   38452          22 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   38453          22 :   if (!SWIG_IsOK(res1)) {
   38454           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CreateCompound" "', argument " "1"" of type '" "char const *""'");
   38455             :   }
   38456          22 :   arg1 = reinterpret_cast< char * >(buf1);
   38457          22 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   38458          22 :   if (!SWIG_IsOK(ecode2)) {
   38459           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateCompound" "', argument " "2"" of type '" "size_t""'");
   38460             :   } 
   38461          22 :   arg2 = static_cast< size_t >(val2);
   38462          22 :   {
   38463             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALEDTComponentHS *optional_##GDALEDTComponentHS)*/
   38464          22 :     if ( !PySequence_Check(swig_obj[2]) ) {
   38465           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   38466           0 :       SWIG_fail;
   38467             :     }
   38468          22 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   38469          22 :     if( size > (Py_ssize_t)INT_MAX ) {
   38470           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38471           0 :       SWIG_fail;
   38472             :     }
   38473          22 :     if( (size_t)size > SIZE_MAX / sizeof(GDALEDTComponentHS*) ) {
   38474           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38475           0 :       SWIG_fail;
   38476             :     }
   38477          22 :     arg3 = (int)size;
   38478          22 :     arg4 = (GDALEDTComponentHS**) VSIMalloc(arg3*sizeof(GDALEDTComponentHS*));
   38479          22 :     if( !arg4) {
   38480           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   38481           0 :       SWIG_fail;
   38482             :     }
   38483             :     
   38484          54 :     for( int i = 0; i<arg3; i++ ) {
   38485          32 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   38486          32 :       GDALEDTComponentHS* rawobjectpointer = NULL;
   38487          32 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_EXCEPTION | 0 ));
   38488          32 :       if (!rawobjectpointer) {
   38489           0 :         Py_DECREF(o);
   38490           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALEDTComponentHS");
   38491           0 :         SWIG_fail;
   38492             :       }
   38493          32 :       arg4[i] = rawobjectpointer;
   38494          32 :       Py_DECREF(o);
   38495             :       
   38496             :     }
   38497             :   }
   38498          22 :   {
   38499          22 :     if (!arg1) {
   38500           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38501             :     }
   38502             :   }
   38503          22 :   {
   38504          22 :     const int bLocalUseExceptions = GetUseExceptions();
   38505          22 :     if ( bLocalUseExceptions ) {
   38506           6 :       pushErrorHandler();
   38507             :     }
   38508          22 :     {
   38509          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38510          22 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateCompound((char const *)arg1,arg2,arg3,arg4);
   38511          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38512             :     }
   38513          22 :     if ( bLocalUseExceptions ) {
   38514           6 :       popErrorHandler();
   38515             :     }
   38516             : #ifndef SED_HACKS
   38517             :     if ( bLocalUseExceptions ) {
   38518             :       CPLErr eclass = CPLGetLastErrorType();
   38519             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38520             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38521             :       }
   38522             :     }
   38523             : #endif
   38524             :   }
   38525          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38526          22 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38527          22 :   {
   38528             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38529          22 :     CPLFree( arg4 );
   38530             :   }
   38531          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; } }
   38532             :   return resultobj;
   38533           0 : fail:
   38534           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38535           0 :   {
   38536             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38537           0 :     CPLFree( arg4 );
   38538             :   }
   38539             :   return NULL;
   38540             : }
   38541             : 
   38542             : 
   38543           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38544           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38545           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38546           8 :   void *argp1 = 0 ;
   38547           8 :   int res1 = 0 ;
   38548           8 :   PyObject *swig_obj[1] ;
   38549           8 :   char *result = 0 ;
   38550             :   
   38551           8 :   if (!args) SWIG_fail;
   38552           8 :   swig_obj[0] = args;
   38553           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38554           8 :   if (!SWIG_IsOK(res1)) {
   38555           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetName" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38556             :   }
   38557           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38558           8 :   {
   38559           8 :     const int bLocalUseExceptions = GetUseExceptions();
   38560           8 :     if ( bLocalUseExceptions ) {
   38561           2 :       pushErrorHandler();
   38562             :     }
   38563           8 :     {
   38564           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38565           8 :       result = (char *)GDALExtendedDataTypeHS_GetName(arg1);
   38566           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38567             :     }
   38568           8 :     if ( bLocalUseExceptions ) {
   38569           2 :       popErrorHandler();
   38570             :     }
   38571             : #ifndef SED_HACKS
   38572             :     if ( bLocalUseExceptions ) {
   38573             :       CPLErr eclass = CPLGetLastErrorType();
   38574             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38575             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38576             :       }
   38577             :     }
   38578             : #endif
   38579             :   }
   38580           8 :   resultobj = SWIG_FromCharPtr((const char *)result);
   38581           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; } }
   38582             :   return resultobj;
   38583             : fail:
   38584             :   return NULL;
   38585             : }
   38586             : 
   38587             : 
   38588        2935 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetClass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38589        2935 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38590        2935 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38591        2935 :   void *argp1 = 0 ;
   38592        2935 :   int res1 = 0 ;
   38593        2935 :   PyObject *swig_obj[1] ;
   38594        2935 :   GDALExtendedDataTypeClass result;
   38595             :   
   38596        2935 :   if (!args) SWIG_fail;
   38597        2935 :   swig_obj[0] = args;
   38598        2935 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38599        2935 :   if (!SWIG_IsOK(res1)) {
   38600           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetClass" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38601             :   }
   38602        2935 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38603        2935 :   {
   38604        2935 :     const int bLocalUseExceptions = GetUseExceptions();
   38605        2935 :     if ( bLocalUseExceptions ) {
   38606         638 :       pushErrorHandler();
   38607             :     }
   38608        2935 :     {
   38609        2935 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38610        2935 :       result = (GDALExtendedDataTypeClass)GDALExtendedDataTypeHS_GetClass(arg1);
   38611        2935 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38612             :     }
   38613        2935 :     if ( bLocalUseExceptions ) {
   38614         638 :       popErrorHandler();
   38615             :     }
   38616             : #ifndef SED_HACKS
   38617             :     if ( bLocalUseExceptions ) {
   38618             :       CPLErr eclass = CPLGetLastErrorType();
   38619             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38620             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38621             :       }
   38622             :     }
   38623             : #endif
   38624             :   }
   38625        2935 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38626        2935 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38627             :   return resultobj;
   38628             : fail:
   38629             :   return NULL;
   38630             : }
   38631             : 
   38632             : 
   38633        2100 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetNumericDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38634        2100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38635        2100 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38636        2100 :   void *argp1 = 0 ;
   38637        2100 :   int res1 = 0 ;
   38638        2100 :   PyObject *swig_obj[1] ;
   38639        2100 :   GDALDataType result;
   38640             :   
   38641        2100 :   if (!args) SWIG_fail;
   38642        2100 :   swig_obj[0] = args;
   38643        2100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38644        2100 :   if (!SWIG_IsOK(res1)) {
   38645           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetNumericDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38646             :   }
   38647        2100 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38648        2100 :   {
   38649        2100 :     const int bLocalUseExceptions = GetUseExceptions();
   38650        2100 :     if ( bLocalUseExceptions ) {
   38651         429 :       pushErrorHandler();
   38652             :     }
   38653        2100 :     {
   38654        2100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38655        2100 :       result = (GDALDataType)GDALExtendedDataTypeHS_GetNumericDataType(arg1);
   38656        2100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38657             :     }
   38658        2100 :     if ( bLocalUseExceptions ) {
   38659         429 :       popErrorHandler();
   38660             :     }
   38661             : #ifndef SED_HACKS
   38662             :     if ( bLocalUseExceptions ) {
   38663             :       CPLErr eclass = CPLGetLastErrorType();
   38664             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38665             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38666             :       }
   38667             :     }
   38668             : #endif
   38669             :   }
   38670        2100 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38671        2100 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38672             :   return resultobj;
   38673             : fail:
   38674             :   return NULL;
   38675             : }
   38676             : 
   38677             : 
   38678          51 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38679          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38680          51 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38681          51 :   void *argp1 = 0 ;
   38682          51 :   int res1 = 0 ;
   38683          51 :   PyObject *swig_obj[1] ;
   38684          51 :   size_t result;
   38685             :   
   38686          51 :   if (!args) SWIG_fail;
   38687          51 :   swig_obj[0] = args;
   38688          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38689          51 :   if (!SWIG_IsOK(res1)) {
   38690           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSize" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38691             :   }
   38692          51 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38693          51 :   {
   38694          51 :     const int bLocalUseExceptions = GetUseExceptions();
   38695          51 :     if ( bLocalUseExceptions ) {
   38696          34 :       pushErrorHandler();
   38697             :     }
   38698          51 :     {
   38699          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38700          51 :       result = GDALExtendedDataTypeHS_GetSize(arg1);
   38701          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38702             :     }
   38703          51 :     if ( bLocalUseExceptions ) {
   38704          34 :       popErrorHandler();
   38705             :     }
   38706             : #ifndef SED_HACKS
   38707             :     if ( bLocalUseExceptions ) {
   38708             :       CPLErr eclass = CPLGetLastErrorType();
   38709             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38710             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38711             :       }
   38712             :     }
   38713             : #endif
   38714             :   }
   38715          51 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38716          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; } }
   38717             :   return resultobj;
   38718             : fail:
   38719             :   return NULL;
   38720             : }
   38721             : 
   38722             : 
   38723           3 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetMaxStringLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38724           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38725           3 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38726           3 :   void *argp1 = 0 ;
   38727           3 :   int res1 = 0 ;
   38728           3 :   PyObject *swig_obj[1] ;
   38729           3 :   size_t result;
   38730             :   
   38731           3 :   if (!args) SWIG_fail;
   38732           3 :   swig_obj[0] = args;
   38733           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38734           3 :   if (!SWIG_IsOK(res1)) {
   38735           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetMaxStringLength" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38736             :   }
   38737           3 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38738           3 :   {
   38739           3 :     const int bLocalUseExceptions = GetUseExceptions();
   38740           3 :     if ( bLocalUseExceptions ) {
   38741           0 :       pushErrorHandler();
   38742             :     }
   38743           3 :     {
   38744           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38745           3 :       result = GDALExtendedDataTypeHS_GetMaxStringLength(arg1);
   38746           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38747             :     }
   38748           3 :     if ( bLocalUseExceptions ) {
   38749           0 :       popErrorHandler();
   38750             :     }
   38751             : #ifndef SED_HACKS
   38752             :     if ( bLocalUseExceptions ) {
   38753             :       CPLErr eclass = CPLGetLastErrorType();
   38754             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38755             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38756             :       }
   38757             :     }
   38758             : #endif
   38759             :   }
   38760           3 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38761           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; } }
   38762             :   return resultobj;
   38763             : fail:
   38764             :   return NULL;
   38765             : }
   38766             : 
   38767             : 
   38768         105 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38769         105 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38770         105 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38771         105 :   void *argp1 = 0 ;
   38772         105 :   int res1 = 0 ;
   38773         105 :   PyObject *swig_obj[1] ;
   38774         105 :   GDALExtendedDataTypeSubType result;
   38775             :   
   38776         105 :   if (!args) SWIG_fail;
   38777         105 :   swig_obj[0] = args;
   38778         105 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38779         105 :   if (!SWIG_IsOK(res1)) {
   38780           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSubType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38781             :   }
   38782         105 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38783         105 :   {
   38784         105 :     const int bLocalUseExceptions = GetUseExceptions();
   38785         105 :     if ( bLocalUseExceptions ) {
   38786          29 :       pushErrorHandler();
   38787             :     }
   38788         105 :     {
   38789         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38790         105 :       result = (GDALExtendedDataTypeSubType)GDALExtendedDataTypeHS_GetSubType(arg1);
   38791         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38792             :     }
   38793         105 :     if ( bLocalUseExceptions ) {
   38794          29 :       popErrorHandler();
   38795             :     }
   38796             : #ifndef SED_HACKS
   38797             :     if ( bLocalUseExceptions ) {
   38798             :       CPLErr eclass = CPLGetLastErrorType();
   38799             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38800             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38801             :       }
   38802             :     }
   38803             : #endif
   38804             :   }
   38805         105 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38806         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; } }
   38807             :   return resultobj;
   38808             : fail:
   38809             :   return NULL;
   38810             : }
   38811             : 
   38812             : 
   38813           1 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38814           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38815           1 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38816           1 :   void *argp1 = 0 ;
   38817           1 :   int res1 = 0 ;
   38818           1 :   PyObject *swig_obj[1] ;
   38819           1 :   GDALRasterAttributeTableShadow *result = 0 ;
   38820             :   
   38821           1 :   if (!args) SWIG_fail;
   38822           1 :   swig_obj[0] = args;
   38823           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38824           1 :   if (!SWIG_IsOK(res1)) {
   38825           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetRAT" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38826             :   }
   38827           1 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38828           1 :   {
   38829           1 :     const int bLocalUseExceptions = GetUseExceptions();
   38830           1 :     if ( bLocalUseExceptions ) {
   38831           1 :       pushErrorHandler();
   38832             :     }
   38833           1 :     {
   38834           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38835           1 :       result = (GDALRasterAttributeTableShadow *)GDALExtendedDataTypeHS_GetRAT(arg1);
   38836           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38837             :     }
   38838           1 :     if ( bLocalUseExceptions ) {
   38839           1 :       popErrorHandler();
   38840             :     }
   38841             : #ifndef SED_HACKS
   38842             :     if ( bLocalUseExceptions ) {
   38843             :       CPLErr eclass = CPLGetLastErrorType();
   38844             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38845             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38846             :       }
   38847             :     }
   38848             : #endif
   38849             :   }
   38850           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   38851           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; } }
   38852             :   return resultobj;
   38853             : fail:
   38854             :   return NULL;
   38855             : }
   38856             : 
   38857             : 
   38858          21 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetComponents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38859          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38860          21 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38861          21 :   GDALEDTComponentHS ***arg2 = (GDALEDTComponentHS ***) 0 ;
   38862          21 :   size_t *arg3 = (size_t *) 0 ;
   38863          21 :   void *argp1 = 0 ;
   38864          21 :   int res1 = 0 ;
   38865          21 :   GDALEDTComponentHS **comps2 = 0 ;
   38866          21 :   size_t nCount2 = 0 ;
   38867          21 :   PyObject *swig_obj[1] ;
   38868             :   
   38869          21 :   {
   38870             :     /* %typemap(in,numinputs=0) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38871          21 :     arg2 = &comps2;
   38872          21 :     arg3 = &nCount2;
   38873             :   }
   38874          21 :   if (!args) SWIG_fail;
   38875          21 :   swig_obj[0] = args;
   38876          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38877          21 :   if (!SWIG_IsOK(res1)) {
   38878           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetComponents" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38879             :   }
   38880          21 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38881          21 :   {
   38882          21 :     const int bLocalUseExceptions = GetUseExceptions();
   38883          21 :     if ( bLocalUseExceptions ) {
   38884           6 :       pushErrorHandler();
   38885             :     }
   38886          21 :     {
   38887          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38888          21 :       GDALExtendedDataTypeHS_GetComponents(arg1,arg2,arg3);
   38889          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38890             :     }
   38891          21 :     if ( bLocalUseExceptions ) {
   38892           6 :       popErrorHandler();
   38893             :     }
   38894             : #ifndef SED_HACKS
   38895             :     if ( bLocalUseExceptions ) {
   38896             :       CPLErr eclass = CPLGetLastErrorType();
   38897             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38898             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38899             :       }
   38900             :     }
   38901             : #endif
   38902             :   }
   38903          21 :   resultobj = SWIG_Py_Void();
   38904          21 :   {
   38905             :     /* %typemap(argout) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38906          21 :     Py_DECREF(resultobj);
   38907          21 :     resultobj = PyList_New( *arg3 );
   38908          21 :     if( !resultobj ) {
   38909           0 :       SWIG_fail;
   38910             :     }
   38911          62 :     for( size_t i = 0; i < *arg3; i++ ) {
   38912          41 :       PyList_SetItem(resultobj, i,
   38913          41 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALEDTComponentHS,SWIG_POINTER_OWN) );
   38914             :       /* We have borrowed the GDALEDTComponentHS */
   38915          41 :       (*arg2)[i] = NULL;
   38916             :     }
   38917             :   }
   38918          21 :   {
   38919             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38920          21 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38921             :   }
   38922          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; } }
   38923             :   return resultobj;
   38924           0 : fail:
   38925           0 :   {
   38926             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38927           0 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38928             :   }
   38929             :   return NULL;
   38930             : }
   38931             : 
   38932             : 
   38933           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CanConvertTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38934           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38935           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38936           8 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38937           8 :   void *argp1 = 0 ;
   38938           8 :   int res1 = 0 ;
   38939           8 :   void *argp2 = 0 ;
   38940           8 :   int res2 = 0 ;
   38941           8 :   PyObject *swig_obj[2] ;
   38942           8 :   bool result;
   38943             :   
   38944           8 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CanConvertTo", 2, 2, swig_obj)) SWIG_fail;
   38945           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38946           8 :   if (!SWIG_IsOK(res1)) {
   38947           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38948             :   }
   38949           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38950           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38951           8 :   if (!SWIG_IsOK(res2)) {
   38952           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38953             :   }
   38954           8 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   38955           8 :   {
   38956           8 :     if (!arg2) {
   38957           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38958             :     }
   38959             :   }
   38960           7 :   {
   38961           7 :     const int bLocalUseExceptions = GetUseExceptions();
   38962           7 :     if ( bLocalUseExceptions ) {
   38963           0 :       pushErrorHandler();
   38964             :     }
   38965           7 :     {
   38966           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38967           7 :       result = (bool)GDALExtendedDataTypeHS_CanConvertTo(arg1,arg2);
   38968           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38969             :     }
   38970           7 :     if ( bLocalUseExceptions ) {
   38971           0 :       popErrorHandler();
   38972             :     }
   38973             : #ifndef SED_HACKS
   38974             :     if ( bLocalUseExceptions ) {
   38975             :       CPLErr eclass = CPLGetLastErrorType();
   38976             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38977             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38978             :       }
   38979             :     }
   38980             : #endif
   38981             :   }
   38982           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38983           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; } }
   38984             :   return resultobj;
   38985             : fail:
   38986             :   return NULL;
   38987             : }
   38988             : 
   38989             : 
   38990         101 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38991         101 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38992         101 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38993         101 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38994         101 :   void *argp1 = 0 ;
   38995         101 :   int res1 = 0 ;
   38996         101 :   void *argp2 = 0 ;
   38997         101 :   int res2 = 0 ;
   38998         101 :   PyObject *swig_obj[2] ;
   38999         101 :   bool result;
   39000             :   
   39001         101 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_Equals", 2, 2, swig_obj)) SWIG_fail;
   39002         101 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   39003         101 :   if (!SWIG_IsOK(res1)) {
   39004           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_Equals" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   39005             :   }
   39006         101 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   39007         101 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   39008         101 :   if (!SWIG_IsOK(res2)) {
   39009           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_Equals" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   39010             :   }
   39011         101 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   39012         101 :   {
   39013         101 :     if (!arg2) {
   39014           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   39015             :     }
   39016             :   }
   39017         100 :   {
   39018         100 :     const int bLocalUseExceptions = GetUseExceptions();
   39019         100 :     if ( bLocalUseExceptions ) {
   39020          38 :       pushErrorHandler();
   39021             :     }
   39022         100 :     {
   39023         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39024         100 :       result = (bool)GDALExtendedDataTypeHS_Equals(arg1,arg2);
   39025         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39026             :     }
   39027         100 :     if ( bLocalUseExceptions ) {
   39028          38 :       popErrorHandler();
   39029             :     }
   39030             : #ifndef SED_HACKS
   39031             :     if ( bLocalUseExceptions ) {
   39032             :       CPLErr eclass = CPLGetLastErrorType();
   39033             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39034             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39035             :       }
   39036             :     }
   39037             : #endif
   39038             :   }
   39039         100 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   39040         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; } }
   39041             :   return resultobj;
   39042             : fail:
   39043             :   return NULL;
   39044             : }
   39045             : 
   39046             : 
   39047         277 : SWIGINTERN PyObject *ExtendedDataType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39048         277 :   PyObject *obj;
   39049         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   39050         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_NewClientData(obj));
   39051         277 :   return SWIG_Py_Void();
   39052             : }
   39053             : 
   39054          61 : SWIGINTERN PyObject *_wrap_delete_EDTComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39055          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39056          61 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39057          61 :   void *argp1 = 0 ;
   39058          61 :   int res1 = 0 ;
   39059          61 :   PyObject *swig_obj[1] ;
   39060             :   
   39061          61 :   if (!args) SWIG_fail;
   39062          61 :   swig_obj[0] = args;
   39063          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_DISOWN |  0 );
   39064          61 :   if (!SWIG_IsOK(res1)) {
   39065           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EDTComponent" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39066             :   }
   39067          61 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39068          61 :   {
   39069          61 :     const int bLocalUseExceptions = GetUseExceptions();
   39070          61 :     if ( bLocalUseExceptions ) {
   39071          23 :       pushErrorHandler();
   39072             :     }
   39073          61 :     {
   39074          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39075          61 :       delete_GDALEDTComponentHS(arg1);
   39076          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39077             :     }
   39078          61 :     if ( bLocalUseExceptions ) {
   39079          23 :       popErrorHandler();
   39080             :     }
   39081             : #ifndef SED_HACKS
   39082             :     if ( bLocalUseExceptions ) {
   39083             :       CPLErr eclass = CPLGetLastErrorType();
   39084             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39085             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39086             :       }
   39087             :     }
   39088             : #endif
   39089             :   }
   39090          61 :   resultobj = SWIG_Py_Void();
   39091          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; } }
   39092             :   return resultobj;
   39093             : fail:
   39094             :   return NULL;
   39095             : }
   39096             : 
   39097             : 
   39098          20 : SWIGINTERN PyObject *_wrap_EDTComponent_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39099          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39100          20 :   char *arg1 = (char *) 0 ;
   39101          20 :   size_t arg2 ;
   39102          20 :   GDALExtendedDataTypeHS *arg3 = (GDALExtendedDataTypeHS *) 0 ;
   39103          20 :   int res1 ;
   39104          20 :   char *buf1 = 0 ;
   39105          20 :   int alloc1 = 0 ;
   39106          20 :   size_t val2 ;
   39107          20 :   int ecode2 = 0 ;
   39108          20 :   void *argp3 = 0 ;
   39109          20 :   int res3 = 0 ;
   39110          20 :   PyObject *swig_obj[3] ;
   39111          20 :   GDALEDTComponentHS *result = 0 ;
   39112             :   
   39113          20 :   if (!SWIG_Python_UnpackTuple(args, "EDTComponent_Create", 3, 3, swig_obj)) SWIG_fail;
   39114          20 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   39115          20 :   if (!SWIG_IsOK(res1)) {
   39116           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_Create" "', argument " "1"" of type '" "char const *""'");
   39117             :   }
   39118          20 :   arg1 = reinterpret_cast< char * >(buf1);
   39119          20 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   39120          20 :   if (!SWIG_IsOK(ecode2)) {
   39121           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EDTComponent_Create" "', argument " "2"" of type '" "size_t""'");
   39122             :   } 
   39123          20 :   arg2 = static_cast< size_t >(val2);
   39124          20 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   39125          20 :   if (!SWIG_IsOK(res3)) {
   39126           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EDTComponent_Create" "', argument " "3"" of type '" "GDALExtendedDataTypeHS *""'"); 
   39127             :   }
   39128          20 :   arg3 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp3);
   39129          20 :   {
   39130          20 :     if (!arg1) {
   39131           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   39132             :     }
   39133             :   }
   39134          20 :   {
   39135          20 :     if (!arg3) {
   39136           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   39137             :     }
   39138             :   }
   39139          20 :   {
   39140          20 :     const int bLocalUseExceptions = GetUseExceptions();
   39141          20 :     if ( bLocalUseExceptions ) {
   39142          10 :       pushErrorHandler();
   39143             :     }
   39144          20 :     {
   39145          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39146          20 :       result = (GDALEDTComponentHS *)GDALEDTComponentHS_Create((char const *)arg1,arg2,arg3);
   39147          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39148             :     }
   39149          20 :     if ( bLocalUseExceptions ) {
   39150          10 :       popErrorHandler();
   39151             :     }
   39152             : #ifndef SED_HACKS
   39153             :     if ( bLocalUseExceptions ) {
   39154             :       CPLErr eclass = CPLGetLastErrorType();
   39155             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39156             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39157             :       }
   39158             :     }
   39159             : #endif
   39160             :   }
   39161          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_OWN |  0 );
   39162          20 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   39163          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; } }
   39164             :   return resultobj;
   39165           0 : fail:
   39166           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   39167             :   return NULL;
   39168             : }
   39169             : 
   39170             : 
   39171          33 : SWIGINTERN PyObject *_wrap_EDTComponent_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39172          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39173          33 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39174          33 :   void *argp1 = 0 ;
   39175          33 :   int res1 = 0 ;
   39176          33 :   PyObject *swig_obj[1] ;
   39177          33 :   char *result = 0 ;
   39178             :   
   39179          33 :   if (!args) SWIG_fail;
   39180          33 :   swig_obj[0] = args;
   39181          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39182          33 :   if (!SWIG_IsOK(res1)) {
   39183           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetName" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39184             :   }
   39185          33 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39186          33 :   {
   39187          33 :     const int bLocalUseExceptions = GetUseExceptions();
   39188          33 :     if ( bLocalUseExceptions ) {
   39189          13 :       pushErrorHandler();
   39190             :     }
   39191          33 :     {
   39192          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39193          33 :       result = (char *)GDALEDTComponentHS_GetName(arg1);
   39194          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39195             :     }
   39196          33 :     if ( bLocalUseExceptions ) {
   39197          13 :       popErrorHandler();
   39198             :     }
   39199             : #ifndef SED_HACKS
   39200             :     if ( bLocalUseExceptions ) {
   39201             :       CPLErr eclass = CPLGetLastErrorType();
   39202             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39203             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39204             :       }
   39205             :     }
   39206             : #endif
   39207             :   }
   39208          33 :   resultobj = SWIG_FromCharPtr((const char *)result);
   39209          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; } }
   39210             :   return resultobj;
   39211             : fail:
   39212             :   return NULL;
   39213             : }
   39214             : 
   39215             : 
   39216          31 : SWIGINTERN PyObject *_wrap_EDTComponent_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39217          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39218          31 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39219          31 :   void *argp1 = 0 ;
   39220          31 :   int res1 = 0 ;
   39221          31 :   PyObject *swig_obj[1] ;
   39222          31 :   size_t result;
   39223             :   
   39224          31 :   if (!args) SWIG_fail;
   39225          31 :   swig_obj[0] = args;
   39226          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39227          31 :   if (!SWIG_IsOK(res1)) {
   39228           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetOffset" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39229             :   }
   39230          31 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39231          31 :   {
   39232          31 :     const int bLocalUseExceptions = GetUseExceptions();
   39233          31 :     if ( bLocalUseExceptions ) {
   39234          13 :       pushErrorHandler();
   39235             :     }
   39236          31 :     {
   39237          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39238          31 :       result = GDALEDTComponentHS_GetOffset(arg1);
   39239          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39240             :     }
   39241          31 :     if ( bLocalUseExceptions ) {
   39242          13 :       popErrorHandler();
   39243             :     }
   39244             : #ifndef SED_HACKS
   39245             :     if ( bLocalUseExceptions ) {
   39246             :       CPLErr eclass = CPLGetLastErrorType();
   39247             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39248             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39249             :       }
   39250             :     }
   39251             : #endif
   39252             :   }
   39253          31 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   39254          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; } }
   39255             :   return resultobj;
   39256             : fail:
   39257             :   return NULL;
   39258             : }
   39259             : 
   39260             : 
   39261          49 : SWIGINTERN PyObject *_wrap_EDTComponent_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39262          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39263          49 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39264          49 :   void *argp1 = 0 ;
   39265          49 :   int res1 = 0 ;
   39266          49 :   PyObject *swig_obj[1] ;
   39267          49 :   GDALExtendedDataTypeHS *result = 0 ;
   39268             :   
   39269          49 :   if (!args) SWIG_fail;
   39270          49 :   swig_obj[0] = args;
   39271          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39272          49 :   if (!SWIG_IsOK(res1)) {
   39273           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetType" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39274             :   }
   39275          49 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39276          49 :   {
   39277          49 :     const int bLocalUseExceptions = GetUseExceptions();
   39278          49 :     if ( bLocalUseExceptions ) {
   39279          21 :       pushErrorHandler();
   39280             :     }
   39281          49 :     {
   39282          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39283          49 :       result = (GDALExtendedDataTypeHS *)GDALEDTComponentHS_GetType(arg1);
   39284          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39285             :     }
   39286          49 :     if ( bLocalUseExceptions ) {
   39287          21 :       popErrorHandler();
   39288             :     }
   39289             : #ifndef SED_HACKS
   39290             :     if ( bLocalUseExceptions ) {
   39291             :       CPLErr eclass = CPLGetLastErrorType();
   39292             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39293             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39294             :       }
   39295             :     }
   39296             : #endif
   39297             :   }
   39298          49 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   39299          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; } }
   39300             :   return resultobj;
   39301             : fail:
   39302             :   return NULL;
   39303             : }
   39304             : 
   39305             : 
   39306         277 : SWIGINTERN PyObject *EDTComponent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39307         277 :   PyObject *obj;
   39308         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   39309         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALEDTComponentHS, SWIG_NewClientData(obj));
   39310         277 :   return SWIG_Py_Void();
   39311             : }
   39312             : 
   39313          13 : SWIGINTERN PyObject *_wrap_CreateRasterAttributeTableFromMDArrays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39314          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39315          13 :   GDALRATTableType arg1 ;
   39316          13 :   int arg2 ;
   39317          13 :   GDALMDArrayHS **arg3 = (GDALMDArrayHS **) 0 ;
   39318          13 :   int arg4 = (int) 0 ;
   39319          13 :   GDALRATFieldUsage *arg5 = (GDALRATFieldUsage *) NULL ;
   39320          13 :   int val1 ;
   39321          13 :   int ecode1 = 0 ;
   39322          13 :   PyObject *swig_obj[3] ;
   39323          13 :   GDALRasterAttributeTableShadow *result = 0 ;
   39324             :   
   39325          13 :   if (!SWIG_Python_UnpackTuple(args, "CreateRasterAttributeTableFromMDArrays", 2, 3, swig_obj)) SWIG_fail;
   39326          13 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   39327          13 :   if (!SWIG_IsOK(ecode1)) {
   39328           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CreateRasterAttributeTableFromMDArrays" "', argument " "1"" of type '" "GDALRATTableType""'");
   39329             :   } 
   39330          13 :   arg1 = static_cast< GDALRATTableType >(val1);
   39331          13 :   {
   39332             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   39333          13 :     if ( !PySequence_Check(swig_obj[1]) ) {
   39334           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   39335           1 :       SWIG_fail;
   39336             :     }
   39337          12 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   39338          12 :     if( size > (Py_ssize_t)INT_MAX ) {
   39339           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   39340           0 :       SWIG_fail;
   39341             :     }
   39342          12 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   39343           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   39344           0 :       SWIG_fail;
   39345             :     }
   39346          12 :     arg2 = (int)size;
   39347          12 :     arg3 = (GDALMDArrayHS**) VSIMalloc(arg2*sizeof(GDALMDArrayHS*));
   39348          12 :     if( !arg3) {
   39349           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   39350           0 :       SWIG_fail;
   39351             :     }
   39352             :     
   39353          26 :     for( int i = 0; i<arg2; i++ ) {
   39354          16 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   39355          16 :       GDALMDArrayHS* rawobjectpointer = NULL;
   39356          16 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   39357          16 :       if (!rawobjectpointer) {
   39358           2 :         Py_DECREF(o);
   39359           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   39360           2 :         SWIG_fail;
   39361             :       }
   39362          14 :       arg3[i] = rawobjectpointer;
   39363          14 :       Py_DECREF(o);
   39364             :       
   39365             :     }
   39366             :   }
   39367          10 :   if (swig_obj[2]) {
   39368           6 :     {
   39369             :       /*  %typemap(in) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39370           6 :       if ( !PySequence_Check(swig_obj[2]) ) {
   39371           1 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   39372           1 :         SWIG_fail;
   39373             :       }
   39374           5 :       Py_ssize_t size = PySequence_Size(swig_obj[2]);
   39375           5 :       if( size > (Py_ssize_t)INT_MAX ) {
   39376           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   39377           0 :         SWIG_fail;
   39378             :       }
   39379           5 :       if( (size_t)size > SIZE_MAX / sizeof(int) ) {
   39380           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   39381           0 :         SWIG_fail;
   39382             :       }
   39383           5 :       arg4 = (int)size;
   39384           5 :       arg5 = (GDALRATFieldUsage*) VSIMalloc(arg4*sizeof(GDALRATFieldUsage));
   39385           5 :       if( !arg5) {
   39386           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   39387           0 :         SWIG_fail;
   39388             :       }
   39389             :       
   39390          10 :       for( int i = 0; i<arg4; i++ ) {
   39391           8 :         PyObject *o = PySequence_GetItem(swig_obj[2],i);
   39392           8 :         int nVal = 0;
   39393           8 :         if ( !PyArg_Parse(o,"i",&nVal) ) {
   39394           1 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   39395           1 :           Py_DECREF(o);
   39396           3 :           SWIG_fail;
   39397             :         }
   39398           7 :         Py_DECREF(o);
   39399           7 :         if( nVal < 0 || nVal >= GFU_MaxCount )
   39400             :         {
   39401           2 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   39402           2 :           SWIG_fail;
   39403             :         }
   39404           5 :         (arg5)[i] = static_cast<GDALRATFieldUsage>(nVal);
   39405             :       }
   39406             :     }
   39407             :   }
   39408           6 :   {
   39409           6 :     const int bLocalUseExceptions = GetUseExceptions();
   39410           6 :     if ( bLocalUseExceptions ) {
   39411           6 :       pushErrorHandler();
   39412             :     }
   39413           6 :     {
   39414           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39415           6 :       result = (GDALRasterAttributeTableShadow *)CreateRasterAttributeTableFromMDArrays(arg1,arg2,arg3,arg4,arg5);
   39416           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39417             :     }
   39418           6 :     if ( bLocalUseExceptions ) {
   39419           6 :       popErrorHandler();
   39420             :     }
   39421             : #ifndef SED_HACKS
   39422             :     if ( bLocalUseExceptions ) {
   39423             :       CPLErr eclass = CPLGetLastErrorType();
   39424             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39425             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39426             :       }
   39427             :     }
   39428             : #endif
   39429             :   }
   39430           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   39431           6 :   {
   39432             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   39433           6 :     CPLFree( arg3 );
   39434             :   }
   39435           6 :   {
   39436             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39437           6 :     CPLFree( arg5 );
   39438             :   }
   39439          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; } }
   39440             :   return resultobj;
   39441           7 : fail:
   39442           7 :   {
   39443             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   39444           7 :     CPLFree( arg3 );
   39445             :   }
   39446           7 :   {
   39447             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39448           7 :     CPLFree( arg5 );
   39449             :   }
   39450             :   return NULL;
   39451             : }
   39452             : 
   39453             : 
   39454       17985 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39455       17985 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39456       17985 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39457       17985 :   void *argp1 = 0 ;
   39458       17985 :   int res1 = 0 ;
   39459       17985 :   PyObject *swig_obj[1] ;
   39460       17985 :   int result;
   39461             :   
   39462       17985 :   if (!args) SWIG_fail;
   39463       17985 :   swig_obj[0] = args;
   39464       17985 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39465       17985 :   if (!SWIG_IsOK(res1)) {
   39466           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39467             :   }
   39468       17985 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39469       17985 :   {
   39470       17985 :     const int bLocalUseExceptions = GetUseExceptions();
   39471       17985 :     if ( bLocalUseExceptions ) {
   39472       14839 :       pushErrorHandler();
   39473             :     }
   39474       17985 :     {
   39475       17985 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39476       17985 :       result = (int)GDALRasterBandShadow_XSize_get(arg1);
   39477       17985 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39478             :     }
   39479       17985 :     if ( bLocalUseExceptions ) {
   39480       14839 :       popErrorHandler();
   39481             :     }
   39482             : #ifndef SED_HACKS
   39483             :     if ( bLocalUseExceptions ) {
   39484             :       CPLErr eclass = CPLGetLastErrorType();
   39485             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39486             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39487             :       }
   39488             :     }
   39489             : #endif
   39490             :   }
   39491       17985 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39492       17985 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39493             :   return resultobj;
   39494             : fail:
   39495             :   return NULL;
   39496             : }
   39497             : 
   39498             : 
   39499       16846 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39500       16846 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39501       16846 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39502       16846 :   void *argp1 = 0 ;
   39503       16846 :   int res1 = 0 ;
   39504       16846 :   PyObject *swig_obj[1] ;
   39505       16846 :   int result;
   39506             :   
   39507       16846 :   if (!args) SWIG_fail;
   39508       16846 :   swig_obj[0] = args;
   39509       16846 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39510       16846 :   if (!SWIG_IsOK(res1)) {
   39511           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39512             :   }
   39513       16846 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39514       16846 :   {
   39515       16846 :     const int bLocalUseExceptions = GetUseExceptions();
   39516       16846 :     if ( bLocalUseExceptions ) {
   39517       13762 :       pushErrorHandler();
   39518             :     }
   39519       16846 :     {
   39520       16846 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39521       16846 :       result = (int)GDALRasterBandShadow_YSize_get(arg1);
   39522       16846 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39523             :     }
   39524       16846 :     if ( bLocalUseExceptions ) {
   39525       13762 :       popErrorHandler();
   39526             :     }
   39527             : #ifndef SED_HACKS
   39528             :     if ( bLocalUseExceptions ) {
   39529             :       CPLErr eclass = CPLGetLastErrorType();
   39530             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39531             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39532             :       }
   39533             :     }
   39534             : #endif
   39535             :   }
   39536       16846 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39537       16846 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39538             :   return resultobj;
   39539             : fail:
   39540             :   return NULL;
   39541             : }
   39542             : 
   39543             : 
   39544      849817 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39545      849817 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39546      849817 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39547      849817 :   void *argp1 = 0 ;
   39548      849817 :   int res1 = 0 ;
   39549      849817 :   PyObject *swig_obj[1] ;
   39550      849817 :   GDALDataType result;
   39551             :   
   39552      849817 :   if (!args) SWIG_fail;
   39553      849817 :   swig_obj[0] = args;
   39554      849817 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39555      849817 :   if (!SWIG_IsOK(res1)) {
   39556           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39557             :   }
   39558      849817 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39559      849817 :   {
   39560      849817 :     const int bLocalUseExceptions = GetUseExceptions();
   39561      849817 :     if ( bLocalUseExceptions ) {
   39562      837670 :       pushErrorHandler();
   39563             :     }
   39564      849817 :     {
   39565      849817 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39566      849817 :       result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   39567      849817 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39568             :     }
   39569      849817 :     if ( bLocalUseExceptions ) {
   39570      837670 :       popErrorHandler();
   39571             :     }
   39572             : #ifndef SED_HACKS
   39573             :     if ( bLocalUseExceptions ) {
   39574             :       CPLErr eclass = CPLGetLastErrorType();
   39575             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39576             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39577             :       }
   39578             :     }
   39579             : #endif
   39580             :   }
   39581      849817 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39582      849817 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39583             :   return resultobj;
   39584             : fail:
   39585             :   return NULL;
   39586             : }
   39587             : 
   39588             : 
   39589          68 : SWIGINTERN PyObject *_wrap_Band_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39590          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39591          68 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39592          68 :   void *argp1 = 0 ;
   39593          68 :   int res1 = 0 ;
   39594          68 :   PyObject *swig_obj[1] ;
   39595          68 :   GDALDatasetShadow *result = 0 ;
   39596             :   
   39597          68 :   if (!args) SWIG_fail;
   39598          68 :   swig_obj[0] = args;
   39599          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39600          68 :   if (!SWIG_IsOK(res1)) {
   39601           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39602             :   }
   39603          68 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39604          68 :   {
   39605          68 :     const int bLocalUseExceptions = GetUseExceptions();
   39606          68 :     if ( bLocalUseExceptions ) {
   39607           8 :       pushErrorHandler();
   39608             :     }
   39609          68 :     {
   39610          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39611          68 :       result = (GDALDatasetShadow *)GDALRasterBandShadow_GetDataset(arg1);
   39612          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39613             :     }
   39614          68 :     if ( bLocalUseExceptions ) {
   39615           8 :       popErrorHandler();
   39616             :     }
   39617             : #ifndef SED_HACKS
   39618             :     if ( bLocalUseExceptions ) {
   39619             :       CPLErr eclass = CPLGetLastErrorType();
   39620             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39621             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39622             :       }
   39623             :     }
   39624             : #endif
   39625             :   }
   39626          68 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   39627          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; } }
   39628             :   return resultobj;
   39629             : fail:
   39630             :   return NULL;
   39631             : }
   39632             : 
   39633             : 
   39634           8 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39635           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39636           8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39637           8 :   void *argp1 = 0 ;
   39638           8 :   int res1 = 0 ;
   39639           8 :   PyObject *swig_obj[1] ;
   39640           8 :   int result;
   39641             :   
   39642           8 :   if (!args) SWIG_fail;
   39643           8 :   swig_obj[0] = args;
   39644           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39645           8 :   if (!SWIG_IsOK(res1)) {
   39646           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39647             :   }
   39648           8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39649           8 :   {
   39650           8 :     const int bLocalUseExceptions = GetUseExceptions();
   39651           8 :     if ( bLocalUseExceptions ) {
   39652           8 :       pushErrorHandler();
   39653             :     }
   39654           8 :     {
   39655           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39656           8 :       result = (int)GDALRasterBandShadow_GetBand(arg1);
   39657           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39658             :     }
   39659           8 :     if ( bLocalUseExceptions ) {
   39660           8 :       popErrorHandler();
   39661             :     }
   39662             : #ifndef SED_HACKS
   39663             :     if ( bLocalUseExceptions ) {
   39664             :       CPLErr eclass = CPLGetLastErrorType();
   39665             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39666             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39667             :       }
   39668             :     }
   39669             : #endif
   39670             :   }
   39671           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39672           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; } }
   39673             :   return resultobj;
   39674             : fail:
   39675             :   return NULL;
   39676             : }
   39677             : 
   39678             : 
   39679         491 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39680         491 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39681         491 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39682         491 :   int *arg2 = (int *) 0 ;
   39683         491 :   int *arg3 = (int *) 0 ;
   39684         491 :   void *argp1 = 0 ;
   39685         491 :   int res1 = 0 ;
   39686         491 :   int temp2 ;
   39687         491 :   int res2 = SWIG_TMPOBJ ;
   39688         491 :   int temp3 ;
   39689         491 :   int res3 = SWIG_TMPOBJ ;
   39690         491 :   PyObject *swig_obj[1] ;
   39691             :   
   39692         491 :   arg2 = &temp2;
   39693         491 :   arg3 = &temp3;
   39694         491 :   if (!args) SWIG_fail;
   39695         491 :   swig_obj[0] = args;
   39696         491 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39697         491 :   if (!SWIG_IsOK(res1)) {
   39698           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39699             :   }
   39700         491 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39701         491 :   {
   39702         491 :     const int bLocalUseExceptions = GetUseExceptions();
   39703         491 :     if ( bLocalUseExceptions ) {
   39704         207 :       pushErrorHandler();
   39705             :     }
   39706         491 :     {
   39707         491 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39708         491 :       GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   39709         491 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39710             :     }
   39711         491 :     if ( bLocalUseExceptions ) {
   39712         207 :       popErrorHandler();
   39713             :     }
   39714             : #ifndef SED_HACKS
   39715             :     if ( bLocalUseExceptions ) {
   39716             :       CPLErr eclass = CPLGetLastErrorType();
   39717             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39718             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39719             :       }
   39720             :     }
   39721             : #endif
   39722             :   }
   39723         491 :   resultobj = SWIG_Py_Void();
   39724         491 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   39725         491 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   39726             :   } else {
   39727           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39728           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   39729             :   }
   39730         491 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   39731         491 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   39732             :   } else {
   39733           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39734           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   39735             :   }
   39736         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; } }
   39737             :   return resultobj;
   39738             : fail:
   39739             :   return NULL;
   39740             : }
   39741             : 
   39742             : 
   39743           6 : SWIGINTERN PyObject *_wrap_Band_GetActualBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39744           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39745           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39746           6 :   int arg2 ;
   39747           6 :   int arg3 ;
   39748           6 :   int *arg4 = (int *) 0 ;
   39749           6 :   int *arg5 = (int *) 0 ;
   39750           6 :   int *arg6 = (int *) 0 ;
   39751           6 :   void *argp1 = 0 ;
   39752           6 :   int res1 = 0 ;
   39753           6 :   int val2 ;
   39754           6 :   int ecode2 = 0 ;
   39755           6 :   int val3 ;
   39756           6 :   int ecode3 = 0 ;
   39757           6 :   int nxvalid4 = 0 ;
   39758           6 :   int nyvalid4 = 0 ;
   39759           6 :   int isvalid4 = 0 ;
   39760           6 :   PyObject *swig_obj[3] ;
   39761             :   
   39762           6 :   {
   39763             :     /* %typemap(in) (int *pnxvalid, int *pnyvalid, int* pisvalid) */
   39764           6 :     arg4 = &nxvalid4;
   39765           6 :     arg5 = &nyvalid4;
   39766           6 :     arg6 = &isvalid4;
   39767             :   }
   39768           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetActualBlockSize", 3, 3, swig_obj)) SWIG_fail;
   39769           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39770           6 :   if (!SWIG_IsOK(res1)) {
   39771           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetActualBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39772             :   }
   39773           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39774           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39775           6 :   if (!SWIG_IsOK(ecode2)) {
   39776           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetActualBlockSize" "', argument " "2"" of type '" "int""'");
   39777             :   } 
   39778           6 :   arg2 = static_cast< int >(val2);
   39779           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   39780           6 :   if (!SWIG_IsOK(ecode3)) {
   39781           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetActualBlockSize" "', argument " "3"" of type '" "int""'");
   39782             :   } 
   39783           6 :   arg3 = static_cast< int >(val3);
   39784           6 :   {
   39785           6 :     const int bLocalUseExceptions = GetUseExceptions();
   39786           6 :     if ( bLocalUseExceptions ) {
   39787           0 :       pushErrorHandler();
   39788             :     }
   39789           6 :     {
   39790           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39791           6 :       GDALRasterBandShadow_GetActualBlockSize(arg1,arg2,arg3,arg4,arg5,arg6);
   39792           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39793             :     }
   39794           6 :     if ( bLocalUseExceptions ) {
   39795           0 :       popErrorHandler();
   39796             :     }
   39797             : #ifndef SED_HACKS
   39798             :     if ( bLocalUseExceptions ) {
   39799             :       CPLErr eclass = CPLGetLastErrorType();
   39800             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39801             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39802             :       }
   39803             :     }
   39804             : #endif
   39805             :   }
   39806           6 :   resultobj = SWIG_Py_Void();
   39807           6 :   {
   39808             :     /* %typemap(argout) (int *pnxvalid, int *pnyvalid, int* pisvalid)  */
   39809           6 :     PyObject *r;
   39810           6 :     if ( !*arg6 ) {
   39811           4 :       Py_INCREF(Py_None);
   39812           4 :       r = Py_None;
   39813             :     }
   39814             :     else {
   39815           2 :       r = PyTuple_New( 2 );
   39816           2 :       PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   39817           2 :       PyTuple_SetItem( r, 1, PyLong_FromLong(*arg5) );
   39818             :     }
   39819             : #if SWIG_VERSION >= 0x040300
   39820             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39821             : #else
   39822           6 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39823             : #endif
   39824             :   }
   39825           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; } }
   39826             :   return resultobj;
   39827             : fail:
   39828             :   return NULL;
   39829             : }
   39830             : 
   39831             : 
   39832         839 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39833         839 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39834         839 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39835         839 :   void *argp1 = 0 ;
   39836         839 :   int res1 = 0 ;
   39837         839 :   PyObject *swig_obj[1] ;
   39838         839 :   GDALColorInterp result;
   39839             :   
   39840         839 :   if (!args) SWIG_fail;
   39841         839 :   swig_obj[0] = args;
   39842         839 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39843         839 :   if (!SWIG_IsOK(res1)) {
   39844           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39845             :   }
   39846         839 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39847         839 :   {
   39848         839 :     const int bLocalUseExceptions = GetUseExceptions();
   39849         839 :     if ( bLocalUseExceptions ) {
   39850         293 :       pushErrorHandler();
   39851             :     }
   39852         839 :     {
   39853         839 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39854         839 :       result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   39855         839 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39856             :     }
   39857         839 :     if ( bLocalUseExceptions ) {
   39858         293 :       popErrorHandler();
   39859             :     }
   39860             : #ifndef SED_HACKS
   39861             :     if ( bLocalUseExceptions ) {
   39862             :       CPLErr eclass = CPLGetLastErrorType();
   39863             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39864             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39865             :       }
   39866             :     }
   39867             : #endif
   39868             :   }
   39869         839 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39870         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; } }
   39871             :   return resultobj;
   39872             : fail:
   39873             :   return NULL;
   39874             : }
   39875             : 
   39876             : 
   39877         182 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39878         182 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39879         182 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39880         182 :   void *argp1 = 0 ;
   39881         182 :   int res1 = 0 ;
   39882         182 :   PyObject *swig_obj[1] ;
   39883         182 :   GDALColorInterp result;
   39884             :   
   39885         182 :   if (!args) SWIG_fail;
   39886         182 :   swig_obj[0] = args;
   39887         182 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39888         182 :   if (!SWIG_IsOK(res1)) {
   39889           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39890             :   }
   39891         182 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39892         182 :   {
   39893         182 :     const int bLocalUseExceptions = GetUseExceptions();
   39894         182 :     if ( bLocalUseExceptions ) {
   39895          64 :       pushErrorHandler();
   39896             :     }
   39897         182 :     {
   39898         182 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39899         182 :       result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   39900         182 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39901             :     }
   39902         182 :     if ( bLocalUseExceptions ) {
   39903          64 :       popErrorHandler();
   39904             :     }
   39905             : #ifndef SED_HACKS
   39906             :     if ( bLocalUseExceptions ) {
   39907             :       CPLErr eclass = CPLGetLastErrorType();
   39908             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39909             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39910             :       }
   39911             :     }
   39912             : #endif
   39913             :   }
   39914         182 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39915         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; } }
   39916             :   return resultobj;
   39917             : fail:
   39918             :   return NULL;
   39919             : }
   39920             : 
   39921             : 
   39922         693 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39923         693 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39924         693 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39925         693 :   GDALColorInterp arg2 ;
   39926         693 :   void *argp1 = 0 ;
   39927         693 :   int res1 = 0 ;
   39928         693 :   int val2 ;
   39929         693 :   int ecode2 = 0 ;
   39930         693 :   PyObject *swig_obj[2] ;
   39931         693 :   CPLErr result;
   39932             :   
   39933         693 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39934         693 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39935         693 :   if (!SWIG_IsOK(res1)) {
   39936           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39937             :   }
   39938         693 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39939         693 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39940         693 :   if (!SWIG_IsOK(ecode2)) {
   39941           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39942             :   } 
   39943         693 :   arg2 = static_cast< GDALColorInterp >(val2);
   39944         693 :   {
   39945         693 :     const int bLocalUseExceptions = GetUseExceptions();
   39946         693 :     if ( bLocalUseExceptions ) {
   39947         324 :       pushErrorHandler();
   39948             :     }
   39949         693 :     {
   39950         693 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39951         693 :       result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
   39952         693 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39953             :     }
   39954         693 :     if ( bLocalUseExceptions ) {
   39955         324 :       popErrorHandler();
   39956             :     }
   39957             : #ifndef SED_HACKS
   39958             :     if ( bLocalUseExceptions ) {
   39959             :       CPLErr eclass = CPLGetLastErrorType();
   39960             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39961             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39962             :       }
   39963             :     }
   39964             : #endif
   39965             :   }
   39966         693 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39967         693 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39968             :   return resultobj;
   39969             : fail:
   39970             :   return NULL;
   39971             : }
   39972             : 
   39973             : 
   39974         409 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39975         409 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39976         409 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39977         409 :   GDALColorInterp arg2 ;
   39978         409 :   void *argp1 = 0 ;
   39979         409 :   int res1 = 0 ;
   39980         409 :   int val2 ;
   39981         409 :   int ecode2 = 0 ;
   39982         409 :   PyObject *swig_obj[2] ;
   39983         409 :   CPLErr result;
   39984             :   
   39985         409 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39986         409 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39987         409 :   if (!SWIG_IsOK(res1)) {
   39988           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39989             :   }
   39990         409 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39991         409 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39992         409 :   if (!SWIG_IsOK(ecode2)) {
   39993           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39994             :   } 
   39995         409 :   arg2 = static_cast< GDALColorInterp >(val2);
   39996         409 :   {
   39997         409 :     const int bLocalUseExceptions = GetUseExceptions();
   39998         409 :     if ( bLocalUseExceptions ) {
   39999         355 :       pushErrorHandler();
   40000             :     }
   40001         409 :     {
   40002         409 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40003         409 :       result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
   40004         409 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40005             :     }
   40006         409 :     if ( bLocalUseExceptions ) {
   40007         355 :       popErrorHandler();
   40008             :     }
   40009             : #ifndef SED_HACKS
   40010             :     if ( bLocalUseExceptions ) {
   40011             :       CPLErr eclass = CPLGetLastErrorType();
   40012             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40013             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40014             :       }
   40015             :     }
   40016             : #endif
   40017             :   }
   40018         409 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40019         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; } }
   40020             :   return resultobj;
   40021             : fail:
   40022             :   return NULL;
   40023             : }
   40024             : 
   40025             : 
   40026      410205 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40027      410205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40028      410205 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40029      410205 :   double *arg2 = (double *) 0 ;
   40030      410205 :   int *arg3 = (int *) 0 ;
   40031      410205 :   void *argp1 = 0 ;
   40032      410205 :   int res1 = 0 ;
   40033      410205 :   double tmpval2 ;
   40034      410205 :   int tmphasval2 ;
   40035      410205 :   PyObject *swig_obj[1] ;
   40036             :   
   40037      410205 :   {
   40038             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40039      410205 :     arg2 = &tmpval2;
   40040      410205 :     arg3 = &tmphasval2;
   40041             :   }
   40042      410205 :   if (!args) SWIG_fail;
   40043      410205 :   swig_obj[0] = args;
   40044      410205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40045      410205 :   if (!SWIG_IsOK(res1)) {
   40046           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40047             :   }
   40048      410205 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40049      410205 :   {
   40050      410205 :     const int bLocalUseExceptions = GetUseExceptions();
   40051      410205 :     if ( bLocalUseExceptions ) {
   40052      410002 :       pushErrorHandler();
   40053             :     }
   40054      410205 :     {
   40055      410205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40056      410205 :       GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   40057      410205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40058             :     }
   40059      410205 :     if ( bLocalUseExceptions ) {
   40060      410002 :       popErrorHandler();
   40061             :     }
   40062             : #ifndef SED_HACKS
   40063             :     if ( bLocalUseExceptions ) {
   40064             :       CPLErr eclass = CPLGetLastErrorType();
   40065             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40066             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40067             :       }
   40068             :     }
   40069             : #endif
   40070             :   }
   40071      410205 :   resultobj = SWIG_Py_Void();
   40072      410205 :   {
   40073             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40074      410205 :     PyObject *r;
   40075      410205 :     if ( !*arg3 ) {
   40076         463 :       Py_INCREF(Py_None);
   40077         463 :       r = Py_None;
   40078             :     }
   40079             :     else {
   40080      409742 :       r = PyFloat_FromDouble( *arg2 );
   40081             :     }
   40082             : #if SWIG_VERSION >= 0x040300
   40083             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40084             : #else
   40085      410205 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40086             : #endif
   40087             :   }
   40088      410205 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40089             :   return resultobj;
   40090             : fail:
   40091             :   return NULL;
   40092             : }
   40093             : 
   40094             : 
   40095          31 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40096          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40097          31 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40098          31 :   GIntBig *arg2 = (GIntBig *) 0 ;
   40099          31 :   int *arg3 = (int *) 0 ;
   40100          31 :   void *argp1 = 0 ;
   40101          31 :   int res1 = 0 ;
   40102          31 :   GIntBig tmpval2 ;
   40103          31 :   int tmphasval2 ;
   40104          31 :   PyObject *swig_obj[1] ;
   40105             :   
   40106          31 :   {
   40107             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   40108          31 :     arg2 = &tmpval2;
   40109          31 :     arg3 = &tmphasval2;
   40110             :   }
   40111          31 :   if (!args) SWIG_fail;
   40112          31 :   swig_obj[0] = args;
   40113          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40114          31 :   if (!SWIG_IsOK(res1)) {
   40115           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40116             :   }
   40117          31 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40118          31 :   {
   40119          31 :     const int bLocalUseExceptions = GetUseExceptions();
   40120          31 :     if ( bLocalUseExceptions ) {
   40121          22 :       pushErrorHandler();
   40122             :     }
   40123          31 :     {
   40124          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40125          31 :       GDALRasterBandShadow_GetNoDataValueAsInt64(arg1,arg2,arg3);
   40126          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40127             :     }
   40128          31 :     if ( bLocalUseExceptions ) {
   40129          22 :       popErrorHandler();
   40130             :     }
   40131             : #ifndef SED_HACKS
   40132             :     if ( bLocalUseExceptions ) {
   40133             :       CPLErr eclass = CPLGetLastErrorType();
   40134             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40135             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40136             :       }
   40137             :     }
   40138             : #endif
   40139             :   }
   40140          31 :   resultobj = SWIG_Py_Void();
   40141          31 :   {
   40142             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   40143          31 :     PyObject *r;
   40144          31 :     if ( !*arg3 ) {
   40145          10 :       Py_INCREF(Py_None);
   40146          10 :       r = Py_None;
   40147             :     }
   40148             :     else {
   40149          21 :       r = PyLong_FromLongLong( *arg2 );
   40150             :     }
   40151             : #if SWIG_VERSION >= 0x040300
   40152             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40153             : #else
   40154          31 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40155             : #endif
   40156             :   }
   40157          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; } }
   40158             :   return resultobj;
   40159             : fail:
   40160             :   return NULL;
   40161             : }
   40162             : 
   40163             : 
   40164          22 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40165          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40166          22 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40167          22 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   40168          22 :   int *arg3 = (int *) 0 ;
   40169          22 :   void *argp1 = 0 ;
   40170          22 :   int res1 = 0 ;
   40171          22 :   GUIntBig tmpval2 ;
   40172          22 :   int tmphasval2 ;
   40173          22 :   PyObject *swig_obj[1] ;
   40174             :   
   40175          22 :   {
   40176             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   40177          22 :     arg2 = &tmpval2;
   40178          22 :     arg3 = &tmphasval2;
   40179             :   }
   40180          22 :   if (!args) SWIG_fail;
   40181          22 :   swig_obj[0] = args;
   40182          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40183          22 :   if (!SWIG_IsOK(res1)) {
   40184           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40185             :   }
   40186          22 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40187          22 :   {
   40188          22 :     const int bLocalUseExceptions = GetUseExceptions();
   40189          22 :     if ( bLocalUseExceptions ) {
   40190          13 :       pushErrorHandler();
   40191             :     }
   40192          22 :     {
   40193          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40194          22 :       GDALRasterBandShadow_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   40195          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40196             :     }
   40197          22 :     if ( bLocalUseExceptions ) {
   40198          13 :       popErrorHandler();
   40199             :     }
   40200             : #ifndef SED_HACKS
   40201             :     if ( bLocalUseExceptions ) {
   40202             :       CPLErr eclass = CPLGetLastErrorType();
   40203             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40204             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40205             :       }
   40206             :     }
   40207             : #endif
   40208             :   }
   40209          22 :   resultobj = SWIG_Py_Void();
   40210          22 :   {
   40211             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   40212          22 :     PyObject *r;
   40213          22 :     if ( !*arg3 ) {
   40214           4 :       Py_INCREF(Py_None);
   40215           4 :       r = Py_None;
   40216             :     }
   40217             :     else {
   40218          18 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   40219             :     }
   40220             : #if SWIG_VERSION >= 0x040300
   40221             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40222             : #else
   40223          22 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40224             : #endif
   40225             :   }
   40226          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; } }
   40227             :   return resultobj;
   40228             : fail:
   40229             :   return NULL;
   40230             : }
   40231             : 
   40232             : 
   40233         635 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40234         635 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40235         635 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40236         635 :   double arg2 ;
   40237         635 :   void *argp1 = 0 ;
   40238         635 :   int res1 = 0 ;
   40239         635 :   double val2 ;
   40240         635 :   int ecode2 = 0 ;
   40241         635 :   PyObject *swig_obj[2] ;
   40242         635 :   CPLErr result;
   40243             :   
   40244         635 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValue", 2, 2, swig_obj)) SWIG_fail;
   40245         635 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40246         635 :   if (!SWIG_IsOK(res1)) {
   40247           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40248             :   }
   40249         635 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40250         635 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40251         635 :   if (!SWIG_IsOK(ecode2)) {
   40252           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   40253             :   } 
   40254         635 :   arg2 = static_cast< double >(val2);
   40255         635 :   {
   40256         635 :     const int bLocalUseExceptions = GetUseExceptions();
   40257         635 :     if ( bLocalUseExceptions ) {
   40258         456 :       pushErrorHandler();
   40259             :     }
   40260         635 :     {
   40261         635 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40262         635 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
   40263         635 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40264             :     }
   40265         635 :     if ( bLocalUseExceptions ) {
   40266         456 :       popErrorHandler();
   40267             :     }
   40268             : #ifndef SED_HACKS
   40269             :     if ( bLocalUseExceptions ) {
   40270             :       CPLErr eclass = CPLGetLastErrorType();
   40271             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40272             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40273             :       }
   40274             :     }
   40275             : #endif
   40276             :   }
   40277         635 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40278         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; } }
   40279             :   return resultobj;
   40280             : fail:
   40281             :   return NULL;
   40282             : }
   40283             : 
   40284             : 
   40285          21 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40286          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40287          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40288          21 :   GIntBig arg2 ;
   40289          21 :   void *argp1 = 0 ;
   40290          21 :   int res1 = 0 ;
   40291          21 :   PyObject *swig_obj[2] ;
   40292          21 :   CPLErr result;
   40293             :   
   40294          21 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsInt64", 2, 2, swig_obj)) SWIG_fail;
   40295          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40296          21 :   if (!SWIG_IsOK(res1)) {
   40297           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40298             :   }
   40299          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40300          21 :   {
   40301          21 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   40302             :   }
   40303          21 :   {
   40304          21 :     const int bLocalUseExceptions = GetUseExceptions();
   40305          21 :     if ( bLocalUseExceptions ) {
   40306          10 :       pushErrorHandler();
   40307             :     }
   40308          21 :     {
   40309          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40310          21 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsInt64(arg1,arg2);
   40311          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40312             :     }
   40313          21 :     if ( bLocalUseExceptions ) {
   40314          10 :       popErrorHandler();
   40315             :     }
   40316             : #ifndef SED_HACKS
   40317             :     if ( bLocalUseExceptions ) {
   40318             :       CPLErr eclass = CPLGetLastErrorType();
   40319             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40320             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40321             :       }
   40322             :     }
   40323             : #endif
   40324             :   }
   40325          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40326          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; } }
   40327             :   return resultobj;
   40328             : fail:
   40329             :   return NULL;
   40330             : }
   40331             : 
   40332             : 
   40333          20 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40334          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40335          20 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40336          20 :   GUIntBig arg2 ;
   40337          20 :   void *argp1 = 0 ;
   40338          20 :   int res1 = 0 ;
   40339          20 :   PyObject *swig_obj[2] ;
   40340          20 :   CPLErr result;
   40341             :   
   40342          20 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsUInt64", 2, 2, swig_obj)) SWIG_fail;
   40343          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40344          20 :   if (!SWIG_IsOK(res1)) {
   40345           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40346             :   }
   40347          20 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40348          20 :   {
   40349          20 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   40350             :   }
   40351          20 :   {
   40352          20 :     const int bLocalUseExceptions = GetUseExceptions();
   40353          20 :     if ( bLocalUseExceptions ) {
   40354           9 :       pushErrorHandler();
   40355             :     }
   40356          20 :     {
   40357          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40358          20 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsUInt64(arg1,arg2);
   40359          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40360             :     }
   40361          20 :     if ( bLocalUseExceptions ) {
   40362           9 :       popErrorHandler();
   40363             :     }
   40364             : #ifndef SED_HACKS
   40365             :     if ( bLocalUseExceptions ) {
   40366             :       CPLErr eclass = CPLGetLastErrorType();
   40367             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40368             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40369             :       }
   40370             :     }
   40371             : #endif
   40372             :   }
   40373          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40374          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; } }
   40375             :   return resultobj;
   40376             : fail:
   40377             :   return NULL;
   40378             : }
   40379             : 
   40380             : 
   40381          53 : SWIGINTERN PyObject *_wrap_Band_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40382          53 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40383          53 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40384          53 :   void *argp1 = 0 ;
   40385          53 :   int res1 = 0 ;
   40386          53 :   PyObject *swig_obj[1] ;
   40387          53 :   CPLErr result;
   40388             :   
   40389          53 :   if (!args) SWIG_fail;
   40390          53 :   swig_obj[0] = args;
   40391          53 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40392          53 :   if (!SWIG_IsOK(res1)) {
   40393           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DeleteNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40394             :   }
   40395          53 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40396          53 :   {
   40397          53 :     const int bLocalUseExceptions = GetUseExceptions();
   40398          53 :     if ( bLocalUseExceptions ) {
   40399          42 :       pushErrorHandler();
   40400             :     }
   40401          53 :     {
   40402          53 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40403          53 :       result = (CPLErr)GDALRasterBandShadow_DeleteNoDataValue(arg1);
   40404          53 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40405             :     }
   40406          53 :     if ( bLocalUseExceptions ) {
   40407          42 :       popErrorHandler();
   40408             :     }
   40409             : #ifndef SED_HACKS
   40410             :     if ( bLocalUseExceptions ) {
   40411             :       CPLErr eclass = CPLGetLastErrorType();
   40412             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40413             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40414             :       }
   40415             :     }
   40416             : #endif
   40417             :   }
   40418          53 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40419          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; } }
   40420             :   return resultobj;
   40421             : fail:
   40422             :   return NULL;
   40423             : }
   40424             : 
   40425             : 
   40426          69 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40427          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40428          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40429          69 :   void *argp1 = 0 ;
   40430          69 :   int res1 = 0 ;
   40431          69 :   PyObject *swig_obj[1] ;
   40432          69 :   char *result = 0 ;
   40433             :   
   40434          69 :   if (!args) SWIG_fail;
   40435          69 :   swig_obj[0] = args;
   40436          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40437          69 :   if (!SWIG_IsOK(res1)) {
   40438           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40439             :   }
   40440          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40441          69 :   {
   40442          69 :     const int bLocalUseExceptions = GetUseExceptions();
   40443          69 :     if ( bLocalUseExceptions ) {
   40444          38 :       pushErrorHandler();
   40445             :     }
   40446          69 :     {
   40447          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40448          69 :       result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   40449          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40450             :     }
   40451          69 :     if ( bLocalUseExceptions ) {
   40452          38 :       popErrorHandler();
   40453             :     }
   40454             : #ifndef SED_HACKS
   40455             :     if ( bLocalUseExceptions ) {
   40456             :       CPLErr eclass = CPLGetLastErrorType();
   40457             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40458             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40459             :       }
   40460             :     }
   40461             : #endif
   40462             :   }
   40463          69 :   resultobj = SWIG_FromCharPtr((const char *)result);
   40464          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; } }
   40465             :   return resultobj;
   40466             : fail:
   40467             :   return NULL;
   40468             : }
   40469             : 
   40470             : 
   40471          38 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40472          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40473          38 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40474          38 :   char *arg2 = (char *) 0 ;
   40475          38 :   void *argp1 = 0 ;
   40476          38 :   int res1 = 0 ;
   40477          38 :   int res2 ;
   40478          38 :   char *buf2 = 0 ;
   40479          38 :   int alloc2 = 0 ;
   40480          38 :   PyObject *swig_obj[2] ;
   40481          38 :   CPLErr result;
   40482             :   
   40483          38 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetUnitType", 2, 2, swig_obj)) SWIG_fail;
   40484          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40485          38 :   if (!SWIG_IsOK(res1)) {
   40486           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40487             :   }
   40488          38 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40489          38 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   40490          38 :   if (!SWIG_IsOK(res2)) {
   40491           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   40492             :   }
   40493          38 :   arg2 = reinterpret_cast< char * >(buf2);
   40494          38 :   {
   40495          38 :     const int bLocalUseExceptions = GetUseExceptions();
   40496          38 :     if ( bLocalUseExceptions ) {
   40497          18 :       pushErrorHandler();
   40498             :     }
   40499          38 :     {
   40500          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40501          38 :       result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
   40502          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40503             :     }
   40504          38 :     if ( bLocalUseExceptions ) {
   40505          18 :       popErrorHandler();
   40506             :     }
   40507             : #ifndef SED_HACKS
   40508             :     if ( bLocalUseExceptions ) {
   40509             :       CPLErr eclass = CPLGetLastErrorType();
   40510             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40511             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40512             :       }
   40513             :     }
   40514             : #endif
   40515             :   }
   40516          38 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40517          38 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40518          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; } }
   40519             :   return resultobj;
   40520           0 : fail:
   40521           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40522             :   return NULL;
   40523             : }
   40524             : 
   40525             : 
   40526          17 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40527          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40528          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40529          17 :   void *argp1 = 0 ;
   40530          17 :   int res1 = 0 ;
   40531          17 :   PyObject *swig_obj[1] ;
   40532          17 :   char **result = 0 ;
   40533             :   
   40534          17 :   if (!args) SWIG_fail;
   40535          17 :   swig_obj[0] = args;
   40536          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40537          17 :   if (!SWIG_IsOK(res1)) {
   40538           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40539             :   }
   40540          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40541          17 :   {
   40542          17 :     const int bLocalUseExceptions = GetUseExceptions();
   40543          17 :     if ( bLocalUseExceptions ) {
   40544           0 :       pushErrorHandler();
   40545             :     }
   40546          17 :     {
   40547          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40548          17 :       result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   40549          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40550             :     }
   40551          17 :     if ( bLocalUseExceptions ) {
   40552           0 :       popErrorHandler();
   40553             :     }
   40554             : #ifndef SED_HACKS
   40555             :     if ( bLocalUseExceptions ) {
   40556             :       CPLErr eclass = CPLGetLastErrorType();
   40557             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40558             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40559             :       }
   40560             :     }
   40561             : #endif
   40562             :   }
   40563          17 :   {
   40564             :     /* %typemap(out) char **options -> ( string ) */
   40565          17 :     bool bErr = false;
   40566          17 :     resultobj = CSLToList(result, &bErr);
   40567          17 :     if( bErr ) {
   40568           0 :       SWIG_fail;
   40569             :     }
   40570             :   }
   40571          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; } }
   40572             :   return resultobj;
   40573             : fail:
   40574             :   return NULL;
   40575             : }
   40576             : 
   40577             : 
   40578           0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40579           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40580           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40581           0 :   char **arg2 = (char **) 0 ;
   40582           0 :   void *argp1 = 0 ;
   40583           0 :   int res1 = 0 ;
   40584           0 :   PyObject *swig_obj[2] ;
   40585           0 :   CPLErr result;
   40586             :   
   40587           0 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   40588           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40589           0 :   if (!SWIG_IsOK(res1)) {
   40590           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40591             :   }
   40592           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40593           0 :   {
   40594             :     /* %typemap(in) char **dict */
   40595           0 :     arg2 = NULL;
   40596           0 :     if ( PySequence_Check( swig_obj[1] ) ) {
   40597           0 :       int bErr = FALSE;
   40598           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   40599           0 :       if ( bErr )
   40600             :       {
   40601           0 :         SWIG_fail;
   40602             :       }
   40603             :     }
   40604           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   40605           0 :       int bErr = FALSE;
   40606           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   40607           0 :       if ( bErr )
   40608             :       {
   40609           0 :         SWIG_fail;
   40610             :       }
   40611             :     }
   40612             :     else {
   40613           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   40614           0 :       SWIG_fail;
   40615             :     }
   40616             :   }
   40617           0 :   {
   40618           0 :     const int bLocalUseExceptions = GetUseExceptions();
   40619           0 :     if ( bLocalUseExceptions ) {
   40620           0 :       pushErrorHandler();
   40621             :     }
   40622           0 :     {
   40623           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40624           0 :       result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
   40625           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40626             :     }
   40627           0 :     if ( bLocalUseExceptions ) {
   40628           0 :       popErrorHandler();
   40629             :     }
   40630             : #ifndef SED_HACKS
   40631             :     if ( bLocalUseExceptions ) {
   40632             :       CPLErr eclass = CPLGetLastErrorType();
   40633             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40634             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40635             :       }
   40636             :     }
   40637             : #endif
   40638             :   }
   40639           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40640           0 :   {
   40641             :     /* %typemap(freearg) char **dict */
   40642           0 :     CSLDestroy( arg2 );
   40643             :   }
   40644           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; } }
   40645             :   return resultobj;
   40646           0 : fail:
   40647           0 :   {
   40648             :     /* %typemap(freearg) char **dict */
   40649           0 :     CSLDestroy( arg2 );
   40650             :   }
   40651             :   return NULL;
   40652             : }
   40653             : 
   40654             : 
   40655          97 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40656          97 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40657          97 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40658          97 :   double *arg2 = (double *) 0 ;
   40659          97 :   int *arg3 = (int *) 0 ;
   40660          97 :   void *argp1 = 0 ;
   40661          97 :   int res1 = 0 ;
   40662          97 :   double tmpval2 ;
   40663          97 :   int tmphasval2 ;
   40664          97 :   PyObject *swig_obj[1] ;
   40665             :   
   40666          97 :   {
   40667             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40668          97 :     arg2 = &tmpval2;
   40669          97 :     arg3 = &tmphasval2;
   40670             :   }
   40671          97 :   if (!args) SWIG_fail;
   40672          97 :   swig_obj[0] = args;
   40673          97 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40674          97 :   if (!SWIG_IsOK(res1)) {
   40675           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40676             :   }
   40677          97 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40678          97 :   {
   40679          97 :     const int bLocalUseExceptions = GetUseExceptions();
   40680          97 :     if ( bLocalUseExceptions ) {
   40681          61 :       pushErrorHandler();
   40682             :     }
   40683          97 :     {
   40684          97 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40685          97 :       GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   40686          97 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40687             :     }
   40688          97 :     if ( bLocalUseExceptions ) {
   40689          61 :       popErrorHandler();
   40690             :     }
   40691             : #ifndef SED_HACKS
   40692             :     if ( bLocalUseExceptions ) {
   40693             :       CPLErr eclass = CPLGetLastErrorType();
   40694             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40695             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40696             :       }
   40697             :     }
   40698             : #endif
   40699             :   }
   40700          97 :   resultobj = SWIG_Py_Void();
   40701          97 :   {
   40702             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40703          97 :     PyObject *r;
   40704          97 :     if ( !*arg3 ) {
   40705          28 :       Py_INCREF(Py_None);
   40706          28 :       r = Py_None;
   40707             :     }
   40708             :     else {
   40709          69 :       r = PyFloat_FromDouble( *arg2 );
   40710             :     }
   40711             : #if SWIG_VERSION >= 0x040300
   40712             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40713             : #else
   40714          97 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40715             : #endif
   40716             :   }
   40717          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; } }
   40718             :   return resultobj;
   40719             : fail:
   40720             :   return NULL;
   40721             : }
   40722             : 
   40723             : 
   40724          87 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40725          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40726          87 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40727          87 :   double *arg2 = (double *) 0 ;
   40728          87 :   int *arg3 = (int *) 0 ;
   40729          87 :   void *argp1 = 0 ;
   40730          87 :   int res1 = 0 ;
   40731          87 :   double tmpval2 ;
   40732          87 :   int tmphasval2 ;
   40733          87 :   PyObject *swig_obj[1] ;
   40734             :   
   40735          87 :   {
   40736             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40737          87 :     arg2 = &tmpval2;
   40738          87 :     arg3 = &tmphasval2;
   40739             :   }
   40740          87 :   if (!args) SWIG_fail;
   40741          87 :   swig_obj[0] = args;
   40742          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40743          87 :   if (!SWIG_IsOK(res1)) {
   40744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40745             :   }
   40746          87 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40747          87 :   {
   40748          87 :     const int bLocalUseExceptions = GetUseExceptions();
   40749          87 :     if ( bLocalUseExceptions ) {
   40750          57 :       pushErrorHandler();
   40751             :     }
   40752          87 :     {
   40753          87 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40754          87 :       GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   40755          87 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40756             :     }
   40757          87 :     if ( bLocalUseExceptions ) {
   40758          57 :       popErrorHandler();
   40759             :     }
   40760             : #ifndef SED_HACKS
   40761             :     if ( bLocalUseExceptions ) {
   40762             :       CPLErr eclass = CPLGetLastErrorType();
   40763             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40764             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40765             :       }
   40766             :     }
   40767             : #endif
   40768             :   }
   40769          87 :   resultobj = SWIG_Py_Void();
   40770          87 :   {
   40771             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40772          87 :     PyObject *r;
   40773          87 :     if ( !*arg3 ) {
   40774          25 :       Py_INCREF(Py_None);
   40775          25 :       r = Py_None;
   40776             :     }
   40777             :     else {
   40778          62 :       r = PyFloat_FromDouble( *arg2 );
   40779             :     }
   40780             : #if SWIG_VERSION >= 0x040300
   40781             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40782             : #else
   40783          87 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40784             : #endif
   40785             :   }
   40786          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; } }
   40787             :   return resultobj;
   40788             : fail:
   40789             :   return NULL;
   40790             : }
   40791             : 
   40792             : 
   40793         151 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40794         151 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40795         151 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40796         151 :   double *arg2 = (double *) 0 ;
   40797         151 :   int *arg3 = (int *) 0 ;
   40798         151 :   void *argp1 = 0 ;
   40799         151 :   int res1 = 0 ;
   40800         151 :   double tmpval2 ;
   40801         151 :   int tmphasval2 ;
   40802         151 :   PyObject *swig_obj[1] ;
   40803             :   
   40804         151 :   {
   40805             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40806         151 :     arg2 = &tmpval2;
   40807         151 :     arg3 = &tmphasval2;
   40808             :   }
   40809         151 :   if (!args) SWIG_fail;
   40810         151 :   swig_obj[0] = args;
   40811         151 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40812         151 :   if (!SWIG_IsOK(res1)) {
   40813           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40814             :   }
   40815         151 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40816         151 :   {
   40817         151 :     const int bLocalUseExceptions = GetUseExceptions();
   40818         151 :     if ( bLocalUseExceptions ) {
   40819          98 :       pushErrorHandler();
   40820             :     }
   40821         151 :     {
   40822         151 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40823         151 :       GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   40824         151 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40825             :     }
   40826         151 :     if ( bLocalUseExceptions ) {
   40827          98 :       popErrorHandler();
   40828             :     }
   40829             : #ifndef SED_HACKS
   40830             :     if ( bLocalUseExceptions ) {
   40831             :       CPLErr eclass = CPLGetLastErrorType();
   40832             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40833             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40834             :       }
   40835             :     }
   40836             : #endif
   40837             :   }
   40838         151 :   resultobj = SWIG_Py_Void();
   40839         151 :   {
   40840             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40841         151 :     PyObject *r;
   40842         151 :     if ( !*arg3 ) {
   40843          47 :       Py_INCREF(Py_None);
   40844          47 :       r = Py_None;
   40845             :     }
   40846             :     else {
   40847         104 :       r = PyFloat_FromDouble( *arg2 );
   40848             :     }
   40849             : #if SWIG_VERSION >= 0x040300
   40850             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40851             : #else
   40852         151 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40853             : #endif
   40854             :   }
   40855         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; } }
   40856             :   return resultobj;
   40857             : fail:
   40858             :   return NULL;
   40859             : }
   40860             : 
   40861             : 
   40862         149 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40863         149 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40864         149 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40865         149 :   double *arg2 = (double *) 0 ;
   40866         149 :   int *arg3 = (int *) 0 ;
   40867         149 :   void *argp1 = 0 ;
   40868         149 :   int res1 = 0 ;
   40869         149 :   double tmpval2 ;
   40870         149 :   int tmphasval2 ;
   40871         149 :   PyObject *swig_obj[1] ;
   40872             :   
   40873         149 :   {
   40874             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40875         149 :     arg2 = &tmpval2;
   40876         149 :     arg3 = &tmphasval2;
   40877             :   }
   40878         149 :   if (!args) SWIG_fail;
   40879         149 :   swig_obj[0] = args;
   40880         149 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40881         149 :   if (!SWIG_IsOK(res1)) {
   40882           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40883             :   }
   40884         149 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40885         149 :   {
   40886         149 :     const int bLocalUseExceptions = GetUseExceptions();
   40887         149 :     if ( bLocalUseExceptions ) {
   40888          97 :       pushErrorHandler();
   40889             :     }
   40890         149 :     {
   40891         149 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40892         149 :       GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   40893         149 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40894             :     }
   40895         149 :     if ( bLocalUseExceptions ) {
   40896          97 :       popErrorHandler();
   40897             :     }
   40898             : #ifndef SED_HACKS
   40899             :     if ( bLocalUseExceptions ) {
   40900             :       CPLErr eclass = CPLGetLastErrorType();
   40901             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40902             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40903             :       }
   40904             :     }
   40905             : #endif
   40906             :   }
   40907         149 :   resultobj = SWIG_Py_Void();
   40908         149 :   {
   40909             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40910         149 :     PyObject *r;
   40911         149 :     if ( !*arg3 ) {
   40912          47 :       Py_INCREF(Py_None);
   40913          47 :       r = Py_None;
   40914             :     }
   40915             :     else {
   40916         102 :       r = PyFloat_FromDouble( *arg2 );
   40917             :     }
   40918             : #if SWIG_VERSION >= 0x040300
   40919             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40920             : #else
   40921         149 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40922             : #endif
   40923             :   }
   40924         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; } }
   40925             :   return resultobj;
   40926             : fail:
   40927             :   return NULL;
   40928             : }
   40929             : 
   40930             : 
   40931          86 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40932          86 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40933          86 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40934          86 :   double arg2 ;
   40935          86 :   void *argp1 = 0 ;
   40936          86 :   int res1 = 0 ;
   40937          86 :   double val2 ;
   40938          86 :   int ecode2 = 0 ;
   40939          86 :   PyObject *swig_obj[2] ;
   40940          86 :   CPLErr result;
   40941             :   
   40942          86 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetOffset", 2, 2, swig_obj)) SWIG_fail;
   40943          86 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40944          86 :   if (!SWIG_IsOK(res1)) {
   40945           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40946             :   }
   40947          86 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40948          86 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40949          86 :   if (!SWIG_IsOK(ecode2)) {
   40950           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   40951             :   } 
   40952          86 :   arg2 = static_cast< double >(val2);
   40953          86 :   {
   40954          86 :     const int bLocalUseExceptions = GetUseExceptions();
   40955          86 :     if ( bLocalUseExceptions ) {
   40956          64 :       pushErrorHandler();
   40957             :     }
   40958          86 :     {
   40959          86 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40960          86 :       result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
   40961          86 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40962             :     }
   40963          86 :     if ( bLocalUseExceptions ) {
   40964          64 :       popErrorHandler();
   40965             :     }
   40966             : #ifndef SED_HACKS
   40967             :     if ( bLocalUseExceptions ) {
   40968             :       CPLErr eclass = CPLGetLastErrorType();
   40969             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40970             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40971             :       }
   40972             :     }
   40973             : #endif
   40974             :   }
   40975          86 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40976          86 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40977             :   return resultobj;
   40978             : fail:
   40979             :   return NULL;
   40980             : }
   40981             : 
   40982             : 
   40983          87 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40984          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40985          87 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40986          87 :   double arg2 ;
   40987          87 :   void *argp1 = 0 ;
   40988          87 :   int res1 = 0 ;
   40989          87 :   double val2 ;
   40990          87 :   int ecode2 = 0 ;
   40991          87 :   PyObject *swig_obj[2] ;
   40992          87 :   CPLErr result;
   40993             :   
   40994          87 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetScale", 2, 2, swig_obj)) SWIG_fail;
   40995          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40996          87 :   if (!SWIG_IsOK(res1)) {
   40997           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40998             :   }
   40999          87 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41000          87 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41001          87 :   if (!SWIG_IsOK(ecode2)) {
   41002           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   41003             :   } 
   41004          87 :   arg2 = static_cast< double >(val2);
   41005          87 :   {
   41006          87 :     const int bLocalUseExceptions = GetUseExceptions();
   41007          87 :     if ( bLocalUseExceptions ) {
   41008          64 :       pushErrorHandler();
   41009             :     }
   41010          87 :     {
   41011          87 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41012          87 :       result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
   41013          87 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41014             :     }
   41015          87 :     if ( bLocalUseExceptions ) {
   41016          64 :       popErrorHandler();
   41017             :     }
   41018             : #ifndef SED_HACKS
   41019             :     if ( bLocalUseExceptions ) {
   41020             :       CPLErr eclass = CPLGetLastErrorType();
   41021             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41022             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41023             :       }
   41024             :     }
   41025             : #endif
   41026             :   }
   41027          87 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41028          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; } }
   41029             :   return resultobj;
   41030             : fail:
   41031             :   return NULL;
   41032             : }
   41033             : 
   41034             : 
   41035         136 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41036         136 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41037         136 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41038         136 :   int arg2 ;
   41039         136 :   int arg3 ;
   41040         136 :   double *arg4 = (double *) 0 ;
   41041         136 :   double *arg5 = (double *) 0 ;
   41042         136 :   double *arg6 = (double *) 0 ;
   41043         136 :   double *arg7 = (double *) 0 ;
   41044         136 :   void *argp1 = 0 ;
   41045         136 :   int res1 = 0 ;
   41046         136 :   int val2 ;
   41047         136 :   int ecode2 = 0 ;
   41048         136 :   int val3 ;
   41049         136 :   int ecode3 = 0 ;
   41050         136 :   double temp4 ;
   41051         136 :   int res4 = SWIG_TMPOBJ ;
   41052         136 :   double temp5 ;
   41053         136 :   int res5 = SWIG_TMPOBJ ;
   41054         136 :   double temp6 ;
   41055         136 :   int res6 = SWIG_TMPOBJ ;
   41056         136 :   double temp7 ;
   41057         136 :   int res7 = SWIG_TMPOBJ ;
   41058         136 :   PyObject *swig_obj[3] ;
   41059         136 :   CPLErr result;
   41060             :   
   41061         136 :   arg4 = &temp4;
   41062         136 :   arg5 = &temp5;
   41063         136 :   arg6 = &temp6;
   41064         136 :   arg7 = &temp7;
   41065         136 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetStatistics", 3, 3, swig_obj)) SWIG_fail;
   41066         136 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41067         136 :   if (!SWIG_IsOK(res1)) {
   41068           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41069             :   }
   41070         136 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41071         136 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   41072         136 :   if (!SWIG_IsOK(ecode2)) {
   41073           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   41074             :   } 
   41075         136 :   arg2 = static_cast< int >(val2);
   41076         136 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   41077         136 :   if (!SWIG_IsOK(ecode3)) {
   41078           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   41079             :   } 
   41080         136 :   arg3 = static_cast< int >(val3);
   41081         136 :   {
   41082         136 :     const int bLocalUseExceptions = GetUseExceptions();
   41083         136 :     if ( bLocalUseExceptions ) {
   41084         104 :       pushErrorHandler();
   41085             :     }
   41086         136 :     {
   41087         136 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41088         136 :       result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   41089         136 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41090             :     }
   41091         136 :     if ( bLocalUseExceptions ) {
   41092         104 :       popErrorHandler();
   41093             :     }
   41094             : #ifndef SED_HACKS
   41095             :     if ( bLocalUseExceptions ) {
   41096             :       CPLErr eclass = CPLGetLastErrorType();
   41097             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41098             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41099             :       }
   41100             :     }
   41101             : #endif
   41102             :   }
   41103         136 :   {
   41104             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   41105             :   }
   41106         136 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   41107         136 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   41108             :   } else {
   41109           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41110           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   41111             :   }
   41112         136 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   41113         136 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   41114             :   } else {
   41115           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41116           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   41117             :   }
   41118         136 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   41119         136 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   41120             :   } else {
   41121           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41122           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   41123             :   }
   41124         136 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   41125         136 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   41126             :   } else {
   41127           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41128           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   41129             :   }
   41130         136 :   {
   41131             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   41132         136 :     if (result != CE_None ) {
   41133          29 :       Py_XDECREF( resultobj );
   41134          29 :       resultobj = Py_None;
   41135          29 :       Py_INCREF(resultobj);
   41136             :     }
   41137             :   }
   41138         140 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41139             :   return resultobj;
   41140             : fail:
   41141             :   return NULL;
   41142             : }
   41143             : 
   41144             : 
   41145         168 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41146         168 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41147         168 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41148         168 :   bool arg2 ;
   41149         168 :   double *arg3 = (double *) 0 ;
   41150         168 :   double *arg4 = (double *) 0 ;
   41151         168 :   double *arg5 = (double *) 0 ;
   41152         168 :   double *arg6 = (double *) 0 ;
   41153         168 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   41154         168 :   void *arg8 = (void *) NULL ;
   41155         168 :   void *argp1 = 0 ;
   41156         168 :   int res1 = 0 ;
   41157         168 :   bool val2 ;
   41158         168 :   int ecode2 = 0 ;
   41159         168 :   double temp3 ;
   41160         168 :   int res3 = SWIG_TMPOBJ ;
   41161         168 :   double temp4 ;
   41162         168 :   int res4 = SWIG_TMPOBJ ;
   41163         168 :   double temp5 ;
   41164         168 :   int res5 = SWIG_TMPOBJ ;
   41165         168 :   double temp6 ;
   41166         168 :   int res6 = SWIG_TMPOBJ ;
   41167         168 :   PyObject * obj0 = 0 ;
   41168         168 :   PyObject * obj1 = 0 ;
   41169         168 :   PyObject * obj2 = 0 ;
   41170         168 :   PyObject * obj3 = 0 ;
   41171         168 :   char * kwnames[] = {
   41172             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   41173             :   };
   41174         168 :   CPLErr result;
   41175             :   
   41176             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   41177         168 :   PyProgressData *psProgressInfo;
   41178         168 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   41179         168 :   psProgressInfo->nLastReported = -1;
   41180         168 :   psProgressInfo->psPyCallback = NULL;
   41181         168 :   psProgressInfo->psPyCallbackData = NULL;
   41182         168 :   arg8 = psProgressInfo;
   41183         168 :   arg3 = &temp3;
   41184         168 :   arg4 = &temp4;
   41185         168 :   arg5 = &temp5;
   41186         168 :   arg6 = &temp6;
   41187         168 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Band_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   41188         168 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41189         168 :   if (!SWIG_IsOK(res1)) {
   41190           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41191             :   }
   41192         168 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41193         168 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   41194         168 :   if (!SWIG_IsOK(ecode2)) {
   41195           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   41196             :   } 
   41197         168 :   arg2 = static_cast< bool >(val2);
   41198         168 :   if (obj2) {
   41199           3 :     {
   41200             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   41201             :       /* callback_func typemap */
   41202             :       
   41203             :       /* In some cases 0 is passed instead of None. */
   41204             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   41205           3 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   41206             :       {
   41207           0 :         if( PyLong_AsLong(obj2) == 0 )
   41208             :         {
   41209           0 :           obj2 = Py_None;
   41210             :         }
   41211             :       }
   41212             :       
   41213           3 :       if (obj2 && obj2 != Py_None ) {
   41214           3 :         void* cbfunction = NULL;
   41215           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   41216             :             (void**)&cbfunction,
   41217             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   41218             :             SWIG_POINTER_EXCEPTION | 0 ));
   41219             :         
   41220           3 :         if ( cbfunction == GDALTermProgress ) {
   41221             :           arg7 = GDALTermProgress;
   41222             :         } else {
   41223           3 :           if (!PyCallable_Check(obj2)) {
   41224           0 :             PyErr_SetString( PyExc_RuntimeError,
   41225             :               "Object given is not a Python function" );
   41226           0 :             SWIG_fail;
   41227             :           }
   41228           3 :           psProgressInfo->psPyCallback = obj2;
   41229           3 :           arg7 = PyProgressProxy;
   41230             :         }
   41231             :         
   41232             :       }
   41233             :       
   41234             :     }
   41235             :   }
   41236         168 :   if (obj3) {
   41237           3 :     {
   41238             :       /* %typemap(in) ( void* callback_data=NULL)  */
   41239           3 :       psProgressInfo->psPyCallbackData = obj3 ;
   41240             :     }
   41241             :   }
   41242         168 :   {
   41243         168 :     const int bLocalUseExceptions = GetUseExceptions();
   41244         168 :     if ( bLocalUseExceptions ) {
   41245          83 :       pushErrorHandler();
   41246             :     }
   41247         168 :     {
   41248         168 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41249         168 :       result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   41250         168 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41251             :     }
   41252         168 :     if ( bLocalUseExceptions ) {
   41253          83 :       popErrorHandler();
   41254             :     }
   41255             : #ifndef SED_HACKS
   41256             :     if ( bLocalUseExceptions ) {
   41257             :       CPLErr eclass = CPLGetLastErrorType();
   41258             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41259             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41260             :       }
   41261             :     }
   41262             : #endif
   41263             :   }
   41264         168 :   {
   41265             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   41266             :   }
   41267         168 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   41268         168 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   41269             :   } else {
   41270           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41271           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   41272             :   }
   41273         168 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   41274         168 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   41275             :   } else {
   41276           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41277           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   41278             :   }
   41279         168 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   41280         168 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   41281             :   } else {
   41282           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41283           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   41284             :   }
   41285         168 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   41286         168 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   41287             :   } else {
   41288           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41289           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   41290             :   }
   41291         168 :   {
   41292             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   41293             :     
   41294         168 :     CPLFree(psProgressInfo);
   41295             :     
   41296             :   }
   41297         168 :   {
   41298             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   41299         168 :     if (result != CE_None ) {
   41300           1 :       Py_XDECREF( resultobj );
   41301           1 :       resultobj = Py_None;
   41302           1 :       Py_INCREF(resultobj);
   41303             :     }
   41304             :   }
   41305         168 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = 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           0 : fail:
   41308           0 :   {
   41309             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   41310             :     
   41311           0 :     CPLFree(psProgressInfo);
   41312             :     
   41313             :   }
   41314             :   return NULL;
   41315             : }
   41316             : 
   41317             : 
   41318           2 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41319           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41320           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41321           2 :   double arg2 ;
   41322           2 :   double arg3 ;
   41323           2 :   double arg4 ;
   41324           2 :   double arg5 ;
   41325           2 :   void *argp1 = 0 ;
   41326           2 :   int res1 = 0 ;
   41327           2 :   double val2 ;
   41328           2 :   int ecode2 = 0 ;
   41329           2 :   double val3 ;
   41330           2 :   int ecode3 = 0 ;
   41331           2 :   double val4 ;
   41332           2 :   int ecode4 = 0 ;
   41333           2 :   double val5 ;
   41334           2 :   int ecode5 = 0 ;
   41335           2 :   PyObject *swig_obj[5] ;
   41336           2 :   CPLErr result;
   41337             :   
   41338           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetStatistics", 5, 5, swig_obj)) SWIG_fail;
   41339           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41340           2 :   if (!SWIG_IsOK(res1)) {
   41341           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41342             :   }
   41343           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41344           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41345           2 :   if (!SWIG_IsOK(ecode2)) {
   41346           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   41347             :   } 
   41348           2 :   arg2 = static_cast< double >(val2);
   41349           2 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   41350           2 :   if (!SWIG_IsOK(ecode3)) {
   41351           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   41352             :   } 
   41353           2 :   arg3 = static_cast< double >(val3);
   41354           2 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   41355           2 :   if (!SWIG_IsOK(ecode4)) {
   41356           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   41357             :   } 
   41358           2 :   arg4 = static_cast< double >(val4);
   41359           2 :   ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   41360           2 :   if (!SWIG_IsOK(ecode5)) {
   41361           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   41362             :   } 
   41363           2 :   arg5 = static_cast< double >(val5);
   41364           2 :   {
   41365           2 :     const int bLocalUseExceptions = GetUseExceptions();
   41366           2 :     if ( bLocalUseExceptions ) {
   41367           2 :       pushErrorHandler();
   41368             :     }
   41369           2 :     {
   41370           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41371           2 :       result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
   41372           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41373             :     }
   41374           2 :     if ( bLocalUseExceptions ) {
   41375           2 :       popErrorHandler();
   41376             :     }
   41377             : #ifndef SED_HACKS
   41378             :     if ( bLocalUseExceptions ) {
   41379             :       CPLErr eclass = CPLGetLastErrorType();
   41380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41382             :       }
   41383             :     }
   41384             : #endif
   41385             :   }
   41386           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41387           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; } }
   41388             :   return resultobj;
   41389             : fail:
   41390             :   return NULL;
   41391             : }
   41392             : 
   41393             : 
   41394         535 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41395         535 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41396         535 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41397         535 :   void *argp1 = 0 ;
   41398         535 :   int res1 = 0 ;
   41399         535 :   PyObject *swig_obj[1] ;
   41400         535 :   int result;
   41401             :   
   41402         535 :   if (!args) SWIG_fail;
   41403         535 :   swig_obj[0] = args;
   41404         535 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41405         535 :   if (!SWIG_IsOK(res1)) {
   41406           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41407             :   }
   41408         535 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41409         535 :   {
   41410         535 :     const int bLocalUseExceptions = GetUseExceptions();
   41411         535 :     if ( bLocalUseExceptions ) {
   41412         344 :       pushErrorHandler();
   41413             :     }
   41414         535 :     {
   41415         535 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41416         535 :       result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   41417         535 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41418             :     }
   41419         535 :     if ( bLocalUseExceptions ) {
   41420         344 :       popErrorHandler();
   41421             :     }
   41422             : #ifndef SED_HACKS
   41423             :     if ( bLocalUseExceptions ) {
   41424             :       CPLErr eclass = CPLGetLastErrorType();
   41425             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41426             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41427             :       }
   41428             :     }
   41429             : #endif
   41430             :   }
   41431         535 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41432         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; } }
   41433             :   return resultobj;
   41434             : fail:
   41435             :   return NULL;
   41436             : }
   41437             : 
   41438             : 
   41439        5612 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41440        5612 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41441        5612 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41442        5612 :   int arg2 ;
   41443        5612 :   void *argp1 = 0 ;
   41444        5612 :   int res1 = 0 ;
   41445        5612 :   int val2 ;
   41446        5612 :   int ecode2 = 0 ;
   41447        5612 :   PyObject *swig_obj[2] ;
   41448        5612 :   GDALRasterBandShadow *result = 0 ;
   41449             :   
   41450        5612 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetOverview", 2, 2, swig_obj)) SWIG_fail;
   41451        5612 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41452        5612 :   if (!SWIG_IsOK(res1)) {
   41453           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41454             :   }
   41455        5612 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41456        5612 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   41457        5612 :   if (!SWIG_IsOK(ecode2)) {
   41458           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   41459             :   } 
   41460        5612 :   arg2 = static_cast< int >(val2);
   41461        5612 :   {
   41462        5612 :     const int bLocalUseExceptions = GetUseExceptions();
   41463        5612 :     if ( bLocalUseExceptions ) {
   41464        4599 :       pushErrorHandler();
   41465             :     }
   41466        5612 :     {
   41467        5612 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41468        5612 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   41469        5612 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41470             :     }
   41471        5612 :     if ( bLocalUseExceptions ) {
   41472        4599 :       popErrorHandler();
   41473             :     }
   41474             : #ifndef SED_HACKS
   41475             :     if ( bLocalUseExceptions ) {
   41476             :       CPLErr eclass = CPLGetLastErrorType();
   41477             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41478             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41479             :       }
   41480             :     }
   41481             : #endif
   41482             :   }
   41483        5612 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41484        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; } }
   41485             :   return resultobj;
   41486             : fail:
   41487             :   return NULL;
   41488             : }
   41489             : 
   41490             : 
   41491        2000 : SWIGINTERN PyObject *_wrap_Band_GetSampleOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41492        2000 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41493        2000 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41494        2000 :   GUIntBig arg2 ;
   41495        2000 :   void *argp1 = 0 ;
   41496        2000 :   int res1 = 0 ;
   41497        2000 :   PyObject *swig_obj[2] ;
   41498        2000 :   GDALRasterBandShadow *result = 0 ;
   41499             :   
   41500        2000 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetSampleOverview", 2, 2, swig_obj)) SWIG_fail;
   41501        2000 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41502        2000 :   if (!SWIG_IsOK(res1)) {
   41503           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetSampleOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41504             :   }
   41505        2000 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41506        2000 :   {
   41507        2000 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   41508             :   }
   41509        2000 :   {
   41510        2000 :     const int bLocalUseExceptions = GetUseExceptions();
   41511        2000 :     if ( bLocalUseExceptions ) {
   41512        2000 :       pushErrorHandler();
   41513             :     }
   41514        2000 :     {
   41515        2000 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41516        2000 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetSampleOverview(arg1,arg2);
   41517        2000 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41518             :     }
   41519        2000 :     if ( bLocalUseExceptions ) {
   41520        2000 :       popErrorHandler();
   41521             :     }
   41522             : #ifndef SED_HACKS
   41523             :     if ( bLocalUseExceptions ) {
   41524             :       CPLErr eclass = CPLGetLastErrorType();
   41525             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41526             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41527             :       }
   41528             :     }
   41529             : #endif
   41530             :   }
   41531        2000 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41532        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; } }
   41533             :   return resultobj;
   41534             : fail:
   41535             :   return NULL;
   41536             : }
   41537             : 
   41538             : 
   41539       38746 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41540       38746 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41541       38746 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41542       38746 :   int arg2 = (int) 0 ;
   41543       38746 :   int arg3 = (int) 0 ;
   41544       38746 :   int *arg4 = (int *) 0 ;
   41545       38746 :   int *arg5 = (int *) 0 ;
   41546       38746 :   void *argp1 = 0 ;
   41547       38746 :   int res1 = 0 ;
   41548       38746 :   int val2 ;
   41549       38746 :   int ecode2 = 0 ;
   41550       38746 :   int val3 ;
   41551       38746 :   int ecode3 = 0 ;
   41552       38746 :   int val4 ;
   41553       38746 :   int val5 ;
   41554       38746 :   PyObject * obj0 = 0 ;
   41555       38746 :   PyObject * obj1 = 0 ;
   41556       38746 :   PyObject * obj2 = 0 ;
   41557       38746 :   PyObject * obj3 = 0 ;
   41558       38746 :   PyObject * obj4 = 0 ;
   41559       38746 :   char * kwnames[] = {
   41560             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  NULL 
   41561             :   };
   41562       38746 :   int result;
   41563             :   
   41564       38746 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Band_Checksum", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   41565       38746 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41566       38746 :   if (!SWIG_IsOK(res1)) {
   41567          12 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41568             :   }
   41569       38740 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41570       38740 :   if (obj1) {
   41571         366 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   41572         366 :     if (!SWIG_IsOK(ecode2)) {
   41573           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   41574             :     } 
   41575             :     arg2 = static_cast< int >(val2);
   41576             :   }
   41577       38740 :   if (obj2) {
   41578         366 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   41579         366 :     if (!SWIG_IsOK(ecode3)) {
   41580           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   41581             :     } 
   41582             :     arg3 = static_cast< int >(val3);
   41583             :   }
   41584       38740 :   if (obj3) {
   41585         366 :     {
   41586             :       /* %typemap(in) (int *optional_##int) */
   41587         366 :       if ( obj3 == Py_None ) {
   41588             :         arg4 = 0;
   41589             :       }
   41590         366 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   41591             :         arg4 = (int *) &val4;
   41592             :       }
   41593             :       else {
   41594           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41595           0 :         SWIG_fail;
   41596             :       }
   41597             :     }
   41598             :   }
   41599       38740 :   if (obj4) {
   41600         366 :     {
   41601             :       /* %typemap(in) (int *optional_##int) */
   41602         366 :       if ( obj4 == Py_None ) {
   41603             :         arg5 = 0;
   41604             :       }
   41605         366 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   41606             :         arg5 = (int *) &val5;
   41607             :       }
   41608             :       else {
   41609           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41610           0 :         SWIG_fail;
   41611             :       }
   41612             :     }
   41613             :   }
   41614       38740 :   {
   41615       38740 :     const int bLocalUseExceptions = GetUseExceptions();
   41616       38740 :     if ( bLocalUseExceptions ) {
   41617       35198 :       pushErrorHandler();
   41618             :     }
   41619       38740 :     {
   41620       38740 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41621       38740 :       result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   41622       38740 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41623             :     }
   41624       38740 :     if ( bLocalUseExceptions ) {
   41625       35198 :       popErrorHandler();
   41626             :     }
   41627             : #ifndef SED_HACKS
   41628             :     if ( bLocalUseExceptions ) {
   41629             :       CPLErr eclass = CPLGetLastErrorType();
   41630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41632             :       }
   41633             :     }
   41634             : #endif
   41635             :   }
   41636       38740 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41637       38864 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41638             :   return resultobj;
   41639             : fail:
   41640             :   return NULL;
   41641             : }
   41642             : 
   41643             : 
   41644        1506 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41645        1506 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41646        1506 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41647        1506 :   double *arg2 ;
   41648        1506 :   int *arg3 = (int *) 0 ;
   41649        1506 :   bool arg4 = (bool) false ;
   41650        1506 :   bool arg5 = (bool) false ;
   41651        1506 :   void *argp1 = 0 ;
   41652        1506 :   int res1 = 0 ;
   41653        1506 :   double argout2[2] ;
   41654        1506 :   int isvalid2 ;
   41655        1506 :   bool val4 ;
   41656        1506 :   int ecode4 = 0 ;
   41657        1506 :   bool val5 ;
   41658        1506 :   int ecode5 = 0 ;
   41659        1506 :   PyObject * obj0 = 0 ;
   41660        1506 :   PyObject * obj1 = 0 ;
   41661        1506 :   PyObject * obj2 = 0 ;
   41662        1506 :   char * kwnames[] = {
   41663             :     (char *)"self",  (char *)"approx_ok",  (char *)"can_return_none",  NULL 
   41664             :   };
   41665             :   
   41666        1506 :   {
   41667             :     /* %typemap(in,numinputs=0) (double argout2[2], int* isvalid2) */
   41668        1506 :     arg2 = argout2;
   41669        1506 :     arg3 = &isvalid2;
   41670             :   }
   41671        1506 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Band_ComputeRasterMinMax", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   41672        1506 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41673        1506 :   if (!SWIG_IsOK(res1)) {
   41674           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41675             :   }
   41676        1506 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41677        1506 :   if (obj1) {
   41678         205 :     ecode4 = SWIG_AsVal_bool(obj1, &val4);
   41679         205 :     if (!SWIG_IsOK(ecode4)) {
   41680           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ComputeRasterMinMax" "', argument " "4"" of type '" "bool""'");
   41681             :     } 
   41682             :     arg4 = static_cast< bool >(val4);
   41683             :   }
   41684        1506 :   if (obj2) {
   41685          13 :     ecode5 = SWIG_AsVal_bool(obj2, &val5);
   41686          13 :     if (!SWIG_IsOK(ecode5)) {
   41687           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ComputeRasterMinMax" "', argument " "5"" of type '" "bool""'");
   41688             :     } 
   41689             :     arg5 = static_cast< bool >(val5);
   41690             :   }
   41691        1506 :   {
   41692        1506 :     const int bLocalUseExceptions = GetUseExceptions();
   41693        1506 :     if ( bLocalUseExceptions ) {
   41694        1008 :       pushErrorHandler();
   41695             :     }
   41696        1506 :     {
   41697        1506 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41698        1506 :       GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3,arg4,arg5);
   41699        1506 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41700             :     }
   41701        1506 :     if ( bLocalUseExceptions ) {
   41702        1008 :       popErrorHandler();
   41703             :     }
   41704             : #ifndef SED_HACKS
   41705             :     if ( bLocalUseExceptions ) {
   41706             :       CPLErr eclass = CPLGetLastErrorType();
   41707             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41708             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41709             :       }
   41710             :     }
   41711             : #endif
   41712             :   }
   41713        1506 :   resultobj = SWIG_Py_Void();
   41714        1506 :   {
   41715             :     /* %typemap(argout) (double argout[2], int* isvalid)  */
   41716        1506 :     PyObject *r;
   41717        1506 :     if ( !*arg3 ) {
   41718           6 :       Py_INCREF(Py_None);
   41719           6 :       r = Py_None;
   41720             :     }
   41721             :     else {
   41722        1500 :       r = CreateTupleFromDoubleArray(arg2, 2);
   41723             :     }
   41724             : #if 0x040001 >= 0x040300
   41725             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   41726             : #else
   41727        1506 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   41728             : #endif
   41729             :   }
   41730        1520 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41731             :   return resultobj;
   41732             : fail:
   41733             :   return NULL;
   41734             : }
   41735             : 
   41736             : 
   41737          18 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41738          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41739          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41740          18 :   double *arg2 ;
   41741          18 :   int arg3 = (int) 1 ;
   41742          18 :   void *argp1 = 0 ;
   41743          18 :   int res1 = 0 ;
   41744          18 :   double argout2[2] ;
   41745          18 :   int val3 ;
   41746          18 :   int ecode3 = 0 ;
   41747          18 :   PyObject *swig_obj[2] ;
   41748             :   
   41749          18 :   {
   41750             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   41751          18 :     memset(argout2, 0, sizeof(argout2));
   41752          18 :     arg2 = argout2;
   41753             :   }
   41754          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_ComputeBandStats", 1, 2, swig_obj)) SWIG_fail;
   41755          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41756          18 :   if (!SWIG_IsOK(res1)) {
   41757           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41758             :   }
   41759          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41760          18 :   if (swig_obj[1]) {
   41761           0 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   41762           0 :     if (!SWIG_IsOK(ecode3)) {
   41763           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   41764             :     } 
   41765             :     arg3 = static_cast< int >(val3);
   41766             :   }
   41767          18 :   {
   41768          18 :     const int bLocalUseExceptions = GetUseExceptions();
   41769          18 :     if ( bLocalUseExceptions ) {
   41770          11 :       pushErrorHandler();
   41771             :     }
   41772          18 :     {
   41773          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41774          18 :       GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   41775          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41776             :     }
   41777          18 :     if ( bLocalUseExceptions ) {
   41778          11 :       popErrorHandler();
   41779             :     }
   41780             : #ifndef SED_HACKS
   41781             :     if ( bLocalUseExceptions ) {
   41782             :       CPLErr eclass = CPLGetLastErrorType();
   41783             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41784             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41785             :       }
   41786             :     }
   41787             : #endif
   41788             :   }
   41789          18 :   resultobj = SWIG_Py_Void();
   41790          18 :   {
   41791             :     /* %typemap(argout) (double argout[ANY]) */
   41792          18 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   41793             : #if SWIG_VERSION >= 0x040300
   41794             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   41795             : #else
   41796          18 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   41797             : #endif
   41798             :   }
   41799          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; } }
   41800             :   return resultobj;
   41801             : fail:
   41802             :   return NULL;
   41803             : }
   41804             : 
   41805             : 
   41806      268595 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41807      268595 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41808      268595 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41809      268595 :   double arg2 ;
   41810      268595 :   double arg3 = (double) 0.0 ;
   41811      268595 :   void *argp1 = 0 ;
   41812      268595 :   int res1 = 0 ;
   41813      268595 :   double val2 ;
   41814      268595 :   int ecode2 = 0 ;
   41815      268595 :   double val3 ;
   41816      268595 :   int ecode3 = 0 ;
   41817      268595 :   PyObject *swig_obj[3] ;
   41818      268595 :   CPLErr result;
   41819             :   
   41820      268595 :   if (!SWIG_Python_UnpackTuple(args, "Band_Fill", 2, 3, swig_obj)) SWIG_fail;
   41821      268595 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41822      268595 :   if (!SWIG_IsOK(res1)) {
   41823           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41824             :   }
   41825      268595 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41826      268595 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41827      268595 :   if (!SWIG_IsOK(ecode2)) {
   41828           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   41829             :   } 
   41830      268595 :   arg2 = static_cast< double >(val2);
   41831      268595 :   if (swig_obj[2]) {
   41832         266 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   41833         266 :     if (!SWIG_IsOK(ecode3)) {
   41834           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   41835             :     } 
   41836         266 :     arg3 = static_cast< double >(val3);
   41837             :   }
   41838      268595 :   {
   41839      268595 :     const int bLocalUseExceptions = GetUseExceptions();
   41840      268595 :     if ( bLocalUseExceptions ) {
   41841      168714 :       pushErrorHandler();
   41842             :     }
   41843      268595 :     {
   41844      268595 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41845      268595 :       result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
   41846      268595 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41847             :     }
   41848      268595 :     if ( bLocalUseExceptions ) {
   41849      168714 :       popErrorHandler();
   41850             :     }
   41851             : #ifndef SED_HACKS
   41852             :     if ( bLocalUseExceptions ) {
   41853             :       CPLErr eclass = CPLGetLastErrorType();
   41854             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41855             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41856             :       }
   41857             :     }
   41858             : #endif
   41859             :   }
   41860      268595 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41861      268605 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41862             :   return resultobj;
   41863             : fail:
   41864             :   return NULL;
   41865             : }
   41866             : 
   41867             : 
   41868        9142 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41869        9142 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41870        9142 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41871        9142 :   int arg2 ;
   41872        9142 :   int arg3 ;
   41873        9142 :   int arg4 ;
   41874        9142 :   int arg5 ;
   41875        9142 :   GIntBig arg6 ;
   41876        9142 :   char *arg7 = (char *) 0 ;
   41877        9142 :   int *arg8 = (int *) 0 ;
   41878        9142 :   int *arg9 = (int *) 0 ;
   41879        9142 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   41880        9142 :   GIntBig *arg11 = (GIntBig *) 0 ;
   41881        9142 :   GIntBig *arg12 = (GIntBig *) 0 ;
   41882        9142 :   void *argp1 = 0 ;
   41883        9142 :   int res1 = 0 ;
   41884        9142 :   int val2 ;
   41885        9142 :   int ecode2 = 0 ;
   41886        9142 :   int val3 ;
   41887        9142 :   int ecode3 = 0 ;
   41888        9142 :   int val4 ;
   41889        9142 :   int ecode4 = 0 ;
   41890        9142 :   int val5 ;
   41891        9142 :   int ecode5 = 0 ;
   41892        9142 :   int alloc6 = 0 ;
   41893        9142 :   bool viewIsValid6 = false ;
   41894        9142 :   Py_buffer view6 ;
   41895        9142 :   int val8 ;
   41896        9142 :   int val9 ;
   41897        9142 :   GDALDataType val10 ;
   41898        9142 :   GIntBig val11 ;
   41899        9142 :   GIntBig val12 ;
   41900        9142 :   PyObject * obj0 = 0 ;
   41901        9142 :   PyObject * obj1 = 0 ;
   41902        9142 :   PyObject * obj2 = 0 ;
   41903        9142 :   PyObject * obj3 = 0 ;
   41904        9142 :   PyObject * obj4 = 0 ;
   41905        9142 :   PyObject * obj5 = 0 ;
   41906        9142 :   PyObject * obj6 = 0 ;
   41907        9142 :   PyObject * obj7 = 0 ;
   41908        9142 :   PyObject * obj8 = 0 ;
   41909        9142 :   PyObject * obj9 = 0 ;
   41910        9142 :   PyObject * obj10 = 0 ;
   41911        9142 :   char * kwnames[] = {
   41912             :     (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 
   41913             :   };
   41914        9142 :   CPLErr result;
   41915             :   
   41916        9142 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOO:Band_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   41917        9142 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41918        9142 :   if (!SWIG_IsOK(res1)) {
   41919           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41920             :   }
   41921        9142 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41922        9142 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   41923        9142 :   if (!SWIG_IsOK(ecode2)) {
   41924           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   41925             :   } 
   41926        9142 :   arg2 = static_cast< int >(val2);
   41927        9142 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   41928        9142 :   if (!SWIG_IsOK(ecode3)) {
   41929           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   41930             :   } 
   41931        9142 :   arg3 = static_cast< int >(val3);
   41932        9142 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   41933        9142 :   if (!SWIG_IsOK(ecode4)) {
   41934           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   41935             :   } 
   41936        9142 :   arg4 = static_cast< int >(val4);
   41937        9142 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   41938        9142 :   if (!SWIG_IsOK(ecode5)) {
   41939           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   41940             :   } 
   41941        9142 :   arg5 = static_cast< int >(val5);
   41942        9142 :   {
   41943             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   41944        9142 :     char* ptr = NULL;
   41945        9142 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   41946           1 :       SWIG_fail;
   41947             :     }
   41948        9141 :     arg7 = (char *)ptr;
   41949             :   }
   41950        9141 :   if (obj6) {
   41951        9141 :     {
   41952             :       /* %typemap(in) (int *optional_##int) */
   41953        9141 :       if ( obj6 == Py_None ) {
   41954             :         arg8 = 0;
   41955             :       }
   41956        9141 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   41957             :         arg8 = (int *) &val8;
   41958             :       }
   41959             :       else {
   41960           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41961           0 :         SWIG_fail;
   41962             :       }
   41963             :     }
   41964             :   }
   41965        9141 :   if (obj7) {
   41966        9141 :     {
   41967             :       /* %typemap(in) (int *optional_##int) */
   41968        9141 :       if ( obj7 == Py_None ) {
   41969             :         arg9 = 0;
   41970             :       }
   41971        9141 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   41972             :         arg9 = (int *) &val9;
   41973             :       }
   41974             :       else {
   41975           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41976           0 :         SWIG_fail;
   41977             :       }
   41978             :     }
   41979             :   }
   41980        9141 :   if (obj8) {
   41981        9141 :     {
   41982             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   41983        9141 :       int intval = 0;
   41984        9141 :       if ( obj8 == Py_None ) {
   41985             :         arg10 = NULL;
   41986             :       }
   41987       18282 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   41988        9141 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   41989             :         {
   41990           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   41991             :         }
   41992        9141 :         val10 = static_cast<GDALDataType>(intval);
   41993        9141 :         arg10 = &val10;
   41994             :       }
   41995             :       else {
   41996           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41997           0 :         SWIG_fail;
   41998             :       }
   41999             :     }
   42000             :   }
   42001        9141 :   if (obj9) {
   42002        9141 :     {
   42003             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   42004        9141 :       if ( obj9 == Py_None ) {
   42005             :         arg11 = 0;
   42006             :       }
   42007          16 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   42008             :         arg11 = (GIntBig *) &val11;
   42009             :       }
   42010             :       else {
   42011           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42012           0 :         SWIG_fail;
   42013             :       }
   42014             :     }
   42015             :   }
   42016        9141 :   if (obj10) {
   42017        9141 :     {
   42018             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   42019        9141 :       if ( obj10 == Py_None ) {
   42020             :         arg12 = 0;
   42021             :       }
   42022          12 :       else if ( PyArg_Parse( obj10,"L" ,&val12 ) ) {
   42023             :         arg12 = (GIntBig *) &val12;
   42024             :       }
   42025             :       else {
   42026           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42027           0 :         SWIG_fail;
   42028             :       }
   42029             :     }
   42030             :   }
   42031        9141 :   {
   42032        9141 :     const int bLocalUseExceptions = GetUseExceptions();
   42033        9141 :     if ( bLocalUseExceptions ) {
   42034        8381 :       pushErrorHandler();
   42035             :     }
   42036        9141 :     {
   42037        9141 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42038        9141 :       result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   42039        9141 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42040             :     }
   42041        9141 :     if ( bLocalUseExceptions ) {
   42042        8381 :       popErrorHandler();
   42043             :     }
   42044             : #ifndef SED_HACKS
   42045             :     if ( bLocalUseExceptions ) {
   42046             :       CPLErr eclass = CPLGetLastErrorType();
   42047             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42048             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42049             :       }
   42050             :     }
   42051             : #endif
   42052             :   }
   42053        9141 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42054        9141 :   {
   42055             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   42056        9141 :     if( viewIsValid6 ) {
   42057        3079 :       PyBuffer_Release(&view6);
   42058             :     }
   42059        6062 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   42060        6062 :       delete[] arg7;
   42061             :     }
   42062             :   }
   42063        9149 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42064             :   return resultobj;
   42065           1 : fail:
   42066           1 :   {
   42067             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   42068           1 :     if( viewIsValid6 ) {
   42069           0 :       PyBuffer_Release(&view6);
   42070             :     }
   42071        9142 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   42072           0 :       delete[] arg7;
   42073             :     }
   42074             :   }
   42075             :   return NULL;
   42076             : }
   42077             : 
   42078             : 
   42079         391 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42080         391 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42081         391 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42082         391 :   void *argp1 = 0 ;
   42083         391 :   int res1 = 0 ;
   42084         391 :   PyObject *swig_obj[1] ;
   42085             :   
   42086         391 :   if (!args) SWIG_fail;
   42087         391 :   swig_obj[0] = args;
   42088         391 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42089         391 :   if (!SWIG_IsOK(res1)) {
   42090           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42091             :   }
   42092         391 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42093         391 :   {
   42094         391 :     const int bLocalUseExceptions = GetUseExceptions();
   42095         391 :     if ( bLocalUseExceptions ) {
   42096           5 :       pushErrorHandler();
   42097             :     }
   42098         391 :     {
   42099         391 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42100         391 :       GDALRasterBandShadow_FlushCache(arg1);
   42101         391 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42102             :     }
   42103         391 :     if ( bLocalUseExceptions ) {
   42104           5 :       popErrorHandler();
   42105             :     }
   42106             : #ifndef SED_HACKS
   42107             :     if ( bLocalUseExceptions ) {
   42108             :       CPLErr eclass = CPLGetLastErrorType();
   42109             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42110             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42111             :       }
   42112             :     }
   42113             : #endif
   42114             :   }
   42115         391 :   resultobj = SWIG_Py_Void();
   42116         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; } }
   42117             :   return resultobj;
   42118             : fail:
   42119             :   return NULL;
   42120             : }
   42121             : 
   42122             : 
   42123         130 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42124         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42125         130 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42126         130 :   void *argp1 = 0 ;
   42127         130 :   int res1 = 0 ;
   42128         130 :   PyObject *swig_obj[1] ;
   42129         130 :   GDALColorTableShadow *result = 0 ;
   42130             :   
   42131         130 :   if (!args) SWIG_fail;
   42132         130 :   swig_obj[0] = args;
   42133         130 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42134         130 :   if (!SWIG_IsOK(res1)) {
   42135           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42136             :   }
   42137         130 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42138         130 :   {
   42139         130 :     const int bLocalUseExceptions = GetUseExceptions();
   42140         130 :     if ( bLocalUseExceptions ) {
   42141          91 :       pushErrorHandler();
   42142             :     }
   42143         130 :     {
   42144         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42145         130 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   42146         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42147             :     }
   42148         130 :     if ( bLocalUseExceptions ) {
   42149          91 :       popErrorHandler();
   42150             :     }
   42151             : #ifndef SED_HACKS
   42152             :     if ( bLocalUseExceptions ) {
   42153             :       CPLErr eclass = CPLGetLastErrorType();
   42154             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42155             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42156             :       }
   42157             :     }
   42158             : #endif
   42159             :   }
   42160         130 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42161         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; } }
   42162             :   return resultobj;
   42163             : fail:
   42164             :   return NULL;
   42165             : }
   42166             : 
   42167             : 
   42168         131 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42169         131 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42170         131 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42171         131 :   void *argp1 = 0 ;
   42172         131 :   int res1 = 0 ;
   42173         131 :   PyObject *swig_obj[1] ;
   42174         131 :   GDALColorTableShadow *result = 0 ;
   42175             :   
   42176         131 :   if (!args) SWIG_fail;
   42177         131 :   swig_obj[0] = args;
   42178         131 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42179         131 :   if (!SWIG_IsOK(res1)) {
   42180           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42181             :   }
   42182         131 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42183         131 :   {
   42184         131 :     const int bLocalUseExceptions = GetUseExceptions();
   42185         131 :     if ( bLocalUseExceptions ) {
   42186         107 :       pushErrorHandler();
   42187             :     }
   42188         131 :     {
   42189         131 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42190         131 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   42191         131 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42192             :     }
   42193         131 :     if ( bLocalUseExceptions ) {
   42194         107 :       popErrorHandler();
   42195             :     }
   42196             : #ifndef SED_HACKS
   42197             :     if ( bLocalUseExceptions ) {
   42198             :       CPLErr eclass = CPLGetLastErrorType();
   42199             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42200             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42201             :       }
   42202             :     }
   42203             : #endif
   42204             :   }
   42205         131 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42206         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; } }
   42207             :   return resultobj;
   42208             : fail:
   42209             :   return NULL;
   42210             : }
   42211             : 
   42212             : 
   42213          46 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42214          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42215          46 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42216          46 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   42217          46 :   void *argp1 = 0 ;
   42218          46 :   int res1 = 0 ;
   42219          46 :   void *argp2 = 0 ;
   42220          46 :   int res2 = 0 ;
   42221          46 :   PyObject *swig_obj[2] ;
   42222          46 :   int result;
   42223             :   
   42224          46 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorTable", 2, 2, swig_obj)) SWIG_fail;
   42225          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42226          46 :   if (!SWIG_IsOK(res1)) {
   42227           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42228             :   }
   42229          46 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42230          46 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42231          46 :   if (!SWIG_IsOK(res2)) {
   42232           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   42233             :   }
   42234          46 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   42235          46 :   {
   42236          46 :     const int bLocalUseExceptions = GetUseExceptions();
   42237          46 :     if ( bLocalUseExceptions ) {
   42238          24 :       pushErrorHandler();
   42239             :     }
   42240          46 :     {
   42241          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42242          46 :       result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   42243          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42244             :     }
   42245          46 :     if ( bLocalUseExceptions ) {
   42246          24 :       popErrorHandler();
   42247             :     }
   42248             : #ifndef SED_HACKS
   42249             :     if ( bLocalUseExceptions ) {
   42250             :       CPLErr eclass = CPLGetLastErrorType();
   42251             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42252             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42253             :       }
   42254             :     }
   42255             : #endif
   42256             :   }
   42257          46 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42258          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; } }
   42259             :   return resultobj;
   42260             : fail:
   42261             :   return NULL;
   42262             : }
   42263             : 
   42264             : 
   42265          30 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42266          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42267          30 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42268          30 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   42269          30 :   void *argp1 = 0 ;
   42270          30 :   int res1 = 0 ;
   42271          30 :   void *argp2 = 0 ;
   42272          30 :   int res2 = 0 ;
   42273          30 :   PyObject *swig_obj[2] ;
   42274          30 :   int result;
   42275             :   
   42276          30 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorTable", 2, 2, swig_obj)) SWIG_fail;
   42277          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42278          30 :   if (!SWIG_IsOK(res1)) {
   42279           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42280             :   }
   42281          30 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42282          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42283          30 :   if (!SWIG_IsOK(res2)) {
   42284           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   42285             :   }
   42286          30 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   42287          30 :   {
   42288          30 :     const int bLocalUseExceptions = GetUseExceptions();
   42289          30 :     if ( bLocalUseExceptions ) {
   42290          14 :       pushErrorHandler();
   42291             :     }
   42292          30 :     {
   42293          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42294          30 :       result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   42295          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42296             :     }
   42297          30 :     if ( bLocalUseExceptions ) {
   42298          14 :       popErrorHandler();
   42299             :     }
   42300             : #ifndef SED_HACKS
   42301             :     if ( bLocalUseExceptions ) {
   42302             :       CPLErr eclass = CPLGetLastErrorType();
   42303             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42304             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42305             :       }
   42306             :     }
   42307             : #endif
   42308             :   }
   42309          30 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42310          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; } }
   42311             :   return resultobj;
   42312             : fail:
   42313             :   return NULL;
   42314             : }
   42315             : 
   42316             : 
   42317          70 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42318          70 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42319          70 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42320          70 :   void *argp1 = 0 ;
   42321          70 :   int res1 = 0 ;
   42322          70 :   PyObject *swig_obj[1] ;
   42323          70 :   GDALRasterAttributeTableShadow *result = 0 ;
   42324             :   
   42325          70 :   if (!args) SWIG_fail;
   42326          70 :   swig_obj[0] = args;
   42327          70 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42328          70 :   if (!SWIG_IsOK(res1)) {
   42329           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42330             :   }
   42331          70 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42332          70 :   {
   42333          70 :     const int bLocalUseExceptions = GetUseExceptions();
   42334          70 :     if ( bLocalUseExceptions ) {
   42335          69 :       pushErrorHandler();
   42336             :     }
   42337          70 :     {
   42338          70 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42339          70 :       result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   42340          70 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42341             :     }
   42342          70 :     if ( bLocalUseExceptions ) {
   42343          69 :       popErrorHandler();
   42344             :     }
   42345             : #ifndef SED_HACKS
   42346             :     if ( bLocalUseExceptions ) {
   42347             :       CPLErr eclass = CPLGetLastErrorType();
   42348             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42349             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42350             :       }
   42351             :     }
   42352             : #endif
   42353             :   }
   42354          70 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   42355          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; } }
   42356             :   return resultobj;
   42357             : fail:
   42358             :   return NULL;
   42359             : }
   42360             : 
   42361             : 
   42362          18 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42363          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42364          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42365          18 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   42366          18 :   void *argp1 = 0 ;
   42367          18 :   int res1 = 0 ;
   42368          18 :   void *argp2 = 0 ;
   42369          18 :   int res2 = 0 ;
   42370          18 :   PyObject *swig_obj[2] ;
   42371          18 :   int result;
   42372             :   
   42373          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultRAT", 2, 2, swig_obj)) SWIG_fail;
   42374          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42375          18 :   if (!SWIG_IsOK(res1)) {
   42376           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42377             :   }
   42378          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42379          18 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   42380          18 :   if (!SWIG_IsOK(res2)) {
   42381           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   42382             :   }
   42383          18 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   42384          18 :   {
   42385          18 :     const int bLocalUseExceptions = GetUseExceptions();
   42386          18 :     if ( bLocalUseExceptions ) {
   42387          18 :       pushErrorHandler();
   42388             :     }
   42389          18 :     {
   42390          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42391          18 :       result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   42392          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42393             :     }
   42394          18 :     if ( bLocalUseExceptions ) {
   42395          18 :       popErrorHandler();
   42396             :     }
   42397             : #ifndef SED_HACKS
   42398             :     if ( bLocalUseExceptions ) {
   42399             :       CPLErr eclass = CPLGetLastErrorType();
   42400             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42401             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42402             :       }
   42403             :     }
   42404             : #endif
   42405             :   }
   42406          18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42407          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; } }
   42408             :   return resultobj;
   42409             : fail:
   42410             :   return NULL;
   42411             : }
   42412             : 
   42413             : 
   42414       10834 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42415       10834 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42416       10834 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42417       10834 :   void *argp1 = 0 ;
   42418       10834 :   int res1 = 0 ;
   42419       10834 :   PyObject *swig_obj[1] ;
   42420       10834 :   GDALRasterBandShadow *result = 0 ;
   42421             :   
   42422       10834 :   if (!args) SWIG_fail;
   42423       10834 :   swig_obj[0] = args;
   42424       10834 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42425       10834 :   if (!SWIG_IsOK(res1)) {
   42426           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42427             :   }
   42428       10834 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42429       10834 :   {
   42430       10834 :     const int bLocalUseExceptions = GetUseExceptions();
   42431       10834 :     if ( bLocalUseExceptions ) {
   42432       10464 :       pushErrorHandler();
   42433             :     }
   42434       10834 :     {
   42435       10834 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42436       10834 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   42437       10834 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42438             :     }
   42439       10834 :     if ( bLocalUseExceptions ) {
   42440       10464 :       popErrorHandler();
   42441             :     }
   42442             : #ifndef SED_HACKS
   42443             :     if ( bLocalUseExceptions ) {
   42444             :       CPLErr eclass = CPLGetLastErrorType();
   42445             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42446             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42447             :       }
   42448             :     }
   42449             : #endif
   42450             :   }
   42451       10834 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42452       10834 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42453             :   return resultobj;
   42454             : fail:
   42455             :   return NULL;
   42456             : }
   42457             : 
   42458             : 
   42459         456 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42460         456 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42461         456 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42462         456 :   void *argp1 = 0 ;
   42463         456 :   int res1 = 0 ;
   42464         456 :   PyObject *swig_obj[1] ;
   42465         456 :   int result;
   42466             :   
   42467         456 :   if (!args) SWIG_fail;
   42468         456 :   swig_obj[0] = args;
   42469         456 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42470         456 :   if (!SWIG_IsOK(res1)) {
   42471           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42472             :   }
   42473         456 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42474         456 :   {
   42475         456 :     const int bLocalUseExceptions = GetUseExceptions();
   42476         456 :     if ( bLocalUseExceptions ) {
   42477         293 :       pushErrorHandler();
   42478             :     }
   42479         456 :     {
   42480         456 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42481         456 :       result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   42482         456 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42483             :     }
   42484         456 :     if ( bLocalUseExceptions ) {
   42485         293 :       popErrorHandler();
   42486             :     }
   42487             : #ifndef SED_HACKS
   42488             :     if ( bLocalUseExceptions ) {
   42489             :       CPLErr eclass = CPLGetLastErrorType();
   42490             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42491             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42492             :       }
   42493             :     }
   42494             : #endif
   42495             :   }
   42496         456 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42497         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; } }
   42498             :   return resultobj;
   42499             : fail:
   42500             :   return NULL;
   42501             : }
   42502             : 
   42503             : 
   42504          34 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42505          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42506          34 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42507          34 :   int arg2 ;
   42508          34 :   void *argp1 = 0 ;
   42509          34 :   int res1 = 0 ;
   42510          34 :   int val2 ;
   42511          34 :   int ecode2 = 0 ;
   42512          34 :   PyObject *swig_obj[2] ;
   42513          34 :   CPLErr result;
   42514             :   
   42515          34 :   if (!SWIG_Python_UnpackTuple(args, "Band_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   42516          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42517          34 :   if (!SWIG_IsOK(res1)) {
   42518           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42519             :   }
   42520          34 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42521          34 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   42522          34 :   if (!SWIG_IsOK(ecode2)) {
   42523           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   42524             :   } 
   42525          34 :   arg2 = static_cast< int >(val2);
   42526          34 :   {
   42527          34 :     const int bLocalUseExceptions = GetUseExceptions();
   42528          34 :     if ( bLocalUseExceptions ) {
   42529          17 :       pushErrorHandler();
   42530             :     }
   42531          34 :     {
   42532          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42533          34 :       result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
   42534          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42535             :     }
   42536          34 :     if ( bLocalUseExceptions ) {
   42537          17 :       popErrorHandler();
   42538             :     }
   42539             : #ifndef SED_HACKS
   42540             :     if ( bLocalUseExceptions ) {
   42541             :       CPLErr eclass = CPLGetLastErrorType();
   42542             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42543             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42544             :       }
   42545             :     }
   42546             : #endif
   42547             :   }
   42548          34 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42549          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; } }
   42550             :   return resultobj;
   42551             : fail:
   42552             :   return NULL;
   42553             : }
   42554             : 
   42555             : 
   42556          37 : SWIGINTERN PyObject *_wrap_Band_IsMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42557          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42558          37 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42559          37 :   void *argp1 = 0 ;
   42560          37 :   int res1 = 0 ;
   42561          37 :   PyObject *swig_obj[1] ;
   42562          37 :   bool result;
   42563             :   
   42564          37 :   if (!args) SWIG_fail;
   42565          37 :   swig_obj[0] = args;
   42566          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42567          37 :   if (!SWIG_IsOK(res1)) {
   42568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IsMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42569             :   }
   42570          37 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42571          37 :   {
   42572          37 :     const int bLocalUseExceptions = GetUseExceptions();
   42573          37 :     if ( bLocalUseExceptions ) {
   42574           9 :       pushErrorHandler();
   42575             :     }
   42576          37 :     {
   42577          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42578          37 :       result = (bool)GDALRasterBandShadow_IsMaskBand(arg1);
   42579          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42580             :     }
   42581          37 :     if ( bLocalUseExceptions ) {
   42582           9 :       popErrorHandler();
   42583             :     }
   42584             : #ifndef SED_HACKS
   42585             :     if ( bLocalUseExceptions ) {
   42586             :       CPLErr eclass = CPLGetLastErrorType();
   42587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42589             :       }
   42590             :     }
   42591             : #endif
   42592             :   }
   42593          37 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   42594          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; } }
   42595             :   return resultobj;
   42596             : fail:
   42597             :   return NULL;
   42598             : }
   42599             : 
   42600             : 
   42601          27 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42602          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42603          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42604          27 :   double arg2 = (double) -0.5 ;
   42605          27 :   double arg3 = (double) 255.5 ;
   42606          27 :   int arg4 = (int) 256 ;
   42607          27 :   GUIntBig *arg5 = (GUIntBig *) NULL ;
   42608          27 :   int arg6 = (int) 0 ;
   42609          27 :   int arg7 = (int) 1 ;
   42610          27 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   42611          27 :   void *arg9 = (void *) NULL ;
   42612          27 :   void *argp1 = 0 ;
   42613          27 :   int res1 = 0 ;
   42614          27 :   double val2 ;
   42615          27 :   int ecode2 = 0 ;
   42616          27 :   double val3 ;
   42617          27 :   int ecode3 = 0 ;
   42618          27 :   int val6 ;
   42619          27 :   int ecode6 = 0 ;
   42620          27 :   int val7 ;
   42621          27 :   int ecode7 = 0 ;
   42622          27 :   PyObject * obj0 = 0 ;
   42623          27 :   PyObject * obj1 = 0 ;
   42624          27 :   PyObject * obj2 = 0 ;
   42625          27 :   PyObject * obj3 = 0 ;
   42626          27 :   PyObject * obj4 = 0 ;
   42627          27 :   PyObject * obj5 = 0 ;
   42628          27 :   PyObject * obj6 = 0 ;
   42629          27 :   PyObject * obj7 = 0 ;
   42630          27 :   char * kwnames[] = {
   42631             :     (char *)"self",  (char *)"min",  (char *)"max",  (char *)"buckets",  (char *)"include_out_of_range",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   42632             :   };
   42633          27 :   CPLErr result;
   42634             :   
   42635          27 :   {
   42636             :     /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42637          27 :     arg5 = (GUIntBig *) VSICalloc(sizeof(GUIntBig),arg4);
   42638             :   }
   42639             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42640          27 :   PyProgressData *psProgressInfo;
   42641          27 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42642          27 :   psProgressInfo->nLastReported = -1;
   42643          27 :   psProgressInfo->psPyCallback = NULL;
   42644          27 :   psProgressInfo->psPyCallbackData = NULL;
   42645          27 :   arg9 = psProgressInfo;
   42646          27 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42647          27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42648          27 :   if (!SWIG_IsOK(res1)) {
   42649           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42650             :   }
   42651          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42652          27 :   if (obj1) {
   42653          18 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   42654          18 :     if (!SWIG_IsOK(ecode2)) {
   42655           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   42656             :     } 
   42657          18 :     arg2 = static_cast< double >(val2);
   42658             :   }
   42659          27 :   if (obj2) {
   42660          16 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   42661          16 :     if (!SWIG_IsOK(ecode3)) {
   42662           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   42663             :     } 
   42664          16 :     arg3 = static_cast< double >(val3);
   42665             :   }
   42666          27 :   if (obj3) {
   42667          16 :     {
   42668             :       /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42669          16 :       int requested_buckets = 0;
   42670          32 :       CPL_IGNORE_RET_VAL(SWIG_AsVal_int(obj3, &requested_buckets));
   42671          16 :       if( requested_buckets != arg4 )
   42672             :       {
   42673          16 :         arg4 = requested_buckets;
   42674          16 :         if (requested_buckets <= 0 || (size_t)requested_buckets > SIZE_MAX / sizeof(GUIntBig))
   42675             :         {
   42676           1 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   42677           1 :           SWIG_fail;
   42678             :         }
   42679          15 :         void* tmp = VSIRealloc(arg5, sizeof(GUIntBig) * requested_buckets);
   42680          15 :         if( !tmp) {
   42681           0 :           PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   42682           0 :           SWIG_fail;
   42683             :         }
   42684             :         arg5 = (GUIntBig *)tmp;
   42685             :       }
   42686          15 :       if (arg5 == NULL)
   42687             :       {
   42688           0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   42689           0 :         SWIG_fail;
   42690             :       }
   42691             :     }
   42692             :   }
   42693          26 :   if (obj4) {
   42694          15 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   42695          15 :     if (!SWIG_IsOK(ecode6)) {
   42696           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   42697             :     } 
   42698             :     arg6 = static_cast< int >(val6);
   42699             :   }
   42700          26 :   if (obj5) {
   42701          17 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   42702          17 :     if (!SWIG_IsOK(ecode7)) {
   42703           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   42704             :     } 
   42705             :     arg7 = static_cast< int >(val7);
   42706             :   }
   42707          26 :   if (obj6) {
   42708           0 :     {
   42709             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42710             :       /* callback_func typemap */
   42711             :       
   42712             :       /* In some cases 0 is passed instead of None. */
   42713             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42714           0 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42715             :       {
   42716           0 :         if( PyLong_AsLong(obj6) == 0 )
   42717             :         {
   42718           0 :           obj6 = Py_None;
   42719             :         }
   42720             :       }
   42721             :       
   42722           0 :       if (obj6 && obj6 != Py_None ) {
   42723           0 :         void* cbfunction = NULL;
   42724           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42725             :             (void**)&cbfunction,
   42726             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42727             :             SWIG_POINTER_EXCEPTION | 0 ));
   42728             :         
   42729           0 :         if ( cbfunction == GDALTermProgress ) {
   42730             :           arg8 = GDALTermProgress;
   42731             :         } else {
   42732           0 :           if (!PyCallable_Check(obj6)) {
   42733           0 :             PyErr_SetString( PyExc_RuntimeError,
   42734             :               "Object given is not a Python function" );
   42735           0 :             SWIG_fail;
   42736             :           }
   42737           0 :           psProgressInfo->psPyCallback = obj6;
   42738           0 :           arg8 = PyProgressProxy;
   42739             :         }
   42740             :         
   42741             :       }
   42742             :       
   42743             :     }
   42744             :   }
   42745          26 :   if (obj7) {
   42746           0 :     {
   42747             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42748           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42749             :     }
   42750             :   }
   42751          26 :   {
   42752          26 :     const int bLocalUseExceptions = GetUseExceptions();
   42753          26 :     if ( bLocalUseExceptions ) {
   42754           4 :       pushErrorHandler();
   42755             :     }
   42756          26 :     {
   42757          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42758          26 :       result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   42759          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42760             :     }
   42761          26 :     if ( bLocalUseExceptions ) {
   42762           4 :       popErrorHandler();
   42763             :     }
   42764             : #ifndef SED_HACKS
   42765             :     if ( bLocalUseExceptions ) {
   42766             :       CPLErr eclass = CPLGetLastErrorType();
   42767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42769             :       }
   42770             :     }
   42771             : #endif
   42772             :   }
   42773          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42774          26 :   {
   42775             :     /* %typemap(out) int buckets, GUIntBig* panHistogram -> list */
   42776          26 :     GUIntBig *integerarray = arg5;
   42777          26 :     Py_DECREF( resultobj );
   42778          26 :     if ( integerarray == NULL ) {
   42779           0 :       resultobj = Py_None;
   42780           0 :       Py_INCREF( resultobj );
   42781             :     }
   42782             :     else {
   42783          26 :       resultobj = PyList_New( arg4 );
   42784          26 :       if( !resultobj ) {
   42785           0 :         SWIG_fail;
   42786             :       }
   42787        2924 :       for ( int i = 0; i < arg4; ++i ) {
   42788        2898 :         char szTmp[32];
   42789        2898 :         snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, integerarray[i]);
   42790        2898 :         PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   42791        2898 :         PyList_SetItem(resultobj, i, o );
   42792             :       }
   42793             :     }
   42794             :   }
   42795          26 :   {
   42796             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42797          26 :     VSIFree( arg5 );
   42798             :   }
   42799          26 :   {
   42800             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42801             :     
   42802          26 :     CPLFree(psProgressInfo);
   42803             :     
   42804             :   }
   42805          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; } }
   42806             :   return resultobj;
   42807           1 : fail:
   42808           1 :   {
   42809             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42810           1 :     VSIFree( arg5 );
   42811             :   }
   42812           1 :   {
   42813             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42814             :     
   42815           1 :     CPLFree(psProgressInfo);
   42816             :     
   42817             :   }
   42818             :   return NULL;
   42819             : }
   42820             : 
   42821             : 
   42822          13 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42823          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42824          13 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42825          13 :   double *arg2 = (double *) NULL ;
   42826          13 :   double *arg3 = (double *) NULL ;
   42827          13 :   int *arg4 = (int *) NULL ;
   42828          13 :   GUIntBig **arg5 = (GUIntBig **) NULL ;
   42829          13 :   int arg6 = (int) 1 ;
   42830          13 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   42831          13 :   void *arg8 = (void *) NULL ;
   42832          13 :   void *argp1 = 0 ;
   42833          13 :   int res1 = 0 ;
   42834          13 :   double val2 ;
   42835          13 :   double val3 ;
   42836          13 :   void *argp4 = 0 ;
   42837          13 :   int res4 = 0 ;
   42838          13 :   void *argp5 = 0 ;
   42839          13 :   int res5 = 0 ;
   42840          13 :   int val6 ;
   42841          13 :   int ecode6 = 0 ;
   42842          13 :   PyObject * obj0 = 0 ;
   42843          13 :   PyObject * obj1 = 0 ;
   42844          13 :   PyObject * obj2 = 0 ;
   42845          13 :   PyObject * obj3 = 0 ;
   42846          13 :   PyObject * obj4 = 0 ;
   42847          13 :   PyObject * obj5 = 0 ;
   42848          13 :   PyObject * obj6 = 0 ;
   42849          13 :   PyObject * obj7 = 0 ;
   42850          13 :   char * kwnames[] = {
   42851             :     (char *)"self",  (char *)"min_ret",  (char *)"max_ret",  (char *)"buckets_ret",  (char *)"ppanHistogram",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   42852             :   };
   42853          13 :   CPLErr result;
   42854             :   
   42855          13 :   double min_val = 0.0, max_val = 0.0;
   42856          13 :   int buckets_val = 0;
   42857          13 :   GUIntBig *panHistogram = NULL;
   42858             :   
   42859          13 :   arg2 = &min_val;
   42860          13 :   arg3 = &max_val;
   42861          13 :   arg4 = &buckets_val;
   42862          13 :   arg5 = &panHistogram;
   42863             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42864          13 :   PyProgressData *psProgressInfo;
   42865          13 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42866          13 :   psProgressInfo->nLastReported = -1;
   42867          13 :   psProgressInfo->psPyCallback = NULL;
   42868          13 :   psProgressInfo->psPyCallbackData = NULL;
   42869          13 :   arg8 = psProgressInfo;
   42870          13 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetDefaultHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42871          13 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42872          13 :   if (!SWIG_IsOK(res1)) {
   42873           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42874             :   }
   42875          13 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42876          13 :   if (obj1) {
   42877           0 :     {
   42878             :       /* %typemap(in) (double *optional_##double) */
   42879           0 :       if ( obj1 == Py_None ) {
   42880             :         arg2 = 0;
   42881             :       }
   42882           0 :       else if ( PyArg_Parse( obj1,"d" ,&val2 ) ) {
   42883             :         arg2 = (double *) &val2;
   42884             :       }
   42885             :       else {
   42886           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42887           0 :         SWIG_fail;
   42888             :       }
   42889             :     }
   42890             :   }
   42891          13 :   if (obj2) {
   42892           0 :     {
   42893             :       /* %typemap(in) (double *optional_##double) */
   42894           0 :       if ( obj2 == Py_None ) {
   42895             :         arg3 = 0;
   42896             :       }
   42897           0 :       else if ( PyArg_Parse( obj2,"d" ,&val3 ) ) {
   42898             :         arg3 = (double *) &val3;
   42899             :       }
   42900             :       else {
   42901           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42902           0 :         SWIG_fail;
   42903             :       }
   42904             :     }
   42905             :   }
   42906          13 :   if (obj3) {
   42907           0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   42908           0 :     if (!SWIG_IsOK(res4)) {
   42909           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   42910             :     }
   42911           0 :     arg4 = reinterpret_cast< int * >(argp4);
   42912             :   }
   42913          13 :   if (obj4) {
   42914           0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_GUIntBig, 0 |  0 );
   42915           0 :     if (!SWIG_IsOK(res5)) {
   42916           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "GUIntBig **""'"); 
   42917             :     }
   42918           0 :     arg5 = reinterpret_cast< GUIntBig ** >(argp5);
   42919             :   }
   42920          13 :   if (obj5) {
   42921           5 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   42922           5 :     if (!SWIG_IsOK(ecode6)) {
   42923           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   42924             :     } 
   42925             :     arg6 = static_cast< int >(val6);
   42926             :   }
   42927          13 :   if (obj6) {
   42928           1 :     {
   42929             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42930             :       /* callback_func typemap */
   42931             :       
   42932             :       /* In some cases 0 is passed instead of None. */
   42933             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42934           1 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42935             :       {
   42936           0 :         if( PyLong_AsLong(obj6) == 0 )
   42937             :         {
   42938           0 :           obj6 = Py_None;
   42939             :         }
   42940             :       }
   42941             :       
   42942           1 :       if (obj6 && obj6 != Py_None ) {
   42943           1 :         void* cbfunction = NULL;
   42944           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42945             :             (void**)&cbfunction,
   42946             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42947             :             SWIG_POINTER_EXCEPTION | 0 ));
   42948             :         
   42949           1 :         if ( cbfunction == GDALTermProgress ) {
   42950             :           arg7 = GDALTermProgress;
   42951             :         } else {
   42952           1 :           if (!PyCallable_Check(obj6)) {
   42953           0 :             PyErr_SetString( PyExc_RuntimeError,
   42954             :               "Object given is not a Python function" );
   42955           0 :             SWIG_fail;
   42956             :           }
   42957           1 :           psProgressInfo->psPyCallback = obj6;
   42958           1 :           arg7 = PyProgressProxy;
   42959             :         }
   42960             :         
   42961             :       }
   42962             :       
   42963             :     }
   42964             :   }
   42965          13 :   if (obj7) {
   42966           0 :     {
   42967             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42968           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42969             :     }
   42970             :   }
   42971          13 :   {
   42972          13 :     const int bLocalUseExceptions = GetUseExceptions();
   42973          13 :     if ( bLocalUseExceptions ) {
   42974           4 :       pushErrorHandler();
   42975             :     }
   42976          13 :     {
   42977          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42978          13 :       result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   42979          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42980             :     }
   42981          13 :     if ( bLocalUseExceptions ) {
   42982           4 :       popErrorHandler();
   42983             :     }
   42984             : #ifndef SED_HACKS
   42985             :     if ( bLocalUseExceptions ) {
   42986             :       CPLErr eclass = CPLGetLastErrorType();
   42987             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42988             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42989             :       }
   42990             :     }
   42991             : #endif
   42992             :   }
   42993          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42994          13 :   {
   42995          13 :     int i;
   42996          13 :     PyObject *psList = NULL;
   42997             :     
   42998          13 :     Py_XDECREF(resultobj);
   42999             :     
   43000          13 :     if (panHistogram)
   43001             :     {
   43002          12 :       psList = PyList_New(buckets_val);
   43003          12 :       if( !psList ) {
   43004           0 :         SWIG_fail;
   43005             :       }
   43006        2321 :       for( i = 0; i < buckets_val; i++ )
   43007        2309 :       PyList_SetItem(psList, i, Py_BuildValue("K", panHistogram[i] ));
   43008             :       
   43009          12 :       CPLFree( panHistogram );
   43010             :       
   43011          12 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   43012          12 :       Py_XDECREF(psList);
   43013             :     }
   43014             :     else
   43015             :     {
   43016           1 :       resultobj = Py_None;
   43017           1 :       Py_INCREF(resultobj);
   43018             :     }
   43019             :   }
   43020          13 :   {
   43021             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43022             :     
   43023          13 :     CPLFree(psProgressInfo);
   43024             :     
   43025             :   }
   43026          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; } }
   43027             :   return resultobj;
   43028           0 : fail:
   43029           0 :   {
   43030             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43031             :     
   43032           0 :     CPLFree(psProgressInfo);
   43033             :     
   43034             :   }
   43035             :   return NULL;
   43036             : }
   43037             : 
   43038             : 
   43039           5 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43040           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43041           5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43042           5 :   double arg2 ;
   43043           5 :   double arg3 ;
   43044           5 :   int arg4 ;
   43045           5 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   43046           5 :   void *argp1 = 0 ;
   43047           5 :   int res1 = 0 ;
   43048           5 :   double val2 ;
   43049           5 :   int ecode2 = 0 ;
   43050           5 :   double val3 ;
   43051           5 :   int ecode3 = 0 ;
   43052           5 :   PyObject *swig_obj[4] ;
   43053           5 :   CPLErr result;
   43054             :   
   43055           5 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultHistogram", 4, 4, swig_obj)) SWIG_fail;
   43056           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43057           5 :   if (!SWIG_IsOK(res1)) {
   43058           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43059             :   }
   43060           5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43061           5 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   43062           5 :   if (!SWIG_IsOK(ecode2)) {
   43063           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   43064             :   } 
   43065           5 :   arg2 = static_cast< double >(val2);
   43066           5 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   43067           5 :   if (!SWIG_IsOK(ecode3)) {
   43068           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   43069             :   } 
   43070           5 :   arg3 = static_cast< double >(val3);
   43071           5 :   {
   43072             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   43073           5 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[3], &arg4);
   43074           5 :     if( arg4 < 0 ) {
   43075           0 :       SWIG_fail;
   43076             :     }
   43077             :   }
   43078           5 :   {
   43079           5 :     const int bLocalUseExceptions = GetUseExceptions();
   43080           5 :     if ( bLocalUseExceptions ) {
   43081           5 :       pushErrorHandler();
   43082             :     }
   43083           5 :     {
   43084           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43085           5 :       result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
   43086           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43087             :     }
   43088           5 :     if ( bLocalUseExceptions ) {
   43089           5 :       popErrorHandler();
   43090             :     }
   43091             : #ifndef SED_HACKS
   43092             :     if ( bLocalUseExceptions ) {
   43093             :       CPLErr eclass = CPLGetLastErrorType();
   43094             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43095             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43096             :       }
   43097             :     }
   43098             : #endif
   43099             :   }
   43100           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43101           5 :   {
   43102             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   43103           5 :     free(arg5);
   43104             :   }
   43105           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; } }
   43106             :   return resultobj;
   43107           0 : fail:
   43108           0 :   {
   43109             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   43110           0 :     free(arg5);
   43111             :   }
   43112           0 :   return NULL;
   43113             : }
   43114             : 
   43115             : 
   43116          17 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43117          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43118          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43119          17 :   void *argp1 = 0 ;
   43120          17 :   int res1 = 0 ;
   43121          17 :   PyObject *swig_obj[1] ;
   43122          17 :   bool result;
   43123             :   
   43124          17 :   if (!args) SWIG_fail;
   43125          17 :   swig_obj[0] = args;
   43126          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43127          17 :   if (!SWIG_IsOK(res1)) {
   43128           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43129             :   }
   43130          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43131          17 :   {
   43132          17 :     const int bLocalUseExceptions = GetUseExceptions();
   43133          17 :     if ( bLocalUseExceptions ) {
   43134           0 :       pushErrorHandler();
   43135             :     }
   43136          17 :     {
   43137          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43138          17 :       result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   43139          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43140             :     }
   43141          17 :     if ( bLocalUseExceptions ) {
   43142           0 :       popErrorHandler();
   43143             :     }
   43144             : #ifndef SED_HACKS
   43145             :     if ( bLocalUseExceptions ) {
   43146             :       CPLErr eclass = CPLGetLastErrorType();
   43147             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43148             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43149             :       }
   43150             :     }
   43151             : #endif
   43152             :   }
   43153          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   43154          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; } }
   43155             :   return resultobj;
   43156             : fail:
   43157             :   return NULL;
   43158             : }
   43159             : 
   43160             : 
   43161          10 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43162          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43163          10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43164          10 :   void *argp1 = 0 ;
   43165          10 :   int res1 = 0 ;
   43166          10 :   PyObject *swig_obj[1] ;
   43167          10 :   char **result = 0 ;
   43168             :   
   43169          10 :   if (!args) SWIG_fail;
   43170          10 :   swig_obj[0] = args;
   43171          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43172          10 :   if (!SWIG_IsOK(res1)) {
   43173           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43174             :   }
   43175          10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43176          10 :   {
   43177          10 :     const int bLocalUseExceptions = GetUseExceptions();
   43178          10 :     if ( bLocalUseExceptions ) {
   43179           8 :       pushErrorHandler();
   43180             :     }
   43181          10 :     {
   43182          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43183          10 :       result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   43184          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43185             :     }
   43186          10 :     if ( bLocalUseExceptions ) {
   43187           8 :       popErrorHandler();
   43188             :     }
   43189             : #ifndef SED_HACKS
   43190             :     if ( bLocalUseExceptions ) {
   43191             :       CPLErr eclass = CPLGetLastErrorType();
   43192             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43193             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43194             :       }
   43195             :     }
   43196             : #endif
   43197             :   }
   43198          10 :   {
   43199             :     /* %typemap(out) char **options -> ( string ) */
   43200          10 :     bool bErr = false;
   43201          10 :     resultobj = CSLToList(result, &bErr);
   43202          10 :     if( bErr ) {
   43203           0 :       SWIG_fail;
   43204             :     }
   43205             :   }
   43206          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; } }
   43207             :   return resultobj;
   43208             : fail:
   43209             :   return NULL;
   43210             : }
   43211             : 
   43212             : 
   43213           2 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43214           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43215           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43216           2 :   char **arg2 = (char **) 0 ;
   43217           2 :   void *argp1 = 0 ;
   43218           2 :   int res1 = 0 ;
   43219           2 :   PyObject *swig_obj[2] ;
   43220           2 :   CPLErr result;
   43221             :   
   43222           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   43223           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43224           2 :   if (!SWIG_IsOK(res1)) {
   43225           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43226             :   }
   43227           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43228           2 :   {
   43229             :     /* %typemap(in) char **dict */
   43230           2 :     arg2 = NULL;
   43231           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   43232           2 :       int bErr = FALSE;
   43233           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   43234           2 :       if ( bErr )
   43235             :       {
   43236           0 :         SWIG_fail;
   43237             :       }
   43238             :     }
   43239           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   43240           0 :       int bErr = FALSE;
   43241           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   43242           0 :       if ( bErr )
   43243             :       {
   43244           0 :         SWIG_fail;
   43245             :       }
   43246             :     }
   43247             :     else {
   43248           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43249           0 :       SWIG_fail;
   43250             :     }
   43251             :   }
   43252           2 :   {
   43253           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43254           2 :     if ( bLocalUseExceptions ) {
   43255           2 :       pushErrorHandler();
   43256             :     }
   43257           2 :     {
   43258           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43259           2 :       result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
   43260           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43261             :     }
   43262           2 :     if ( bLocalUseExceptions ) {
   43263           2 :       popErrorHandler();
   43264             :     }
   43265             : #ifndef SED_HACKS
   43266             :     if ( bLocalUseExceptions ) {
   43267             :       CPLErr eclass = CPLGetLastErrorType();
   43268             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43269             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43270             :       }
   43271             :     }
   43272             : #endif
   43273             :   }
   43274           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43275           2 :   {
   43276             :     /* %typemap(freearg) char **dict */
   43277           2 :     CSLDestroy( arg2 );
   43278             :   }
   43279           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; } }
   43280             :   return resultobj;
   43281           0 : fail:
   43282           0 :   {
   43283             :     /* %typemap(freearg) char **dict */
   43284           0 :     CSLDestroy( arg2 );
   43285             :   }
   43286             :   return NULL;
   43287             : }
   43288             : 
   43289             : 
   43290           1 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43291           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43292           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43293           1 :   GDALRWFlag arg2 ;
   43294           1 :   int arg3 ;
   43295           1 :   int arg4 ;
   43296           1 :   int arg5 ;
   43297           1 :   int arg6 ;
   43298           1 :   int arg7 ;
   43299           1 :   int arg8 ;
   43300           1 :   GDALDataType arg9 ;
   43301           1 :   size_t arg10 ;
   43302           1 :   size_t arg11 ;
   43303           1 :   char **arg12 = (char **) NULL ;
   43304           1 :   void *argp1 = 0 ;
   43305           1 :   int res1 = 0 ;
   43306           1 :   int val2 ;
   43307           1 :   int ecode2 = 0 ;
   43308           1 :   int val3 ;
   43309           1 :   int ecode3 = 0 ;
   43310           1 :   int val4 ;
   43311           1 :   int ecode4 = 0 ;
   43312           1 :   int val5 ;
   43313           1 :   int ecode5 = 0 ;
   43314           1 :   int val6 ;
   43315           1 :   int ecode6 = 0 ;
   43316           1 :   int val7 ;
   43317           1 :   int ecode7 = 0 ;
   43318           1 :   int val8 ;
   43319           1 :   int ecode8 = 0 ;
   43320           1 :   size_t val10 ;
   43321           1 :   int ecode10 = 0 ;
   43322           1 :   size_t val11 ;
   43323           1 :   int ecode11 = 0 ;
   43324           1 :   PyObject * obj0 = 0 ;
   43325           1 :   PyObject * obj1 = 0 ;
   43326           1 :   PyObject * obj2 = 0 ;
   43327           1 :   PyObject * obj3 = 0 ;
   43328           1 :   PyObject * obj4 = 0 ;
   43329           1 :   PyObject * obj5 = 0 ;
   43330           1 :   PyObject * obj6 = 0 ;
   43331           1 :   PyObject * obj7 = 0 ;
   43332           1 :   PyObject * obj8 = 0 ;
   43333           1 :   PyObject * obj9 = 0 ;
   43334           1 :   PyObject * obj10 = 0 ;
   43335           1 :   PyObject * obj11 = 0 ;
   43336           1 :   char * kwnames[] = {
   43337             :     (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 
   43338             :   };
   43339           1 :   CPLVirtualMemShadow *result = 0 ;
   43340             :   
   43341           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;
   43342           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43343           1 :   if (!SWIG_IsOK(res1)) {
   43344           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43345             :   }
   43346           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43347           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43348           1 :   if (!SWIG_IsOK(ecode2)) {
   43349           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   43350             :   } 
   43351           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   43352           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   43353           1 :   if (!SWIG_IsOK(ecode3)) {
   43354           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   43355             :   } 
   43356           1 :   arg3 = static_cast< int >(val3);
   43357           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43358           1 :   if (!SWIG_IsOK(ecode4)) {
   43359           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   43360             :   } 
   43361           1 :   arg4 = static_cast< int >(val4);
   43362           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   43363           1 :   if (!SWIG_IsOK(ecode5)) {
   43364           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   43365             :   } 
   43366           1 :   arg5 = static_cast< int >(val5);
   43367           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   43368           1 :   if (!SWIG_IsOK(ecode6)) {
   43369           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   43370             :   } 
   43371           1 :   arg6 = static_cast< int >(val6);
   43372           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   43373           1 :   if (!SWIG_IsOK(ecode7)) {
   43374           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   43375             :   } 
   43376           1 :   arg7 = static_cast< int >(val7);
   43377           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   43378           1 :   if (!SWIG_IsOK(ecode8)) {
   43379           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   43380             :   } 
   43381           1 :   arg8 = static_cast< int >(val8);
   43382           1 :   {
   43383             :     // %typemap(in) GDALDataType
   43384           1 :     int val = 0;
   43385           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   43386           1 :     if (!SWIG_IsOK(ecode)) {
   43387           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   43388             :     }
   43389           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   43390             :     {
   43391           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   43392             :     }
   43393           1 :     arg9 = static_cast<GDALDataType>(val);
   43394             :   }
   43395           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   43396           1 :   if (!SWIG_IsOK(ecode10)) {
   43397           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetVirtualMem" "', argument " "10"" of type '" "size_t""'");
   43398             :   } 
   43399           1 :   arg10 = static_cast< size_t >(val10);
   43400           1 :   ecode11 = SWIG_AsVal_size_t(obj10, &val11);
   43401           1 :   if (!SWIG_IsOK(ecode11)) {
   43402           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Band_GetVirtualMem" "', argument " "11"" of type '" "size_t""'");
   43403             :   } 
   43404           1 :   arg11 = static_cast< size_t >(val11);
   43405           1 :   if (obj11) {
   43406           0 :     {
   43407             :       /* %typemap(in) char **dict */
   43408           0 :       arg12 = NULL;
   43409           0 :       if ( PySequence_Check( obj11 ) ) {
   43410           0 :         int bErr = FALSE;
   43411           0 :         arg12 = CSLFromPySequence(obj11, &bErr);
   43412           0 :         if ( bErr )
   43413             :         {
   43414           0 :           SWIG_fail;
   43415             :         }
   43416             :       }
   43417           0 :       else if ( PyMapping_Check( obj11 ) ) {
   43418           0 :         int bErr = FALSE;
   43419           0 :         arg12 = CSLFromPyMapping(obj11, &bErr);
   43420           0 :         if ( bErr )
   43421             :         {
   43422           0 :           SWIG_fail;
   43423             :         }
   43424             :       }
   43425             :       else {
   43426           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43427           0 :         SWIG_fail;
   43428             :       }
   43429             :     }
   43430             :   }
   43431           1 :   {
   43432           1 :     const int bLocalUseExceptions = GetUseExceptions();
   43433           1 :     if ( bLocalUseExceptions ) {
   43434           1 :       pushErrorHandler();
   43435             :     }
   43436           1 :     {
   43437           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43438           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   43439           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43440             :     }
   43441           1 :     if ( bLocalUseExceptions ) {
   43442           1 :       popErrorHandler();
   43443             :     }
   43444             : #ifndef SED_HACKS
   43445             :     if ( bLocalUseExceptions ) {
   43446             :       CPLErr eclass = CPLGetLastErrorType();
   43447             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43448             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43449             :       }
   43450             :     }
   43451             : #endif
   43452             :   }
   43453           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43454           1 :   {
   43455             :     /* %typemap(freearg) char **dict */
   43456           1 :     CSLDestroy( arg12 );
   43457             :   }
   43458           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; } }
   43459             :   return resultobj;
   43460           0 : fail:
   43461           0 :   {
   43462             :     /* %typemap(freearg) char **dict */
   43463           0 :     CSLDestroy( arg12 );
   43464             :   }
   43465             :   return NULL;
   43466             : }
   43467             : 
   43468             : 
   43469          21 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMemAuto(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43470          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43471          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43472          21 :   GDALRWFlag arg2 ;
   43473          21 :   char **arg3 = (char **) NULL ;
   43474          21 :   void *argp1 = 0 ;
   43475          21 :   int res1 = 0 ;
   43476          21 :   int val2 ;
   43477          21 :   int ecode2 = 0 ;
   43478          21 :   PyObject * obj0 = 0 ;
   43479          21 :   PyObject * obj1 = 0 ;
   43480          21 :   PyObject * obj2 = 0 ;
   43481          21 :   char * kwnames[] = {
   43482             :     (char *)"self",  (char *)"eRWFlag",  (char *)"options",  NULL 
   43483             :   };
   43484          21 :   CPLVirtualMemShadow *result = 0 ;
   43485             :   
   43486          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Band_GetVirtualMemAuto", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   43487          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43488          21 :   if (!SWIG_IsOK(res1)) {
   43489           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMemAuto" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43490             :   }
   43491          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43492          21 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43493          21 :   if (!SWIG_IsOK(ecode2)) {
   43494           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMemAuto" "', argument " "2"" of type '" "GDALRWFlag""'");
   43495             :   } 
   43496          21 :   arg2 = static_cast< GDALRWFlag >(val2);
   43497          21 :   if (obj2) {
   43498           0 :     {
   43499             :       /* %typemap(in) char **dict */
   43500           0 :       arg3 = NULL;
   43501           0 :       if ( PySequence_Check( obj2 ) ) {
   43502           0 :         int bErr = FALSE;
   43503           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   43504           0 :         if ( bErr )
   43505             :         {
   43506           0 :           SWIG_fail;
   43507             :         }
   43508             :       }
   43509           0 :       else if ( PyMapping_Check( obj2 ) ) {
   43510           0 :         int bErr = FALSE;
   43511           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   43512           0 :         if ( bErr )
   43513             :         {
   43514           0 :           SWIG_fail;
   43515             :         }
   43516             :       }
   43517             :       else {
   43518           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43519           0 :         SWIG_fail;
   43520             :       }
   43521             :     }
   43522             :   }
   43523          21 :   {
   43524          21 :     const int bLocalUseExceptions = GetUseExceptions();
   43525          21 :     if ( bLocalUseExceptions ) {
   43526          21 :       pushErrorHandler();
   43527             :     }
   43528          21 :     {
   43529          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43530          21 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMemAuto(arg1,arg2,arg3);
   43531          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43532             :     }
   43533          21 :     if ( bLocalUseExceptions ) {
   43534          21 :       popErrorHandler();
   43535             :     }
   43536             : #ifndef SED_HACKS
   43537             :     if ( bLocalUseExceptions ) {
   43538             :       CPLErr eclass = CPLGetLastErrorType();
   43539             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43540             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43541             :       }
   43542             :     }
   43543             : #endif
   43544             :   }
   43545          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43546          21 :   {
   43547             :     /* %typemap(freearg) char **dict */
   43548          21 :     CSLDestroy( arg3 );
   43549             :   }
   43550          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; } }
   43551             :   return resultobj;
   43552           0 : fail:
   43553           0 :   {
   43554             :     /* %typemap(freearg) char **dict */
   43555           0 :     CSLDestroy( arg3 );
   43556             :   }
   43557             :   return NULL;
   43558             : }
   43559             : 
   43560             : 
   43561           1 : SWIGINTERN PyObject *_wrap_Band_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43562           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43563           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43564           1 :   GDALRWFlag arg2 ;
   43565           1 :   int arg3 ;
   43566           1 :   int arg4 ;
   43567           1 :   int arg5 ;
   43568           1 :   int arg6 ;
   43569           1 :   int arg7 ;
   43570           1 :   int arg8 ;
   43571           1 :   GDALDataType arg9 ;
   43572           1 :   size_t arg10 ;
   43573           1 :   char **arg11 = (char **) NULL ;
   43574           1 :   void *argp1 = 0 ;
   43575           1 :   int res1 = 0 ;
   43576           1 :   int val2 ;
   43577           1 :   int ecode2 = 0 ;
   43578           1 :   int val3 ;
   43579           1 :   int ecode3 = 0 ;
   43580           1 :   int val4 ;
   43581           1 :   int ecode4 = 0 ;
   43582           1 :   int val5 ;
   43583           1 :   int ecode5 = 0 ;
   43584           1 :   int val6 ;
   43585           1 :   int ecode6 = 0 ;
   43586           1 :   int val7 ;
   43587           1 :   int ecode7 = 0 ;
   43588           1 :   int val8 ;
   43589           1 :   int ecode8 = 0 ;
   43590           1 :   size_t val10 ;
   43591           1 :   int ecode10 = 0 ;
   43592           1 :   PyObject * obj0 = 0 ;
   43593           1 :   PyObject * obj1 = 0 ;
   43594           1 :   PyObject * obj2 = 0 ;
   43595           1 :   PyObject * obj3 = 0 ;
   43596           1 :   PyObject * obj4 = 0 ;
   43597           1 :   PyObject * obj5 = 0 ;
   43598           1 :   PyObject * obj6 = 0 ;
   43599           1 :   PyObject * obj7 = 0 ;
   43600           1 :   PyObject * obj8 = 0 ;
   43601           1 :   PyObject * obj9 = 0 ;
   43602           1 :   PyObject * obj10 = 0 ;
   43603           1 :   char * kwnames[] = {
   43604             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"options",  NULL 
   43605             :   };
   43606           1 :   CPLVirtualMemShadow *result = 0 ;
   43607             :   
   43608           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOO|O:Band_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   43609           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43610           1 :   if (!SWIG_IsOK(res1)) {
   43611           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43612             :   }
   43613           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43614           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43615           1 :   if (!SWIG_IsOK(ecode2)) {
   43616           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   43617             :   } 
   43618           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   43619           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   43620           1 :   if (!SWIG_IsOK(ecode3)) {
   43621           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   43622             :   } 
   43623           1 :   arg3 = static_cast< int >(val3);
   43624           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43625           1 :   if (!SWIG_IsOK(ecode4)) {
   43626           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   43627             :   } 
   43628           1 :   arg4 = static_cast< int >(val4);
   43629           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   43630           1 :   if (!SWIG_IsOK(ecode5)) {
   43631           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   43632             :   } 
   43633           1 :   arg5 = static_cast< int >(val5);
   43634           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   43635           1 :   if (!SWIG_IsOK(ecode6)) {
   43636           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   43637             :   } 
   43638           1 :   arg6 = static_cast< int >(val6);
   43639           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   43640           1 :   if (!SWIG_IsOK(ecode7)) {
   43641           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   43642             :   } 
   43643           1 :   arg7 = static_cast< int >(val7);
   43644           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   43645           1 :   if (!SWIG_IsOK(ecode8)) {
   43646           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   43647             :   } 
   43648           1 :   arg8 = static_cast< int >(val8);
   43649           1 :   {
   43650             :     // %typemap(in) GDALDataType
   43651           1 :     int val = 0;
   43652           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   43653           1 :     if (!SWIG_IsOK(ecode)) {
   43654           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   43655             :     }
   43656           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   43657             :     {
   43658           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   43659             :     }
   43660           1 :     arg9 = static_cast<GDALDataType>(val);
   43661             :   }
   43662           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   43663           1 :   if (!SWIG_IsOK(ecode10)) {
   43664           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetTiledVirtualMem" "', argument " "10"" of type '" "size_t""'");
   43665             :   } 
   43666           1 :   arg10 = static_cast< size_t >(val10);
   43667           1 :   if (obj10) {
   43668           0 :     {
   43669             :       /* %typemap(in) char **dict */
   43670           0 :       arg11 = NULL;
   43671           0 :       if ( PySequence_Check( obj10 ) ) {
   43672           0 :         int bErr = FALSE;
   43673           0 :         arg11 = CSLFromPySequence(obj10, &bErr);
   43674           0 :         if ( bErr )
   43675             :         {
   43676           0 :           SWIG_fail;
   43677             :         }
   43678             :       }
   43679           0 :       else if ( PyMapping_Check( obj10 ) ) {
   43680           0 :         int bErr = FALSE;
   43681           0 :         arg11 = CSLFromPyMapping(obj10, &bErr);
   43682           0 :         if ( bErr )
   43683             :         {
   43684           0 :           SWIG_fail;
   43685             :         }
   43686             :       }
   43687             :       else {
   43688           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43689           0 :         SWIG_fail;
   43690             :       }
   43691             :     }
   43692             :   }
   43693           1 :   {
   43694           1 :     const int bLocalUseExceptions = GetUseExceptions();
   43695           1 :     if ( bLocalUseExceptions ) {
   43696           1 :       pushErrorHandler();
   43697             :     }
   43698           1 :     {
   43699           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43700           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   43701           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43702             :     }
   43703           1 :     if ( bLocalUseExceptions ) {
   43704           1 :       popErrorHandler();
   43705             :     }
   43706             : #ifndef SED_HACKS
   43707             :     if ( bLocalUseExceptions ) {
   43708             :       CPLErr eclass = CPLGetLastErrorType();
   43709             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43710             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43711             :       }
   43712             :     }
   43713             : #endif
   43714             :   }
   43715           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43716           1 :   {
   43717             :     /* %typemap(freearg) char **dict */
   43718           1 :     CSLDestroy( arg11 );
   43719             :   }
   43720           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; } }
   43721             :   return resultobj;
   43722           0 : fail:
   43723           0 :   {
   43724             :     /* %typemap(freearg) char **dict */
   43725           0 :     CSLDestroy( arg11 );
   43726             :   }
   43727             :   return NULL;
   43728             : }
   43729             : 
   43730             : 
   43731          26 : SWIGINTERN PyObject *_wrap_Band_GetDataCoverageStatus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43732          26 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43733          26 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43734          26 :   int arg2 ;
   43735          26 :   int arg3 ;
   43736          26 :   int arg4 ;
   43737          26 :   int arg5 ;
   43738          26 :   int arg6 = (int) 0 ;
   43739          26 :   double *arg7 = (double *) NULL ;
   43740          26 :   void *argp1 = 0 ;
   43741          26 :   int res1 = 0 ;
   43742          26 :   int val2 ;
   43743          26 :   int ecode2 = 0 ;
   43744          26 :   int val3 ;
   43745          26 :   int ecode3 = 0 ;
   43746          26 :   int val4 ;
   43747          26 :   int ecode4 = 0 ;
   43748          26 :   int val5 ;
   43749          26 :   int ecode5 = 0 ;
   43750          26 :   int val6 ;
   43751          26 :   int ecode6 = 0 ;
   43752          26 :   double temp7 ;
   43753          26 :   int res7 = SWIG_TMPOBJ ;
   43754          26 :   PyObject *swig_obj[6] ;
   43755          26 :   int result;
   43756             :   
   43757          26 :   arg7 = &temp7;
   43758          26 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetDataCoverageStatus", 5, 6, swig_obj)) SWIG_fail;
   43759          26 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43760          26 :   if (!SWIG_IsOK(res1)) {
   43761           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataCoverageStatus" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43762             :   }
   43763          26 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43764          26 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43765          26 :   if (!SWIG_IsOK(ecode2)) {
   43766           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetDataCoverageStatus" "', argument " "2"" of type '" "int""'");
   43767             :   } 
   43768          26 :   arg2 = static_cast< int >(val2);
   43769          26 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43770          26 :   if (!SWIG_IsOK(ecode3)) {
   43771           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetDataCoverageStatus" "', argument " "3"" of type '" "int""'");
   43772             :   } 
   43773          26 :   arg3 = static_cast< int >(val3);
   43774          26 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43775          26 :   if (!SWIG_IsOK(ecode4)) {
   43776           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetDataCoverageStatus" "', argument " "4"" of type '" "int""'");
   43777             :   } 
   43778          26 :   arg4 = static_cast< int >(val4);
   43779          26 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43780          26 :   if (!SWIG_IsOK(ecode5)) {
   43781           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetDataCoverageStatus" "', argument " "5"" of type '" "int""'");
   43782             :   } 
   43783          26 :   arg5 = static_cast< int >(val5);
   43784          26 :   if (swig_obj[5]) {
   43785           0 :     ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
   43786           0 :     if (!SWIG_IsOK(ecode6)) {
   43787           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDataCoverageStatus" "', argument " "6"" of type '" "int""'");
   43788             :     } 
   43789             :     arg6 = static_cast< int >(val6);
   43790             :   }
   43791          26 :   {
   43792          26 :     const int bLocalUseExceptions = GetUseExceptions();
   43793          26 :     if ( bLocalUseExceptions ) {
   43794           6 :       pushErrorHandler();
   43795             :     }
   43796          26 :     {
   43797          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43798          26 :       result = (int)GDALRasterBandShadow_GetDataCoverageStatus(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   43799          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43800             :     }
   43801          26 :     if ( bLocalUseExceptions ) {
   43802           6 :       popErrorHandler();
   43803             :     }
   43804             : #ifndef SED_HACKS
   43805             :     if ( bLocalUseExceptions ) {
   43806             :       CPLErr eclass = CPLGetLastErrorType();
   43807             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43808             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43809             :       }
   43810             :     }
   43811             : #endif
   43812             :   }
   43813          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43814          26 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   43815          26 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   43816             :   } else {
   43817           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43818           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   43819             :   }
   43820          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; } }
   43821             :   return resultobj;
   43822             : fail:
   43823             :   return NULL;
   43824             : }
   43825             : 
   43826             : 
   43827           2 : SWIGINTERN PyObject *_wrap_Band_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43828           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43829           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43830           2 :   int arg2 ;
   43831           2 :   int arg3 ;
   43832           2 :   int arg4 ;
   43833           2 :   int arg5 ;
   43834           2 :   int *arg6 = (int *) 0 ;
   43835           2 :   int *arg7 = (int *) 0 ;
   43836           2 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   43837           2 :   char **arg9 = (char **) NULL ;
   43838           2 :   void *argp1 = 0 ;
   43839           2 :   int res1 = 0 ;
   43840           2 :   int val2 ;
   43841           2 :   int ecode2 = 0 ;
   43842           2 :   int val3 ;
   43843           2 :   int ecode3 = 0 ;
   43844           2 :   int val4 ;
   43845           2 :   int ecode4 = 0 ;
   43846           2 :   int val5 ;
   43847           2 :   int ecode5 = 0 ;
   43848           2 :   void *argp6 = 0 ;
   43849           2 :   int res6 = 0 ;
   43850           2 :   void *argp7 = 0 ;
   43851           2 :   int res7 = 0 ;
   43852           2 :   int val8 ;
   43853           2 :   PyObject *swig_obj[9] ;
   43854           2 :   CPLErr result;
   43855             :   
   43856           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_AdviseRead", 5, 9, swig_obj)) SWIG_fail;
   43857           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43858           2 :   if (!SWIG_IsOK(res1)) {
   43859           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AdviseRead" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43860             :   }
   43861           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43862           2 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43863           2 :   if (!SWIG_IsOK(ecode2)) {
   43864           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_AdviseRead" "', argument " "2"" of type '" "int""'");
   43865             :   } 
   43866           2 :   arg2 = static_cast< int >(val2);
   43867           2 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43868           2 :   if (!SWIG_IsOK(ecode3)) {
   43869           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_AdviseRead" "', argument " "3"" of type '" "int""'");
   43870             :   } 
   43871           2 :   arg3 = static_cast< int >(val3);
   43872           2 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43873           2 :   if (!SWIG_IsOK(ecode4)) {
   43874           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_AdviseRead" "', argument " "4"" of type '" "int""'");
   43875             :   } 
   43876           2 :   arg4 = static_cast< int >(val4);
   43877           2 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43878           2 :   if (!SWIG_IsOK(ecode5)) {
   43879           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_AdviseRead" "', argument " "5"" of type '" "int""'");
   43880             :   } 
   43881           2 :   arg5 = static_cast< int >(val5);
   43882           2 :   if (swig_obj[5]) {
   43883           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   43884           0 :     if (!SWIG_IsOK(res6)) {
   43885           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Band_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   43886             :     }
   43887           0 :     arg6 = reinterpret_cast< int * >(argp6);
   43888             :   }
   43889           2 :   if (swig_obj[6]) {
   43890           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   43891           0 :     if (!SWIG_IsOK(res7)) {
   43892           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Band_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   43893             :     }
   43894           0 :     arg7 = reinterpret_cast< int * >(argp7);
   43895             :   }
   43896           2 :   if (swig_obj[7]) {
   43897           0 :     {
   43898             :       /* %typemap(in) (int *optional_##int) */
   43899           0 :       if ( swig_obj[7] == Py_None ) {
   43900             :         arg8 = 0;
   43901             :       }
   43902           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   43903             :         arg8 = (GDALDataType *) &val8;
   43904             :       }
   43905             :       else {
   43906           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   43907           0 :         SWIG_fail;
   43908             :       }
   43909             :     }
   43910             :   }
   43911           2 :   if (swig_obj[8]) {
   43912           0 :     {
   43913             :       /* %typemap(in) char **dict */
   43914           0 :       arg9 = NULL;
   43915           0 :       if ( PySequence_Check( swig_obj[8] ) ) {
   43916           0 :         int bErr = FALSE;
   43917           0 :         arg9 = CSLFromPySequence(swig_obj[8], &bErr);
   43918           0 :         if ( bErr )
   43919             :         {
   43920           0 :           SWIG_fail;
   43921             :         }
   43922             :       }
   43923           0 :       else if ( PyMapping_Check( swig_obj[8] ) ) {
   43924           0 :         int bErr = FALSE;
   43925           0 :         arg9 = CSLFromPyMapping(swig_obj[8], &bErr);
   43926           0 :         if ( bErr )
   43927             :         {
   43928           0 :           SWIG_fail;
   43929             :         }
   43930             :       }
   43931             :       else {
   43932           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43933           0 :         SWIG_fail;
   43934             :       }
   43935             :     }
   43936             :   }
   43937           2 :   {
   43938           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43939           2 :     if ( bLocalUseExceptions ) {
   43940           0 :       pushErrorHandler();
   43941             :     }
   43942           2 :     {
   43943           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43944           2 :       result = (CPLErr)GDALRasterBandShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   43945           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43946             :     }
   43947           2 :     if ( bLocalUseExceptions ) {
   43948           0 :       popErrorHandler();
   43949             :     }
   43950             : #ifndef SED_HACKS
   43951             :     if ( bLocalUseExceptions ) {
   43952             :       CPLErr eclass = CPLGetLastErrorType();
   43953             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43954             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43955             :       }
   43956             :     }
   43957             : #endif
   43958             :   }
   43959           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43960           2 :   {
   43961             :     /* %typemap(freearg) char **dict */
   43962           2 :     CSLDestroy( arg9 );
   43963             :   }
   43964           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; } }
   43965             :   return resultobj;
   43966           0 : fail:
   43967           0 :   {
   43968             :     /* %typemap(freearg) char **dict */
   43969           0 :     CSLDestroy( arg9 );
   43970             :   }
   43971             :   return NULL;
   43972             : }
   43973             : 
   43974             : 
   43975          69 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43976          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43977          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43978          69 :   double arg2 ;
   43979          69 :   double arg3 ;
   43980          69 :   GDALRIOResampleAlg arg4 ;
   43981          69 :   double *arg5 = (double *) 0 ;
   43982          69 :   double *arg6 = (double *) 0 ;
   43983          69 :   void *argp1 = 0 ;
   43984          69 :   int res1 = 0 ;
   43985          69 :   double val2 ;
   43986          69 :   int ecode2 = 0 ;
   43987          69 :   double val3 ;
   43988          69 :   int ecode3 = 0 ;
   43989          69 :   double temp5 ;
   43990          69 :   int res5 = SWIG_TMPOBJ ;
   43991          69 :   double temp6 ;
   43992          69 :   int res6 = SWIG_TMPOBJ ;
   43993          69 :   PyObject *swig_obj[4] ;
   43994          69 :   CPLErr result;
   43995             :   
   43996          69 :   arg5 = &temp5;
   43997          69 :   arg6 = &temp6;
   43998          69 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtPoint", 4, 4, swig_obj)) SWIG_fail;
   43999          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44000          69 :   if (!SWIG_IsOK(res1)) {
   44001           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtPoint" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44002             :   }
   44003          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44004          69 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44005          69 :   if (!SWIG_IsOK(ecode2)) {
   44006           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtPoint" "', argument " "2"" of type '" "double""'");
   44007             :   } 
   44008          69 :   arg2 = static_cast< double >(val2);
   44009          69 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   44010          69 :   if (!SWIG_IsOK(ecode3)) {
   44011           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtPoint" "', argument " "3"" of type '" "double""'");
   44012             :   } 
   44013          69 :   arg3 = static_cast< double >(val3);
   44014          69 :   {
   44015             :     // %typemap(in) GDALRIOResampleAlg
   44016          69 :     int val = 0;
   44017          69 :     int ecode = SWIG_AsVal_int(swig_obj[3], &val);
   44018          69 :     if (!SWIG_IsOK(ecode)) {
   44019           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   44020             :     }
   44021          69 :     if( val < 0 ||
   44022          69 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   44023          69 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   44024             :       val > static_cast<int>(GRIORA_LAST) )
   44025             :     {
   44026           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   44027             :     }
   44028          69 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   44029             :   }
   44030          69 :   {
   44031          69 :     const int bLocalUseExceptions = GetUseExceptions();
   44032          69 :     if ( bLocalUseExceptions ) {
   44033          68 :       pushErrorHandler();
   44034             :     }
   44035          69 :     {
   44036          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44037          69 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtPoint(arg1,arg2,arg3,arg4,arg5,arg6);
   44038          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44039             :     }
   44040          69 :     if ( bLocalUseExceptions ) {
   44041          68 :       popErrorHandler();
   44042             :     }
   44043             : #ifndef SED_HACKS
   44044             :     if ( bLocalUseExceptions ) {
   44045             :       CPLErr eclass = CPLGetLastErrorType();
   44046             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44047             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44048             :       }
   44049             :     }
   44050             : #endif
   44051             :   }
   44052          69 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44053          69 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   44054          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   44055             :   } else {
   44056           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44057           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   44058             :   }
   44059          69 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   44060          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   44061             :   } else {
   44062           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44063           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   44064             :   }
   44065          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; } }
   44066             :   return resultobj;
   44067             : fail:
   44068             :   return NULL;
   44069             : }
   44070             : 
   44071             : 
   44072          15 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtGeolocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44073          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44074          15 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44075          15 :   double arg2 ;
   44076          15 :   double arg3 ;
   44077          15 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   44078          15 :   GDALRIOResampleAlg arg5 ;
   44079          15 :   double *arg6 = (double *) 0 ;
   44080          15 :   double *arg7 = (double *) 0 ;
   44081          15 :   char **arg8 = (char **) NULL ;
   44082          15 :   void *argp1 = 0 ;
   44083          15 :   int res1 = 0 ;
   44084          15 :   double val2 ;
   44085          15 :   int ecode2 = 0 ;
   44086          15 :   double val3 ;
   44087          15 :   int ecode3 = 0 ;
   44088          15 :   void *argp4 = 0 ;
   44089          15 :   int res4 = 0 ;
   44090          15 :   double temp6 ;
   44091          15 :   int res6 = SWIG_TMPOBJ ;
   44092          15 :   double temp7 ;
   44093          15 :   int res7 = SWIG_TMPOBJ ;
   44094          15 :   PyObject *swig_obj[6] ;
   44095          15 :   CPLErr result;
   44096             :   
   44097          15 :   arg6 = &temp6;
   44098          15 :   arg7 = &temp7;
   44099          15 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtGeolocation", 5, 6, swig_obj)) SWIG_fail;
   44100          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44101          15 :   if (!SWIG_IsOK(res1)) {
   44102           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtGeolocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44103             :   }
   44104          15 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44105          15 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44106          15 :   if (!SWIG_IsOK(ecode2)) {
   44107           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtGeolocation" "', argument " "2"" of type '" "double""'");
   44108             :   } 
   44109          15 :   arg2 = static_cast< double >(val2);
   44110          15 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   44111          15 :   if (!SWIG_IsOK(ecode3)) {
   44112           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtGeolocation" "', argument " "3"" of type '" "double""'");
   44113             :   } 
   44114          15 :   arg3 = static_cast< double >(val3);
   44115          15 :   res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   44116          15 :   if (!SWIG_IsOK(res4)) {
   44117           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_InterpolateAtGeolocation" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   44118             :   }
   44119          15 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   44120          15 :   {
   44121             :     // %typemap(in) GDALRIOResampleAlg
   44122          15 :     int val = 0;
   44123          15 :     int ecode = SWIG_AsVal_int(swig_obj[4], &val);
   44124          15 :     if (!SWIG_IsOK(ecode)) {
   44125           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   44126             :     }
   44127          15 :     if( val < 0 ||
   44128          15 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   44129          15 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   44130             :       val > static_cast<int>(GRIORA_LAST) )
   44131             :     {
   44132           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   44133             :     }
   44134          15 :     arg5 = static_cast< GDALRIOResampleAlg >(val);
   44135             :   }
   44136          15 :   if (swig_obj[5]) {
   44137           0 :     {
   44138             :       /* %typemap(in) char **dict */
   44139           0 :       arg8 = NULL;
   44140           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   44141           0 :         int bErr = FALSE;
   44142           0 :         arg8 = CSLFromPySequence(swig_obj[5], &bErr);
   44143           0 :         if ( bErr )
   44144             :         {
   44145           0 :           SWIG_fail;
   44146             :         }
   44147             :       }
   44148           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   44149           0 :         int bErr = FALSE;
   44150           0 :         arg8 = CSLFromPyMapping(swig_obj[5], &bErr);
   44151           0 :         if ( bErr )
   44152             :         {
   44153           0 :           SWIG_fail;
   44154             :         }
   44155             :       }
   44156             :       else {
   44157           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   44158           0 :         SWIG_fail;
   44159             :       }
   44160             :     }
   44161             :   }
   44162          15 :   {
   44163          15 :     const int bLocalUseExceptions = GetUseExceptions();
   44164          15 :     if ( bLocalUseExceptions ) {
   44165          15 :       pushErrorHandler();
   44166             :     }
   44167          15 :     {
   44168          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44169          15 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtGeolocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   44170          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44171             :     }
   44172          15 :     if ( bLocalUseExceptions ) {
   44173          15 :       popErrorHandler();
   44174             :     }
   44175             : #ifndef SED_HACKS
   44176             :     if ( bLocalUseExceptions ) {
   44177             :       CPLErr eclass = CPLGetLastErrorType();
   44178             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44179             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44180             :       }
   44181             :     }
   44182             : #endif
   44183             :   }
   44184          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44185          15 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   44186          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   44187             :   } else {
   44188           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44189           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   44190             :   }
   44191          15 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   44192          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   44193             :   } else {
   44194           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44195           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   44196             :   }
   44197          15 :   {
   44198             :     /* %typemap(freearg) char **dict */
   44199          15 :     CSLDestroy( arg8 );
   44200             :   }
   44201          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; } }
   44202             :   return resultobj;
   44203           0 : fail:
   44204           0 :   {
   44205             :     /* %typemap(freearg) char **dict */
   44206           0 :     CSLDestroy( arg8 );
   44207             :   }
   44208             :   return NULL;
   44209             : }
   44210             : 
   44211             : 
   44212           2 : SWIGINTERN PyObject *_wrap_Band_ComputeMinMaxLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44213           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44214           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44215           2 :   double *arg2 = (double *) 0 ;
   44216           2 :   double *arg3 = (double *) 0 ;
   44217           2 :   int *arg4 = (int *) 0 ;
   44218           2 :   int *arg5 = (int *) 0 ;
   44219           2 :   int *arg6 = (int *) 0 ;
   44220           2 :   int *arg7 = (int *) 0 ;
   44221           2 :   void *argp1 = 0 ;
   44222           2 :   int res1 = 0 ;
   44223           2 :   double temp2 ;
   44224           2 :   int res2 = SWIG_TMPOBJ ;
   44225           2 :   double temp3 ;
   44226           2 :   int res3 = SWIG_TMPOBJ ;
   44227           2 :   int temp4 ;
   44228           2 :   int res4 = SWIG_TMPOBJ ;
   44229           2 :   int temp5 ;
   44230           2 :   int res5 = SWIG_TMPOBJ ;
   44231           2 :   int temp6 ;
   44232           2 :   int res6 = SWIG_TMPOBJ ;
   44233           2 :   int temp7 ;
   44234           2 :   int res7 = SWIG_TMPOBJ ;
   44235           2 :   PyObject *swig_obj[1] ;
   44236           2 :   CPLErr result;
   44237             :   
   44238           2 :   arg2 = &temp2;
   44239           2 :   arg3 = &temp3;
   44240           2 :   arg4 = &temp4;
   44241           2 :   arg5 = &temp5;
   44242           2 :   arg6 = &temp6;
   44243           2 :   arg7 = &temp7;
   44244           2 :   if (!args) SWIG_fail;
   44245           2 :   swig_obj[0] = args;
   44246           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44247           2 :   if (!SWIG_IsOK(res1)) {
   44248           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeMinMaxLocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44249             :   }
   44250           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44251           2 :   {
   44252           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44253           2 :     if ( bLocalUseExceptions ) {
   44254           0 :       pushErrorHandler();
   44255             :     }
   44256           2 :     {
   44257           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44258           2 :       result = (CPLErr)GDALRasterBandShadow_ComputeMinMaxLocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   44259           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44260             :     }
   44261           2 :     if ( bLocalUseExceptions ) {
   44262           0 :       popErrorHandler();
   44263             :     }
   44264             : #ifndef SED_HACKS
   44265             :     if ( bLocalUseExceptions ) {
   44266             :       CPLErr eclass = CPLGetLastErrorType();
   44267             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44268             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44269             :       }
   44270             :     }
   44271             : #endif
   44272             :   }
   44273           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44274           2 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   44275           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   44276             :   } else {
   44277           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44278           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   44279             :   }
   44280           2 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   44281           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   44282             :   } else {
   44283           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44284           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   44285             :   }
   44286           2 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   44287           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   44288             :   } else {
   44289           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44290           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   44291             :   }
   44292           2 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   44293           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   44294             :   } else {
   44295           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44296           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   44297             :   }
   44298           2 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   44299           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   44300             :   } else {
   44301           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44302           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   44303             :   }
   44304           2 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   44305           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
   44306             :   } else {
   44307           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44308           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
   44309             :   }
   44310           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; } }
   44311             :   return resultobj;
   44312             : fail:
   44313             :   return NULL;
   44314             : }
   44315             : 
   44316             : 
   44317          24 : SWIGINTERN PyObject *_wrap_Band_AsMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44318          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44319          24 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44320          24 :   void *argp1 = 0 ;
   44321          24 :   int res1 = 0 ;
   44322          24 :   PyObject *swig_obj[1] ;
   44323          24 :   GDALMDArrayHS *result = 0 ;
   44324             :   
   44325          24 :   if (!args) SWIG_fail;
   44326          24 :   swig_obj[0] = args;
   44327          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44328          24 :   if (!SWIG_IsOK(res1)) {
   44329           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsMDArray" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44330             :   }
   44331          24 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44332          24 :   {
   44333          24 :     const int bLocalUseExceptions = GetUseExceptions();
   44334          24 :     if ( bLocalUseExceptions ) {
   44335           3 :       pushErrorHandler();
   44336             :     }
   44337          24 :     {
   44338          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44339          24 :       result = (GDALMDArrayHS *)GDALRasterBandShadow_AsMDArray(arg1);
   44340          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44341             :     }
   44342          24 :     if ( bLocalUseExceptions ) {
   44343           3 :       popErrorHandler();
   44344             :     }
   44345             : #ifndef SED_HACKS
   44346             :     if ( bLocalUseExceptions ) {
   44347             :       CPLErr eclass = CPLGetLastErrorType();
   44348             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44349             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44350             :       }
   44351             :     }
   44352             : #endif
   44353             :   }
   44354          24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   44355          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; } }
   44356             :   return resultobj;
   44357             : fail:
   44358             :   return NULL;
   44359             : }
   44360             : 
   44361             : 
   44362        4884 : SWIGINTERN PyObject *_wrap_Band__EnablePixelTypeSignedByteWarning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44363        4884 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44364        4884 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44365        4884 :   bool arg2 ;
   44366        4884 :   void *argp1 = 0 ;
   44367        4884 :   int res1 = 0 ;
   44368        4884 :   bool val2 ;
   44369        4884 :   int ecode2 = 0 ;
   44370        4884 :   PyObject *swig_obj[2] ;
   44371             :   
   44372        4884 :   if (!SWIG_Python_UnpackTuple(args, "Band__EnablePixelTypeSignedByteWarning", 2, 2, swig_obj)) SWIG_fail;
   44373        4884 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44374        4884 :   if (!SWIG_IsOK(res1)) {
   44375           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44376             :   }
   44377        4884 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44378        4884 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   44379        4884 :   if (!SWIG_IsOK(ecode2)) {
   44380           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "2"" of type '" "bool""'");
   44381             :   } 
   44382        4884 :   arg2 = static_cast< bool >(val2);
   44383        4884 :   {
   44384        4884 :     const int bLocalUseExceptions = GetUseExceptions();
   44385        4884 :     if ( bLocalUseExceptions ) {
   44386        4476 :       pushErrorHandler();
   44387             :     }
   44388        4884 :     {
   44389        4884 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44390        4884 :       GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(arg1,arg2);
   44391        4884 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44392             :     }
   44393        4884 :     if ( bLocalUseExceptions ) {
   44394        4476 :       popErrorHandler();
   44395             :     }
   44396             : #ifndef SED_HACKS
   44397             :     if ( bLocalUseExceptions ) {
   44398             :       CPLErr eclass = CPLGetLastErrorType();
   44399             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44400             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44401             :       }
   44402             :     }
   44403             : #endif
   44404             :   }
   44405        4884 :   resultobj = SWIG_Py_Void();
   44406        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; } }
   44407             :   return resultobj;
   44408             : fail:
   44409             :   return NULL;
   44410             : }
   44411             : 
   44412             : 
   44413           6 : SWIGINTERN PyObject *_wrap_Band_UnaryOp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44414           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44415           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44416           6 :   GDALRasterAlgebraUnaryOperation arg2 ;
   44417           6 :   void *argp1 = 0 ;
   44418           6 :   int res1 = 0 ;
   44419           6 :   int val2 ;
   44420           6 :   int ecode2 = 0 ;
   44421           6 :   PyObject *swig_obj[2] ;
   44422           6 :   GDALComputedRasterBandShadow *result = 0 ;
   44423             :   
   44424           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_UnaryOp", 2, 2, swig_obj)) SWIG_fail;
   44425           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44426           6 :   if (!SWIG_IsOK(res1)) {
   44427           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_UnaryOp" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44428             :   }
   44429           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44430           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44431           6 :   if (!SWIG_IsOK(ecode2)) {
   44432           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_UnaryOp" "', argument " "2"" of type '" "GDALRasterAlgebraUnaryOperation""'");
   44433             :   } 
   44434           6 :   arg2 = static_cast< GDALRasterAlgebraUnaryOperation >(val2);
   44435           6 :   {
   44436           6 :     const int bLocalUseExceptions = GetUseExceptions();
   44437           6 :     if ( bLocalUseExceptions ) {
   44438           6 :       pushErrorHandler();
   44439             :     }
   44440           6 :     {
   44441           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44442           6 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_UnaryOp(arg1,arg2);
   44443           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44444             :     }
   44445           6 :     if ( bLocalUseExceptions ) {
   44446           6 :       popErrorHandler();
   44447             :     }
   44448             : #ifndef SED_HACKS
   44449             :     if ( bLocalUseExceptions ) {
   44450             :       CPLErr eclass = CPLGetLastErrorType();
   44451             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44452             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44453             :       }
   44454             :     }
   44455             : #endif
   44456             :   }
   44457           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44458           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; } }
   44459             :   return resultobj;
   44460             : fail:
   44461             :   return NULL;
   44462             : }
   44463             : 
   44464             : 
   44465          57 : SWIGINTERN PyObject *_wrap_Band_BinaryOpBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44466          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44467          57 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44468          57 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44469          57 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44470          57 :   void *argp1 = 0 ;
   44471          57 :   int res1 = 0 ;
   44472          57 :   int val2 ;
   44473          57 :   int ecode2 = 0 ;
   44474          57 :   void *argp3 = 0 ;
   44475          57 :   int res3 = 0 ;
   44476          57 :   PyObject *swig_obj[3] ;
   44477          57 :   GDALComputedRasterBandShadow *result = 0 ;
   44478             :   
   44479          57 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpBand", 3, 3, swig_obj)) SWIG_fail;
   44480          57 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44481          57 :   if (!SWIG_IsOK(res1)) {
   44482           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44483             :   }
   44484          57 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44485          57 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44486          57 :   if (!SWIG_IsOK(ecode2)) {
   44487           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44488             :   } 
   44489          57 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44490          57 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44491          57 :   if (!SWIG_IsOK(res3)) {
   44492           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44493             :   }
   44494          57 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44495          57 :   {
   44496          57 :     if (!arg3) {
   44497           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44498             :     }
   44499             :   }
   44500          57 :   {
   44501          57 :     const int bLocalUseExceptions = GetUseExceptions();
   44502          57 :     if ( bLocalUseExceptions ) {
   44503          57 :       pushErrorHandler();
   44504             :     }
   44505          57 :     {
   44506          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44507          57 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpBand(arg1,arg2,arg3);
   44508          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44509             :     }
   44510          57 :     if ( bLocalUseExceptions ) {
   44511          57 :       popErrorHandler();
   44512             :     }
   44513             : #ifndef SED_HACKS
   44514             :     if ( bLocalUseExceptions ) {
   44515             :       CPLErr eclass = CPLGetLastErrorType();
   44516             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44517             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44518             :       }
   44519             :     }
   44520             : #endif
   44521             :   }
   44522          57 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44523          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; } }
   44524             :   return resultobj;
   44525             : fail:
   44526             :   return NULL;
   44527             : }
   44528             : 
   44529             : 
   44530          59 : SWIGINTERN PyObject *_wrap_Band_BinaryOpDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44531          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44532          59 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44533          59 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44534          59 :   double arg3 ;
   44535          59 :   void *argp1 = 0 ;
   44536          59 :   int res1 = 0 ;
   44537          59 :   int val2 ;
   44538          59 :   int ecode2 = 0 ;
   44539          59 :   double val3 ;
   44540          59 :   int ecode3 = 0 ;
   44541          59 :   PyObject *swig_obj[3] ;
   44542          59 :   GDALComputedRasterBandShadow *result = 0 ;
   44543             :   
   44544          59 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDouble", 3, 3, swig_obj)) SWIG_fail;
   44545          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44546          59 :   if (!SWIG_IsOK(res1)) {
   44547           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpDouble" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44548             :   }
   44549          59 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44550          59 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44551          59 :   if (!SWIG_IsOK(ecode2)) {
   44552           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDouble" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44553             :   } 
   44554          59 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44555          59 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   44556          59 :   if (!SWIG_IsOK(ecode3)) {
   44557           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_BinaryOpDouble" "', argument " "3"" of type '" "double""'");
   44558             :   } 
   44559          59 :   arg3 = static_cast< double >(val3);
   44560          59 :   {
   44561          59 :     const int bLocalUseExceptions = GetUseExceptions();
   44562          59 :     if ( bLocalUseExceptions ) {
   44563          59 :       pushErrorHandler();
   44564             :     }
   44565          59 :     {
   44566          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44567          59 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDouble(arg1,arg2,arg3);
   44568          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44569             :     }
   44570          59 :     if ( bLocalUseExceptions ) {
   44571          59 :       popErrorHandler();
   44572             :     }
   44573             : #ifndef SED_HACKS
   44574             :     if ( bLocalUseExceptions ) {
   44575             :       CPLErr eclass = CPLGetLastErrorType();
   44576             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44577             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44578             :       }
   44579             :     }
   44580             : #endif
   44581             :   }
   44582          59 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44583          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; } }
   44584             :   return resultobj;
   44585             : fail:
   44586             :   return NULL;
   44587             : }
   44588             : 
   44589             : 
   44590          18 : SWIGINTERN PyObject *_wrap_Band_BinaryOpDoubleToBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44591          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44592          18 :   double arg1 ;
   44593          18 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44594          18 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44595          18 :   double val1 ;
   44596          18 :   int ecode1 = 0 ;
   44597          18 :   int val2 ;
   44598          18 :   int ecode2 = 0 ;
   44599          18 :   void *argp3 = 0 ;
   44600          18 :   int res3 = 0 ;
   44601          18 :   PyObject *swig_obj[3] ;
   44602          18 :   GDALComputedRasterBandShadow *result = 0 ;
   44603             :   
   44604          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDoubleToBand", 3, 3, swig_obj)) SWIG_fail;
   44605          18 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   44606          18 :   if (!SWIG_IsOK(ecode1)) {
   44607           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "1"" of type '" "double""'");
   44608             :   } 
   44609          18 :   arg1 = static_cast< double >(val1);
   44610          18 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44611          18 :   if (!SWIG_IsOK(ecode2)) {
   44612           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44613             :   } 
   44614          18 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44615          18 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44616          18 :   if (!SWIG_IsOK(res3)) {
   44617           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44618             :   }
   44619          18 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44620          18 :   {
   44621          18 :     if (!arg3) {
   44622           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44623             :     }
   44624             :   }
   44625          18 :   {
   44626          18 :     const int bLocalUseExceptions = GetUseExceptions();
   44627          18 :     if ( bLocalUseExceptions ) {
   44628          18 :       pushErrorHandler();
   44629             :     }
   44630          18 :     {
   44631          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44632          18 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDoubleToBand(arg1,arg2,arg3);
   44633          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44634             :     }
   44635          18 :     if ( bLocalUseExceptions ) {
   44636          18 :       popErrorHandler();
   44637             :     }
   44638             : #ifndef SED_HACKS
   44639             :     if ( bLocalUseExceptions ) {
   44640             :       CPLErr eclass = CPLGetLastErrorType();
   44641             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44642             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44643             :       }
   44644             :     }
   44645             : #endif
   44646             :   }
   44647          18 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44648          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; } }
   44649             :   return resultobj;
   44650             : fail:
   44651             :   return NULL;
   44652             : }
   44653             : 
   44654             : 
   44655          12 : SWIGINTERN PyObject *_wrap_Band_IfThenElse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44656          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44657          12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44658          12 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44659          12 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44660          12 :   void *argp1 = 0 ;
   44661          12 :   int res1 = 0 ;
   44662          12 :   void *argp2 = 0 ;
   44663          12 :   int res2 = 0 ;
   44664          12 :   void *argp3 = 0 ;
   44665          12 :   int res3 = 0 ;
   44666          12 :   PyObject *swig_obj[3] ;
   44667          12 :   GDALComputedRasterBandShadow *result = 0 ;
   44668             :   
   44669          12 :   if (!SWIG_Python_UnpackTuple(args, "Band_IfThenElse", 3, 3, swig_obj)) SWIG_fail;
   44670          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44671          12 :   if (!SWIG_IsOK(res1)) {
   44672           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IfThenElse" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44673             :   }
   44674          12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44675          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44676          12 :   if (!SWIG_IsOK(res2)) {
   44677           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_IfThenElse" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44678             :   }
   44679          12 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44680          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44681          12 :   if (!SWIG_IsOK(res3)) {
   44682           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_IfThenElse" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44683             :   }
   44684          12 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44685          12 :   {
   44686          12 :     if (!arg1) {
   44687           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44688             :     }
   44689             :   }
   44690          12 :   {
   44691          12 :     if (!arg2) {
   44692           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44693             :     }
   44694             :   }
   44695          12 :   {
   44696          12 :     if (!arg3) {
   44697           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44698             :     }
   44699             :   }
   44700          12 :   {
   44701          12 :     const int bLocalUseExceptions = GetUseExceptions();
   44702          12 :     if ( bLocalUseExceptions ) {
   44703          12 :       pushErrorHandler();
   44704             :     }
   44705          12 :     {
   44706          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44707          12 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_IfThenElse(arg1,arg2,arg3);
   44708          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44709             :     }
   44710          12 :     if ( bLocalUseExceptions ) {
   44711          12 :       popErrorHandler();
   44712             :     }
   44713             : #ifndef SED_HACKS
   44714             :     if ( bLocalUseExceptions ) {
   44715             :       CPLErr eclass = CPLGetLastErrorType();
   44716             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44717             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44718             :       }
   44719             :     }
   44720             : #endif
   44721             :   }
   44722          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44723          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; } }
   44724             :   return resultobj;
   44725             : fail:
   44726             :   return NULL;
   44727             : }
   44728             : 
   44729             : 
   44730          16 : SWIGINTERN PyObject *_wrap_Band_AsType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44731          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44732          16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44733          16 :   GDALDataType arg2 ;
   44734          16 :   void *argp1 = 0 ;
   44735          16 :   int res1 = 0 ;
   44736          16 :   PyObject *swig_obj[2] ;
   44737          16 :   GDALComputedRasterBandShadow *result = 0 ;
   44738             :   
   44739          16 :   if (!SWIG_Python_UnpackTuple(args, "Band_AsType", 2, 2, swig_obj)) SWIG_fail;
   44740          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44741          16 :   if (!SWIG_IsOK(res1)) {
   44742           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44743             :   }
   44744          16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44745          16 :   {
   44746             :     // %typemap(in) GDALDataType
   44747          16 :     int val = 0;
   44748          16 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   44749          16 :     if (!SWIG_IsOK(ecode)) {
   44750           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   44751             :     }
   44752          16 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   44753             :     {
   44754           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   44755             :     }
   44756          16 :     arg2 = static_cast<GDALDataType>(val);
   44757             :   }
   44758          16 :   {
   44759          16 :     const int bLocalUseExceptions = GetUseExceptions();
   44760          16 :     if ( bLocalUseExceptions ) {
   44761          16 :       pushErrorHandler();
   44762             :     }
   44763          16 :     {
   44764          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44765          16 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_AsType(arg1,arg2);
   44766          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44767             :     }
   44768          16 :     if ( bLocalUseExceptions ) {
   44769          16 :       popErrorHandler();
   44770             :     }
   44771             : #ifndef SED_HACKS
   44772             :     if ( bLocalUseExceptions ) {
   44773             :       CPLErr eclass = CPLGetLastErrorType();
   44774             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44775             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44776             :       }
   44777             :     }
   44778             : #endif
   44779             :   }
   44780          16 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44781          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; } }
   44782             :   return resultobj;
   44783             : fail:
   44784             :   return NULL;
   44785             : }
   44786             : 
   44787             : 
   44788           4 : SWIGINTERN PyObject *_wrap_Band_MaximumOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44789           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44790           4 :   int arg1 ;
   44791           4 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44792           4 :   PyObject *swig_obj[1] ;
   44793           4 :   GDALComputedRasterBandShadow *result = 0 ;
   44794             :   
   44795           4 :   if (!args) SWIG_fail;
   44796           4 :   swig_obj[0] = args;
   44797           4 :   {
   44798             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44799           4 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44800           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44801           0 :       SWIG_fail;
   44802             :     }
   44803           4 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44804           4 :     if( size > (Py_ssize_t)INT_MAX ) {
   44805           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44806           0 :       SWIG_fail;
   44807             :     }
   44808           4 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44809           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44810           0 :       SWIG_fail;
   44811             :     }
   44812           4 :     arg1 = (int)size;
   44813           4 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   44814           4 :     if( !arg2) {
   44815           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44816           0 :       SWIG_fail;
   44817             :     }
   44818             :     
   44819          12 :     for( int i = 0; i<arg1; i++ ) {
   44820           8 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   44821           8 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44822           8 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44823           8 :       if (!rawobjectpointer) {
   44824           0 :         Py_DECREF(o);
   44825           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44826           0 :         SWIG_fail;
   44827             :       }
   44828           8 :       arg2[i] = rawobjectpointer;
   44829           8 :       Py_DECREF(o);
   44830             :       
   44831             :     }
   44832             :   }
   44833           4 :   {
   44834           4 :     const int bLocalUseExceptions = GetUseExceptions();
   44835           4 :     if ( bLocalUseExceptions ) {
   44836           4 :       pushErrorHandler();
   44837             :     }
   44838           4 :     {
   44839           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44840           4 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaximumOfNBands(arg1,arg2);
   44841           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44842             :     }
   44843           4 :     if ( bLocalUseExceptions ) {
   44844           4 :       popErrorHandler();
   44845             :     }
   44846             : #ifndef SED_HACKS
   44847             :     if ( bLocalUseExceptions ) {
   44848             :       CPLErr eclass = CPLGetLastErrorType();
   44849             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44850             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44851             :       }
   44852             :     }
   44853             : #endif
   44854             :   }
   44855           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44856           4 :   {
   44857             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44858           4 :     CPLFree( arg2 );
   44859             :   }
   44860           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; } }
   44861             :   return resultobj;
   44862           0 : fail:
   44863           0 :   {
   44864             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44865           0 :     CPLFree( arg2 );
   44866             :   }
   44867             :   return NULL;
   44868             : }
   44869             : 
   44870             : 
   44871           2 : SWIGINTERN PyObject *_wrap_Band_MaxConstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44872           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44873           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44874           2 :   double arg2 ;
   44875           2 :   void *argp1 = 0 ;
   44876           2 :   int res1 = 0 ;
   44877           2 :   double val2 ;
   44878           2 :   int ecode2 = 0 ;
   44879           2 :   PyObject *swig_obj[2] ;
   44880           2 :   GDALComputedRasterBandShadow *result = 0 ;
   44881             :   
   44882           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_MaxConstant", 2, 2, swig_obj)) SWIG_fail;
   44883           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44884           2 :   if (!SWIG_IsOK(res1)) {
   44885           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MaxConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44886             :   }
   44887           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44888           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44889           2 :   if (!SWIG_IsOK(ecode2)) {
   44890           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MaxConstant" "', argument " "2"" of type '" "double""'");
   44891             :   } 
   44892           2 :   arg2 = static_cast< double >(val2);
   44893           2 :   {
   44894           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44895           2 :     if ( bLocalUseExceptions ) {
   44896           2 :       pushErrorHandler();
   44897             :     }
   44898           2 :     {
   44899           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44900           2 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaxConstant(arg1,arg2);
   44901           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44902             :     }
   44903           2 :     if ( bLocalUseExceptions ) {
   44904           2 :       popErrorHandler();
   44905             :     }
   44906             : #ifndef SED_HACKS
   44907             :     if ( bLocalUseExceptions ) {
   44908             :       CPLErr eclass = CPLGetLastErrorType();
   44909             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44910             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44911             :       }
   44912             :     }
   44913             : #endif
   44914             :   }
   44915           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44916           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; } }
   44917             :   return resultobj;
   44918             : fail:
   44919             :   return NULL;
   44920             : }
   44921             : 
   44922             : 
   44923           4 : SWIGINTERN PyObject *_wrap_Band_MinimumOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44924           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44925           4 :   int arg1 ;
   44926           4 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44927           4 :   PyObject *swig_obj[1] ;
   44928           4 :   GDALComputedRasterBandShadow *result = 0 ;
   44929             :   
   44930           4 :   if (!args) SWIG_fail;
   44931           4 :   swig_obj[0] = args;
   44932           4 :   {
   44933             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44934           4 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44935           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44936           0 :       SWIG_fail;
   44937             :     }
   44938           4 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44939           4 :     if( size > (Py_ssize_t)INT_MAX ) {
   44940           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44941           0 :       SWIG_fail;
   44942             :     }
   44943           4 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44944           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44945           0 :       SWIG_fail;
   44946             :     }
   44947           4 :     arg1 = (int)size;
   44948           4 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   44949           4 :     if( !arg2) {
   44950           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44951           0 :       SWIG_fail;
   44952             :     }
   44953             :     
   44954          12 :     for( int i = 0; i<arg1; i++ ) {
   44955           8 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   44956           8 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44957           8 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44958           8 :       if (!rawobjectpointer) {
   44959           0 :         Py_DECREF(o);
   44960           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44961           0 :         SWIG_fail;
   44962             :       }
   44963           8 :       arg2[i] = rawobjectpointer;
   44964           8 :       Py_DECREF(o);
   44965             :       
   44966             :     }
   44967             :   }
   44968           4 :   {
   44969           4 :     const int bLocalUseExceptions = GetUseExceptions();
   44970           4 :     if ( bLocalUseExceptions ) {
   44971           4 :       pushErrorHandler();
   44972             :     }
   44973           4 :     {
   44974           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44975           4 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinimumOfNBands(arg1,arg2);
   44976           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44977             :     }
   44978           4 :     if ( bLocalUseExceptions ) {
   44979           4 :       popErrorHandler();
   44980             :     }
   44981             : #ifndef SED_HACKS
   44982             :     if ( bLocalUseExceptions ) {
   44983             :       CPLErr eclass = CPLGetLastErrorType();
   44984             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44985             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44986             :       }
   44987             :     }
   44988             : #endif
   44989             :   }
   44990           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44991           4 :   {
   44992             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44993           4 :     CPLFree( arg2 );
   44994             :   }
   44995           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; } }
   44996             :   return resultobj;
   44997           0 : fail:
   44998           0 :   {
   44999             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   45000           0 :     CPLFree( arg2 );
   45001             :   }
   45002             :   return NULL;
   45003             : }
   45004             : 
   45005             : 
   45006           2 : SWIGINTERN PyObject *_wrap_Band_MinConstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45007           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45008           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45009           2 :   double arg2 ;
   45010           2 :   void *argp1 = 0 ;
   45011           2 :   int res1 = 0 ;
   45012           2 :   double val2 ;
   45013           2 :   int ecode2 = 0 ;
   45014           2 :   PyObject *swig_obj[2] ;
   45015           2 :   GDALComputedRasterBandShadow *result = 0 ;
   45016             :   
   45017           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_MinConstant", 2, 2, swig_obj)) SWIG_fail;
   45018           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45019           2 :   if (!SWIG_IsOK(res1)) {
   45020           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MinConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45021             :   }
   45022           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45023           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   45024           2 :   if (!SWIG_IsOK(ecode2)) {
   45025           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MinConstant" "', argument " "2"" of type '" "double""'");
   45026             :   } 
   45027           2 :   arg2 = static_cast< double >(val2);
   45028           2 :   {
   45029           2 :     const int bLocalUseExceptions = GetUseExceptions();
   45030           2 :     if ( bLocalUseExceptions ) {
   45031           2 :       pushErrorHandler();
   45032             :     }
   45033           2 :     {
   45034           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45035           2 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinConstant(arg1,arg2);
   45036           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45037             :     }
   45038           2 :     if ( bLocalUseExceptions ) {
   45039           2 :       popErrorHandler();
   45040             :     }
   45041             : #ifndef SED_HACKS
   45042             :     if ( bLocalUseExceptions ) {
   45043             :       CPLErr eclass = CPLGetLastErrorType();
   45044             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45045             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45046             :       }
   45047             :     }
   45048             : #endif
   45049             :   }
   45050           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   45051           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; } }
   45052             :   return resultobj;
   45053             : fail:
   45054             :   return NULL;
   45055             : }
   45056             : 
   45057             : 
   45058           3 : SWIGINTERN PyObject *_wrap_Band_MeanOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45059           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45060           3 :   int arg1 ;
   45061           3 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   45062           3 :   PyObject *swig_obj[1] ;
   45063           3 :   GDALComputedRasterBandShadow *result = 0 ;
   45064             :   
   45065           3 :   if (!args) SWIG_fail;
   45066           3 :   swig_obj[0] = args;
   45067           3 :   {
   45068             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   45069           3 :     if ( !PySequence_Check(swig_obj[0]) ) {
   45070           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45071           0 :       SWIG_fail;
   45072             :     }
   45073           3 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   45074           3 :     if( size > (Py_ssize_t)INT_MAX ) {
   45075           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   45076           0 :       SWIG_fail;
   45077             :     }
   45078           3 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   45079           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   45080           0 :       SWIG_fail;
   45081             :     }
   45082           3 :     arg1 = (int)size;
   45083           3 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   45084           3 :     if( !arg2) {
   45085           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   45086           0 :       SWIG_fail;
   45087             :     }
   45088             :     
   45089           7 :     for( int i = 0; i<arg1; i++ ) {
   45090           4 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   45091           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   45092           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   45093           4 :       if (!rawobjectpointer) {
   45094           0 :         Py_DECREF(o);
   45095           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   45096           0 :         SWIG_fail;
   45097             :       }
   45098           4 :       arg2[i] = rawobjectpointer;
   45099           4 :       Py_DECREF(o);
   45100             :       
   45101             :     }
   45102             :   }
   45103           3 :   {
   45104           3 :     const int bLocalUseExceptions = GetUseExceptions();
   45105           3 :     if ( bLocalUseExceptions ) {
   45106           3 :       pushErrorHandler();
   45107             :     }
   45108           3 :     {
   45109           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45110           3 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MeanOfNBands(arg1,arg2);
   45111           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45112             :     }
   45113           3 :     if ( bLocalUseExceptions ) {
   45114           3 :       popErrorHandler();
   45115             :     }
   45116             : #ifndef SED_HACKS
   45117             :     if ( bLocalUseExceptions ) {
   45118             :       CPLErr eclass = CPLGetLastErrorType();
   45119             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45120             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45121             :       }
   45122             :     }
   45123             : #endif
   45124             :   }
   45125           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   45126           3 :   {
   45127             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   45128           3 :     CPLFree( arg2 );
   45129             :   }
   45130           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; } }
   45131             :   return resultobj;
   45132           0 : fail:
   45133           0 :   {
   45134             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   45135           0 :     CPLFree( arg2 );
   45136             :   }
   45137             :   return NULL;
   45138             : }
   45139             : 
   45140             : 
   45141       10243 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45142       10243 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45143       10243 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45144       10243 :   double arg2 ;
   45145       10243 :   double arg3 ;
   45146       10243 :   double arg4 ;
   45147       10243 :   double arg5 ;
   45148       10243 :   void **arg6 = (void **) 0 ;
   45149       10243 :   int *arg7 = (int *) 0 ;
   45150       10243 :   int *arg8 = (int *) 0 ;
   45151       10243 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   45152       10243 :   GIntBig *arg10 = (GIntBig *) 0 ;
   45153       10243 :   GIntBig *arg11 = (GIntBig *) 0 ;
   45154       10243 :   GDALRIOResampleAlg arg12 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   45155       10243 :   GDALProgressFunc arg13 = (GDALProgressFunc) NULL ;
   45156       10243 :   void *arg14 = (void *) NULL ;
   45157       10243 :   void *arg15 = (void *) NULL ;
   45158       10243 :   void *argp1 = 0 ;
   45159       10243 :   int res1 = 0 ;
   45160       10243 :   double val2 ;
   45161       10243 :   int ecode2 = 0 ;
   45162       10243 :   double val3 ;
   45163       10243 :   int ecode3 = 0 ;
   45164       10243 :   double val4 ;
   45165       10243 :   int ecode4 = 0 ;
   45166       10243 :   double val5 ;
   45167       10243 :   int ecode5 = 0 ;
   45168       10243 :   void *pyObject6 = NULL ;
   45169       10243 :   int val7 ;
   45170       10243 :   int val8 ;
   45171       10243 :   GDALDataType val9 ;
   45172       10243 :   GIntBig val10 ;
   45173       10243 :   GIntBig val11 ;
   45174       10243 :   PyObject * obj0 = 0 ;
   45175       10243 :   PyObject * obj1 = 0 ;
   45176       10243 :   PyObject * obj2 = 0 ;
   45177       10243 :   PyObject * obj3 = 0 ;
   45178       10243 :   PyObject * obj4 = 0 ;
   45179       10243 :   PyObject * obj5 = 0 ;
   45180       10243 :   PyObject * obj6 = 0 ;
   45181       10243 :   PyObject * obj7 = 0 ;
   45182       10243 :   PyObject * obj8 = 0 ;
   45183       10243 :   PyObject * obj9 = 0 ;
   45184       10243 :   PyObject * obj10 = 0 ;
   45185       10243 :   PyObject * obj11 = 0 ;
   45186       10243 :   PyObject * obj12 = 0 ;
   45187       10243 :   PyObject * obj13 = 0 ;
   45188       10243 :   char * kwnames[] = {
   45189             :     (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 
   45190             :   };
   45191       10243 :   CPLErr result;
   45192             :   
   45193             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   45194       10243 :   PyProgressData *psProgressInfo;
   45195       10243 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   45196       10243 :   psProgressInfo->nLastReported = -1;
   45197       10243 :   psProgressInfo->psPyCallback = NULL;
   45198       10243 :   psProgressInfo->psPyCallbackData = NULL;
   45199       10243 :   arg14 = psProgressInfo;
   45200       10243 :   {
   45201             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   45202       10243 :     arg6 = &pyObject6;
   45203             :   }
   45204       10243 :   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;
   45205       10243 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45206       10243 :   if (!SWIG_IsOK(res1)) {
   45207           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45208             :   }
   45209       10243 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45210       10243 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   45211       10243 :   if (!SWIG_IsOK(ecode2)) {
   45212           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "double""'");
   45213             :   } 
   45214       10243 :   arg2 = static_cast< double >(val2);
   45215       10243 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   45216       10243 :   if (!SWIG_IsOK(ecode3)) {
   45217           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "double""'");
   45218             :   } 
   45219       10243 :   arg3 = static_cast< double >(val3);
   45220       10243 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   45221       10243 :   if (!SWIG_IsOK(ecode4)) {
   45222           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "double""'");
   45223             :   } 
   45224       10243 :   arg4 = static_cast< double >(val4);
   45225       10243 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   45226       10243 :   if (!SWIG_IsOK(ecode5)) {
   45227           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "double""'");
   45228             :   } 
   45229       10243 :   arg5 = static_cast< double >(val5);
   45230       10243 :   if (obj5) {
   45231       10243 :     {
   45232             :       /* %typemap(in) (int *optional_##int) */
   45233       10243 :       if ( obj5 == Py_None ) {
   45234             :         arg7 = 0;
   45235             :       }
   45236        1564 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   45237             :         arg7 = (int *) &val7;
   45238             :       }
   45239             :       else {
   45240           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45241           0 :         SWIG_fail;
   45242             :       }
   45243             :     }
   45244             :   }
   45245       10243 :   if (obj6) {
   45246       10243 :     {
   45247             :       /* %typemap(in) (int *optional_##int) */
   45248       10243 :       if ( obj6 == Py_None ) {
   45249             :         arg8 = 0;
   45250             :       }
   45251        1562 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   45252             :         arg8 = (int *) &val8;
   45253             :       }
   45254             :       else {
   45255           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45256           0 :         SWIG_fail;
   45257             :       }
   45258             :     }
   45259             :   }
   45260       10243 :   if (obj7) {
   45261       10243 :     {
   45262             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   45263       10243 :       int intval = 0;
   45264       10243 :       if ( obj7 == Py_None ) {
   45265             :         arg9 = NULL;
   45266             :       }
   45267        2302 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   45268        1151 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   45269             :         {
   45270           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   45271             :         }
   45272        1151 :         val9 = static_cast<GDALDataType>(intval);
   45273        1151 :         arg9 = &val9;
   45274             :       }
   45275             :       else {
   45276           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45277           0 :         SWIG_fail;
   45278             :       }
   45279             :     }
   45280             :   }
   45281       10243 :   if (obj8) {
   45282       10243 :     {
   45283             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   45284       10243 :       if ( obj8 == Py_None ) {
   45285             :         arg10 = 0;
   45286             :       }
   45287         181 :       else if ( PyArg_Parse( obj8,"L" ,&val10 ) ) {
   45288             :         arg10 = (GIntBig *) &val10;
   45289             :       }
   45290             :       else {
   45291           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45292           0 :         SWIG_fail;
   45293             :       }
   45294             :     }
   45295             :   }
   45296       10243 :   if (obj9) {
   45297       10243 :     {
   45298             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   45299       10243 :       if ( obj9 == Py_None ) {
   45300             :         arg11 = 0;
   45301             :       }
   45302          36 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   45303             :         arg11 = (GIntBig *) &val11;
   45304             :       }
   45305             :       else {
   45306           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45307           0 :         SWIG_fail;
   45308             :       }
   45309             :     }
   45310             :   }
   45311       10243 :   if (obj10) {
   45312       10243 :     {
   45313             :       // %typemap(in) GDALRIOResampleAlg
   45314       10243 :       int val = 0;
   45315       10243 :       int ecode = SWIG_AsVal_int(obj10, &val);
   45316       10243 :       if (!SWIG_IsOK(ecode)) {
   45317           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   45318             :       }
   45319       10242 :       if( val < 0 ||
   45320       10241 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   45321       10240 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   45322             :         val > static_cast<int>(GRIORA_LAST) )
   45323             :       {
   45324           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   45325             :       }
   45326             :       arg12 = static_cast< GDALRIOResampleAlg >(val);
   45327             :     }
   45328             :   }
   45329       10240 :   if (obj11) {
   45330       10240 :     {
   45331             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   45332             :       /* callback_func typemap */
   45333             :       
   45334             :       /* In some cases 0 is passed instead of None. */
   45335             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   45336       10240 :       if ( PyLong_Check(obj11) || PyInt_Check(obj11) )
   45337             :       {
   45338           0 :         if( PyLong_AsLong(obj11) == 0 )
   45339             :         {
   45340           0 :           obj11 = Py_None;
   45341             :         }
   45342             :       }
   45343             :       
   45344       10240 :       if (obj11 && obj11 != Py_None ) {
   45345          19 :         void* cbfunction = NULL;
   45346          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj11,
   45347             :             (void**)&cbfunction,
   45348             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   45349             :             SWIG_POINTER_EXCEPTION | 0 ));
   45350             :         
   45351          19 :         if ( cbfunction == GDALTermProgress ) {
   45352             :           arg13 = GDALTermProgress;
   45353             :         } else {
   45354          19 :           if (!PyCallable_Check(obj11)) {
   45355           0 :             PyErr_SetString( PyExc_RuntimeError,
   45356             :               "Object given is not a Python function" );
   45357           0 :             SWIG_fail;
   45358             :           }
   45359          19 :           psProgressInfo->psPyCallback = obj11;
   45360          19 :           arg13 = PyProgressProxy;
   45361             :         }
   45362             :         
   45363             :       }
   45364             :       
   45365             :     }
   45366             :   }
   45367       10240 :   if (obj12) {
   45368       10240 :     {
   45369             :       /* %typemap(in) ( void* callback_data=NULL)  */
   45370       10240 :       psProgressInfo->psPyCallbackData = obj12 ;
   45371             :     }
   45372             :   }
   45373       10240 :   if (obj13) {
   45374       10240 :     {
   45375             :       /* %typemap(in) ( void *inPythonObject ) */
   45376       10240 :       arg15 = obj13;
   45377             :     }
   45378             :   }
   45379       10240 :   {
   45380       10240 :     const int bLocalUseExceptions = GetUseExceptions();
   45381       10240 :     if ( bLocalUseExceptions ) {
   45382        4848 :       pushErrorHandler();
   45383             :     }
   45384       10240 :     {
   45385       10240 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45386       10240 :       result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   45387       10240 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45388             :     }
   45389       10240 :     if ( bLocalUseExceptions ) {
   45390        4848 :       popErrorHandler();
   45391             :     }
   45392             : #ifndef SED_HACKS
   45393             :     if ( bLocalUseExceptions ) {
   45394             :       CPLErr eclass = CPLGetLastErrorType();
   45395             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45396             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45397             :       }
   45398             :     }
   45399             : #endif
   45400             :   }
   45401       10240 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45402       10240 :   {
   45403             :     /* %typemap(argout) ( void **outPythonObject ) */
   45404       10240 :     Py_XDECREF(resultobj);
   45405       10240 :     if (*arg6)
   45406             :     {
   45407             :       resultobj = (PyObject*)*arg6;
   45408             :     }
   45409             :     else
   45410             :     {
   45411          50 :       resultobj = Py_None;
   45412          50 :       Py_INCREF(resultobj);
   45413             :     }
   45414             :   }
   45415       10240 :   {
   45416             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45417             :     
   45418       10240 :     CPLFree(psProgressInfo);
   45419             :     
   45420             :   }
   45421       10255 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45422             :   return resultobj;
   45423           3 : fail:
   45424           3 :   {
   45425             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45426             :     
   45427           3 :     CPLFree(psProgressInfo);
   45428             :     
   45429             :   }
   45430             :   return NULL;
   45431             : }
   45432             : 
   45433             : 
   45434          90 : SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45435          90 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45436          90 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45437          90 :   int arg2 ;
   45438          90 :   int arg3 ;
   45439          90 :   void **arg4 = (void **) 0 ;
   45440          90 :   void *arg5 = (void *) NULL ;
   45441          90 :   void *argp1 = 0 ;
   45442          90 :   int res1 = 0 ;
   45443          90 :   int val2 ;
   45444          90 :   int ecode2 = 0 ;
   45445          90 :   int val3 ;
   45446          90 :   int ecode3 = 0 ;
   45447          90 :   void *pyObject4 = NULL ;
   45448          90 :   PyObject * obj0 = 0 ;
   45449          90 :   PyObject * obj1 = 0 ;
   45450          90 :   PyObject * obj2 = 0 ;
   45451          90 :   PyObject * obj3 = 0 ;
   45452          90 :   char * kwnames[] = {
   45453             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"buf_obj",  NULL 
   45454             :   };
   45455          90 :   CPLErr result;
   45456             :   
   45457          90 :   {
   45458             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
   45459          90 :     arg4 = &pyObject4;
   45460             :   }
   45461          90 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Band_ReadBlock", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   45462          90 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45463          90 :   if (!SWIG_IsOK(res1)) {
   45464           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45465             :   }
   45466          90 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45467          90 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   45468          90 :   if (!SWIG_IsOK(ecode2)) {
   45469           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
   45470             :   } 
   45471          90 :   arg2 = static_cast< int >(val2);
   45472          90 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   45473          90 :   if (!SWIG_IsOK(ecode3)) {
   45474           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
   45475             :   } 
   45476          90 :   arg3 = static_cast< int >(val3);
   45477          90 :   if (obj3) {
   45478          25 :     {
   45479             :       /* %typemap(in) ( void *inPythonObject ) */
   45480          25 :       arg5 = obj3;
   45481             :     }
   45482             :   }
   45483          90 :   {
   45484          90 :     const int bLocalUseExceptions = GetUseExceptions();
   45485          90 :     if ( bLocalUseExceptions ) {
   45486          34 :       pushErrorHandler();
   45487             :     }
   45488          90 :     {
   45489          90 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45490          90 :       result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4,arg5);
   45491          90 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45492             :     }
   45493          90 :     if ( bLocalUseExceptions ) {
   45494          34 :       popErrorHandler();
   45495             :     }
   45496             : #ifndef SED_HACKS
   45497             :     if ( bLocalUseExceptions ) {
   45498             :       CPLErr eclass = CPLGetLastErrorType();
   45499             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45500             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45501             :       }
   45502             :     }
   45503             : #endif
   45504             :   }
   45505          90 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45506          90 :   {
   45507             :     /* %typemap(argout) ( void **outPythonObject ) */
   45508          90 :     Py_XDECREF(resultobj);
   45509          90 :     if (*arg4)
   45510             :     {
   45511             :       resultobj = (PyObject*)*arg4;
   45512             :     }
   45513             :     else
   45514             :     {
   45515          16 :       resultobj = Py_None;
   45516          16 :       Py_INCREF(resultobj);
   45517             :     }
   45518             :   }
   45519          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; } }
   45520             :   return resultobj;
   45521             : fail:
   45522             :   return NULL;
   45523             : }
   45524             : 
   45525             : 
   45526         277 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45527         277 :   PyObject *obj;
   45528         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45529         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   45530         277 :   return SWIG_Py_Void();
   45531             : }
   45532             : 
   45533         163 : SWIGINTERN PyObject *_wrap_delete_ComputedBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45534         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45535         163 :   GDALComputedRasterBandShadow *arg1 = (GDALComputedRasterBandShadow *) 0 ;
   45536         163 :   void *argp1 = 0 ;
   45537         163 :   int res1 = 0 ;
   45538         163 :   PyObject *swig_obj[1] ;
   45539             :   
   45540         163 :   if (!args) SWIG_fail;
   45541         163 :   swig_obj[0] = args;
   45542         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_DISOWN |  0 );
   45543         163 :   if (!SWIG_IsOK(res1)) {
   45544           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ComputedBand" "', argument " "1"" of type '" "GDALComputedRasterBandShadow *""'"); 
   45545             :   }
   45546         163 :   arg1 = reinterpret_cast< GDALComputedRasterBandShadow * >(argp1);
   45547         163 :   {
   45548         163 :     const int bLocalUseExceptions = GetUseExceptions();
   45549         163 :     if ( bLocalUseExceptions ) {
   45550         163 :       pushErrorHandler();
   45551             :     }
   45552         163 :     {
   45553         163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45554         163 :       delete_GDALComputedRasterBandShadow(arg1);
   45555         163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45556             :     }
   45557         163 :     if ( bLocalUseExceptions ) {
   45558         163 :       popErrorHandler();
   45559             :     }
   45560             : #ifndef SED_HACKS
   45561             :     if ( bLocalUseExceptions ) {
   45562             :       CPLErr eclass = CPLGetLastErrorType();
   45563             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45564             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45565             :       }
   45566             :     }
   45567             : #endif
   45568             :   }
   45569         163 :   resultobj = SWIG_Py_Void();
   45570         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; } }
   45571             :   return resultobj;
   45572             : fail:
   45573             :   return NULL;
   45574             : }
   45575             : 
   45576             : 
   45577         277 : SWIGINTERN PyObject *ComputedBand_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45578         277 :   PyObject *obj;
   45579         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45580         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_NewClientData(obj));
   45581         277 :   return SWIG_Py_Void();
   45582             : }
   45583             : 
   45584          56 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45585          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45586          56 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   45587          56 :   int val1 ;
   45588          56 :   int ecode1 = 0 ;
   45589          56 :   PyObject * obj0 = 0 ;
   45590          56 :   char * kwnames[] = {
   45591             :     (char *)"palette",  NULL 
   45592             :   };
   45593          56 :   GDALColorTableShadow *result = 0 ;
   45594             :   
   45595          56 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_ColorTable", kwnames, &obj0)) SWIG_fail;
   45596          56 :   if (obj0) {
   45597           0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   45598           0 :     if (!SWIG_IsOK(ecode1)) {
   45599           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   45600             :     } 
   45601           0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   45602             :   }
   45603          56 :   {
   45604          56 :     const int bLocalUseExceptions = GetUseExceptions();
   45605          56 :     if ( bLocalUseExceptions ) {
   45606          28 :       pushErrorHandler();
   45607             :     }
   45608          56 :     {
   45609          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45610          56 :       result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   45611          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45612             :     }
   45613          56 :     if ( bLocalUseExceptions ) {
   45614          28 :       popErrorHandler();
   45615             :     }
   45616             : #ifndef SED_HACKS
   45617             :     if ( bLocalUseExceptions ) {
   45618             :       CPLErr eclass = CPLGetLastErrorType();
   45619             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45620             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45621             :       }
   45622             :     }
   45623             : #endif
   45624             :   }
   45625          56 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   45626          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; } }
   45627             :   return resultobj;
   45628             : fail:
   45629             :   return NULL;
   45630             : }
   45631             : 
   45632             : 
   45633          68 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45634          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45635          68 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45636          68 :   void *argp1 = 0 ;
   45637          68 :   int res1 = 0 ;
   45638          68 :   PyObject *swig_obj[1] ;
   45639             :   
   45640          68 :   if (!args) SWIG_fail;
   45641          68 :   swig_obj[0] = args;
   45642          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   45643          68 :   if (!SWIG_IsOK(res1)) {
   45644           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45645             :   }
   45646          68 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45647          68 :   {
   45648          68 :     const int bLocalUseExceptions = GetUseExceptions();
   45649          68 :     if ( bLocalUseExceptions ) {
   45650          36 :       pushErrorHandler();
   45651             :     }
   45652          68 :     {
   45653          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45654          68 :       delete_GDALColorTableShadow(arg1);
   45655          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45656             :     }
   45657          68 :     if ( bLocalUseExceptions ) {
   45658          36 :       popErrorHandler();
   45659             :     }
   45660             : #ifndef SED_HACKS
   45661             :     if ( bLocalUseExceptions ) {
   45662             :       CPLErr eclass = CPLGetLastErrorType();
   45663             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45664             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45665             :       }
   45666             :     }
   45667             : #endif
   45668             :   }
   45669          68 :   resultobj = SWIG_Py_Void();
   45670          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; } }
   45671             :   return resultobj;
   45672             : fail:
   45673             :   return NULL;
   45674             : }
   45675             : 
   45676             : 
   45677          12 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45678          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45679          12 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45680          12 :   void *argp1 = 0 ;
   45681          12 :   int res1 = 0 ;
   45682          12 :   PyObject *swig_obj[1] ;
   45683          12 :   GDALColorTableShadow *result = 0 ;
   45684             :   
   45685          12 :   if (!args) SWIG_fail;
   45686          12 :   swig_obj[0] = args;
   45687          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45688          12 :   if (!SWIG_IsOK(res1)) {
   45689           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45690             :   }
   45691          12 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45692          12 :   {
   45693          12 :     const int bLocalUseExceptions = GetUseExceptions();
   45694          12 :     if ( bLocalUseExceptions ) {
   45695           8 :       pushErrorHandler();
   45696             :     }
   45697          12 :     {
   45698          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45699          12 :       result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   45700          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45701             :     }
   45702          12 :     if ( bLocalUseExceptions ) {
   45703           8 :       popErrorHandler();
   45704             :     }
   45705             : #ifndef SED_HACKS
   45706             :     if ( bLocalUseExceptions ) {
   45707             :       CPLErr eclass = CPLGetLastErrorType();
   45708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45710             :       }
   45711             :     }
   45712             : #endif
   45713             :   }
   45714          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   45715          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; } }
   45716             :   return resultobj;
   45717             : fail:
   45718             :   return NULL;
   45719             : }
   45720             : 
   45721             : 
   45722           2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45723           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45724           2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45725           2 :   void *argp1 = 0 ;
   45726           2 :   int res1 = 0 ;
   45727           2 :   PyObject *swig_obj[1] ;
   45728           2 :   GDALPaletteInterp result;
   45729             :   
   45730           2 :   if (!args) SWIG_fail;
   45731           2 :   swig_obj[0] = args;
   45732           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45733           2 :   if (!SWIG_IsOK(res1)) {
   45734           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45735             :   }
   45736           2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45737           2 :   {
   45738           2 :     const int bLocalUseExceptions = GetUseExceptions();
   45739           2 :     if ( bLocalUseExceptions ) {
   45740           0 :       pushErrorHandler();
   45741             :     }
   45742           2 :     {
   45743           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45744           2 :       result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   45745           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45746             :     }
   45747           2 :     if ( bLocalUseExceptions ) {
   45748           0 :       popErrorHandler();
   45749             :     }
   45750             : #ifndef SED_HACKS
   45751             :     if ( bLocalUseExceptions ) {
   45752             :       CPLErr eclass = CPLGetLastErrorType();
   45753             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45754             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45755             :       }
   45756             :     }
   45757             : #endif
   45758             :   }
   45759           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45760           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; } }
   45761             :   return resultobj;
   45762             : fail:
   45763             :   return NULL;
   45764             : }
   45765             : 
   45766             : 
   45767          73 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45768          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45769          73 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45770          73 :   void *argp1 = 0 ;
   45771          73 :   int res1 = 0 ;
   45772          73 :   PyObject *swig_obj[1] ;
   45773          73 :   int result;
   45774             :   
   45775          73 :   if (!args) SWIG_fail;
   45776          73 :   swig_obj[0] = args;
   45777          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45778          73 :   if (!SWIG_IsOK(res1)) {
   45779           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45780             :   }
   45781          73 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45782          73 :   {
   45783          73 :     const int bLocalUseExceptions = GetUseExceptions();
   45784          73 :     if ( bLocalUseExceptions ) {
   45785          52 :       pushErrorHandler();
   45786             :     }
   45787          73 :     {
   45788          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45789          73 :       result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   45790          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45791             :     }
   45792          73 :     if ( bLocalUseExceptions ) {
   45793          52 :       popErrorHandler();
   45794             :     }
   45795             : #ifndef SED_HACKS
   45796             :     if ( bLocalUseExceptions ) {
   45797             :       CPLErr eclass = CPLGetLastErrorType();
   45798             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45799             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45800             :       }
   45801             :     }
   45802             : #endif
   45803             :   }
   45804          73 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45805          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; } }
   45806             :   return resultobj;
   45807             : fail:
   45808             :   return NULL;
   45809             : }
   45810             : 
   45811             : 
   45812        4719 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45813        4719 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45814        4719 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45815        4719 :   int arg2 ;
   45816        4719 :   void *argp1 = 0 ;
   45817        4719 :   int res1 = 0 ;
   45818        4719 :   int val2 ;
   45819        4719 :   int ecode2 = 0 ;
   45820        4719 :   PyObject *swig_obj[2] ;
   45821        4719 :   GDALColorEntry *result = 0 ;
   45822             :   
   45823        4719 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntry", 2, 2, swig_obj)) SWIG_fail;
   45824        4719 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45825        4719 :   if (!SWIG_IsOK(res1)) {
   45826           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45827             :   }
   45828        4719 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45829        4719 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45830        4719 :   if (!SWIG_IsOK(ecode2)) {
   45831           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   45832             :   } 
   45833        4719 :   arg2 = static_cast< int >(val2);
   45834        4719 :   {
   45835        4719 :     const int bLocalUseExceptions = GetUseExceptions();
   45836        4719 :     if ( bLocalUseExceptions ) {
   45837        4634 :       pushErrorHandler();
   45838             :     }
   45839        4719 :     {
   45840        4719 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45841        4719 :       result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   45842        4719 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45843             :     }
   45844        4719 :     if ( bLocalUseExceptions ) {
   45845        4634 :       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        4719 :   {
   45857             :     /* %typemap(out) GDALColorEntry* */
   45858        4719 :     if ( result != NULL )
   45859        4719 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   45860             :     else
   45861             :     resultobj = NULL;
   45862             :   }
   45863        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; } }
   45864             :   return resultobj;
   45865             : fail:
   45866             :   return NULL;
   45867             : }
   45868             : 
   45869             : 
   45870           0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45871           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45872           0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45873           0 :   int arg2 ;
   45874           0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45875           0 :   void *argp1 = 0 ;
   45876           0 :   int res1 = 0 ;
   45877           0 :   int val2 ;
   45878           0 :   int ecode2 = 0 ;
   45879           0 :   GDALColorEntry ce3 ;
   45880           0 :   PyObject *swig_obj[3] ;
   45881           0 :   int result;
   45882             :   
   45883           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntryAsRGB", 3, 3, swig_obj)) SWIG_fail;
   45884           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45885           0 :   if (!SWIG_IsOK(res1)) {
   45886           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45887             :   }
   45888           0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45889           0 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45890           0 :   if (!SWIG_IsOK(ecode2)) {
   45891           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   45892             :   } 
   45893           0 :   arg2 = static_cast< int >(val2);
   45894           0 :   {
   45895             :     /* %typemap(in) GDALColorEntry* */
   45896           0 :     ce3.c4 = 255;
   45897           0 :     if (! PySequence_Check(swig_obj[2]) ) {
   45898           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45899           0 :       SWIG_fail;
   45900             :     }
   45901           0 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45902           0 :     if ( size > 4 ) {
   45903           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45904           0 :       SWIG_fail;
   45905             :     }
   45906           0 :     if ( size < 3 ) {
   45907           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45908           0 :       SWIG_fail;
   45909             :     }
   45910           0 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45911           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45912           0 :       SWIG_fail;
   45913             :     }
   45914           0 :     arg3 = &ce3;
   45915             :   }
   45916           0 :   {
   45917           0 :     const int bLocalUseExceptions = GetUseExceptions();
   45918           0 :     if ( bLocalUseExceptions ) {
   45919           0 :       pushErrorHandler();
   45920             :     }
   45921           0 :     {
   45922           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45923           0 :       result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   45924           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45925             :     }
   45926           0 :     if ( bLocalUseExceptions ) {
   45927           0 :       popErrorHandler();
   45928             :     }
   45929             : #ifndef SED_HACKS
   45930             :     if ( bLocalUseExceptions ) {
   45931             :       CPLErr eclass = CPLGetLastErrorType();
   45932             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45933             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45934             :       }
   45935             :     }
   45936             : #endif
   45937             :   }
   45938           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45939           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; } }
   45940             :   return resultobj;
   45941             : fail:
   45942             :   return NULL;
   45943             : }
   45944             : 
   45945             : 
   45946        1379 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45947        1379 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45948        1379 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45949        1379 :   int arg2 ;
   45950        1379 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45951        1379 :   void *argp1 = 0 ;
   45952        1379 :   int res1 = 0 ;
   45953        1379 :   int val2 ;
   45954        1379 :   int ecode2 = 0 ;
   45955        1379 :   GDALColorEntry ce3 ;
   45956        1379 :   PyObject *swig_obj[3] ;
   45957             :   
   45958        1379 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_SetColorEntry", 3, 3, swig_obj)) SWIG_fail;
   45959        1379 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45960        1379 :   if (!SWIG_IsOK(res1)) {
   45961           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45962             :   }
   45963        1379 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45964        1379 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45965        1379 :   if (!SWIG_IsOK(ecode2)) {
   45966           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   45967             :   } 
   45968        1379 :   arg2 = static_cast< int >(val2);
   45969        1379 :   {
   45970             :     /* %typemap(in) GDALColorEntry* */
   45971        1379 :     ce3.c4 = 255;
   45972        1379 :     if (! PySequence_Check(swig_obj[2]) ) {
   45973           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45974           0 :       SWIG_fail;
   45975             :     }
   45976        1379 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45977        1379 :     if ( size > 4 ) {
   45978           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45979           0 :       SWIG_fail;
   45980             :     }
   45981        1379 :     if ( size < 3 ) {
   45982           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45983           0 :       SWIG_fail;
   45984             :     }
   45985        1379 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45986           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45987           0 :       SWIG_fail;
   45988             :     }
   45989        1379 :     arg3 = &ce3;
   45990             :   }
   45991        1379 :   {
   45992        1379 :     const int bLocalUseExceptions = GetUseExceptions();
   45993        1379 :     if ( bLocalUseExceptions ) {
   45994        1313 :       pushErrorHandler();
   45995             :     }
   45996        1379 :     {
   45997        1379 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45998        1379 :       GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   45999        1379 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46000             :     }
   46001        1379 :     if ( bLocalUseExceptions ) {
   46002        1313 :       popErrorHandler();
   46003             :     }
   46004             : #ifndef SED_HACKS
   46005             :     if ( bLocalUseExceptions ) {
   46006             :       CPLErr eclass = CPLGetLastErrorType();
   46007             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46008             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46009             :       }
   46010             :     }
   46011             : #endif
   46012             :   }
   46013        1379 :   resultobj = SWIG_Py_Void();
   46014        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; } }
   46015             :   return resultobj;
   46016             : fail:
   46017             :   return NULL;
   46018             : }
   46019             : 
   46020             : 
   46021           1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46022           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46023           1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   46024           1 :   int arg2 ;
   46025           1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   46026           1 :   int arg4 ;
   46027           1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   46028           1 :   void *argp1 = 0 ;
   46029           1 :   int res1 = 0 ;
   46030           1 :   int val2 ;
   46031           1 :   int ecode2 = 0 ;
   46032           1 :   GDALColorEntry ce3 ;
   46033           1 :   int val4 ;
   46034           1 :   int ecode4 = 0 ;
   46035           1 :   GDALColorEntry ce5 ;
   46036           1 :   PyObject *swig_obj[5] ;
   46037             :   
   46038           1 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_CreateColorRamp", 5, 5, swig_obj)) SWIG_fail;
   46039           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   46040           1 :   if (!SWIG_IsOK(res1)) {
   46041           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   46042             :   }
   46043           1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   46044           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   46045           1 :   if (!SWIG_IsOK(ecode2)) {
   46046           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   46047             :   } 
   46048           1 :   arg2 = static_cast< int >(val2);
   46049           1 :   {
   46050             :     /* %typemap(in) GDALColorEntry* */
   46051           1 :     ce3.c4 = 255;
   46052           1 :     if (! PySequence_Check(swig_obj[2]) ) {
   46053           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   46054           0 :       SWIG_fail;
   46055             :     }
   46056           1 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   46057           1 :     if ( size > 4 ) {
   46058           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   46059           0 :       SWIG_fail;
   46060             :     }
   46061           1 :     if ( size < 3 ) {
   46062           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   46063           0 :       SWIG_fail;
   46064             :     }
   46065           1 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   46066           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   46067           0 :       SWIG_fail;
   46068             :     }
   46069           1 :     arg3 = &ce3;
   46070             :   }
   46071           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   46072           1 :   if (!SWIG_IsOK(ecode4)) {
   46073           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   46074             :   } 
   46075           1 :   arg4 = static_cast< int >(val4);
   46076           1 :   {
   46077             :     /* %typemap(in) GDALColorEntry* */
   46078           1 :     ce5.c4 = 255;
   46079           1 :     if (! PySequence_Check(swig_obj[4]) ) {
   46080           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   46081           0 :       SWIG_fail;
   46082             :     }
   46083           1 :     Py_ssize_t size = PySequence_Size(swig_obj[4]);
   46084           1 :     if ( size > 4 ) {
   46085           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   46086           0 :       SWIG_fail;
   46087             :     }
   46088           1 :     if ( size < 3 ) {
   46089           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   46090           0 :       SWIG_fail;
   46091             :     }
   46092           1 :     if ( !PyArg_ParseTuple( swig_obj[4],"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   46093           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   46094           0 :       SWIG_fail;
   46095             :     }
   46096           1 :     arg5 = &ce5;
   46097             :   }
   46098           1 :   {
   46099           1 :     const int bLocalUseExceptions = GetUseExceptions();
   46100           1 :     if ( bLocalUseExceptions ) {
   46101           1 :       pushErrorHandler();
   46102             :     }
   46103           1 :     {
   46104           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46105           1 :       GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   46106           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46107             :     }
   46108           1 :     if ( bLocalUseExceptions ) {
   46109           1 :       popErrorHandler();
   46110             :     }
   46111             : #ifndef SED_HACKS
   46112             :     if ( bLocalUseExceptions ) {
   46113             :       CPLErr eclass = CPLGetLastErrorType();
   46114             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46115             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46116             :       }
   46117             :     }
   46118             : #endif
   46119             :   }
   46120           1 :   resultobj = SWIG_Py_Void();
   46121           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; } }
   46122             :   return resultobj;
   46123             : fail:
   46124             :   return NULL;
   46125             : }
   46126             : 
   46127             : 
   46128         277 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46129         277 :   PyObject *obj;
   46130         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   46131         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   46132         277 :   return SWIG_Py_Void();
   46133             : }
   46134             : 
   46135          56 : SWIGINTERN PyObject *ColorTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46136          56 :   return SWIG_Python_InitShadowInstance(args);
   46137             : }
   46138             : 
   46139          60 : SWIGINTERN PyObject *_wrap_delete_SubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46140          60 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46141          60 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46142          60 :   void *argp1 = 0 ;
   46143          60 :   int res1 = 0 ;
   46144          60 :   PyObject *swig_obj[1] ;
   46145             :   
   46146          60 :   if (!args) SWIG_fail;
   46147          60 :   swig_obj[0] = args;
   46148          60 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_DISOWN |  0 );
   46149          60 :   if (!SWIG_IsOK(res1)) {
   46150           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SubdatasetInfo" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46151             :   }
   46152          60 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46153          60 :   {
   46154          60 :     const int bLocalUseExceptions = GetUseExceptions();
   46155          60 :     if ( bLocalUseExceptions ) {
   46156          36 :       pushErrorHandler();
   46157             :     }
   46158          60 :     {
   46159          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46160          60 :       delete_GDALSubdatasetInfoShadow(arg1);
   46161          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46162             :     }
   46163          60 :     if ( bLocalUseExceptions ) {
   46164          36 :       popErrorHandler();
   46165             :     }
   46166             : #ifndef SED_HACKS
   46167             :     if ( bLocalUseExceptions ) {
   46168             :       CPLErr eclass = CPLGetLastErrorType();
   46169             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46170             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46171             :       }
   46172             :     }
   46173             : #endif
   46174             :   }
   46175          60 :   resultobj = SWIG_Py_Void();
   46176          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; } }
   46177             :   return resultobj;
   46178             : fail:
   46179             :   return NULL;
   46180             : }
   46181             : 
   46182             : 
   46183          35 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46184          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46185          35 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46186          35 :   void *argp1 = 0 ;
   46187          35 :   int res1 = 0 ;
   46188          35 :   PyObject *swig_obj[1] ;
   46189          35 :   retStringAndCPLFree *result = 0 ;
   46190             :   
   46191          35 :   if (!args) SWIG_fail;
   46192          35 :   swig_obj[0] = args;
   46193          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46194          35 :   if (!SWIG_IsOK(res1)) {
   46195           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46196             :   }
   46197          35 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46198          35 :   {
   46199          35 :     const int bLocalUseExceptions = GetUseExceptions();
   46200          35 :     if ( bLocalUseExceptions ) {
   46201          19 :       pushErrorHandler();
   46202             :     }
   46203          35 :     {
   46204          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46205          35 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetPathComponent(arg1);
   46206          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46207             :     }
   46208          35 :     if ( bLocalUseExceptions ) {
   46209          19 :       popErrorHandler();
   46210             :     }
   46211             : #ifndef SED_HACKS
   46212             :     if ( bLocalUseExceptions ) {
   46213             :       CPLErr eclass = CPLGetLastErrorType();
   46214             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46215             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46216             :       }
   46217             :     }
   46218             : #endif
   46219             :   }
   46220          35 :   {
   46221             :     /* %typemap(out) (retStringAndCPLFree*) */
   46222          35 :     Py_XDECREF(resultobj);
   46223          35 :     if(result)
   46224             :     {
   46225          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46226          35 :       CPLFree(result);
   46227             :     }
   46228             :     else
   46229             :     {
   46230           0 :       resultobj = Py_None;
   46231           0 :       Py_INCREF(resultobj);
   46232             :     }
   46233             :   }
   46234          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; } }
   46235             :   return resultobj;
   46236             : fail:
   46237             :   return NULL;
   46238             : }
   46239             : 
   46240             : 
   46241          39 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetSubdatasetComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46242          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46243          39 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46244          39 :   void *argp1 = 0 ;
   46245          39 :   int res1 = 0 ;
   46246          39 :   PyObject *swig_obj[1] ;
   46247          39 :   retStringAndCPLFree *result = 0 ;
   46248             :   
   46249          39 :   if (!args) SWIG_fail;
   46250          39 :   swig_obj[0] = args;
   46251          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46252          39 :   if (!SWIG_IsOK(res1)) {
   46253           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetSubdatasetComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46254             :   }
   46255          39 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46256          39 :   {
   46257          39 :     const int bLocalUseExceptions = GetUseExceptions();
   46258          39 :     if ( bLocalUseExceptions ) {
   46259          23 :       pushErrorHandler();
   46260             :     }
   46261          39 :     {
   46262          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46263          39 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetSubdatasetComponent(arg1);
   46264          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46265             :     }
   46266          39 :     if ( bLocalUseExceptions ) {
   46267          23 :       popErrorHandler();
   46268             :     }
   46269             : #ifndef SED_HACKS
   46270             :     if ( bLocalUseExceptions ) {
   46271             :       CPLErr eclass = CPLGetLastErrorType();
   46272             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46273             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46274             :       }
   46275             :     }
   46276             : #endif
   46277             :   }
   46278          39 :   {
   46279             :     /* %typemap(out) (retStringAndCPLFree*) */
   46280          39 :     Py_XDECREF(resultobj);
   46281          39 :     if(result)
   46282             :     {
   46283          39 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46284          39 :       CPLFree(result);
   46285             :     }
   46286             :     else
   46287             :     {
   46288           0 :       resultobj = Py_None;
   46289           0 :       Py_INCREF(resultobj);
   46290             :     }
   46291             :   }
   46292          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; } }
   46293             :   return resultobj;
   46294             : fail:
   46295             :   return NULL;
   46296             : }
   46297             : 
   46298             : 
   46299          21 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_ModifyPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46300          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46301          21 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46302          21 :   char *arg2 = (char *) 0 ;
   46303          21 :   void *argp1 = 0 ;
   46304          21 :   int res1 = 0 ;
   46305          21 :   int res2 ;
   46306          21 :   char *buf2 = 0 ;
   46307          21 :   int alloc2 = 0 ;
   46308          21 :   PyObject *swig_obj[2] ;
   46309          21 :   retStringAndCPLFree *result = 0 ;
   46310             :   
   46311          21 :   if (!SWIG_Python_UnpackTuple(args, "SubdatasetInfo_ModifyPathComponent", 2, 2, swig_obj)) SWIG_fail;
   46312          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46313          21 :   if (!SWIG_IsOK(res1)) {
   46314           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46315             :   }
   46316          21 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46317          21 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   46318          21 :   if (!SWIG_IsOK(res2)) {
   46319           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "2"" of type '" "char const *""'");
   46320             :   }
   46321          21 :   arg2 = reinterpret_cast< char * >(buf2);
   46322          21 :   {
   46323          21 :     const int bLocalUseExceptions = GetUseExceptions();
   46324          21 :     if ( bLocalUseExceptions ) {
   46325          11 :       pushErrorHandler();
   46326             :     }
   46327          21 :     {
   46328          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46329          21 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_ModifyPathComponent(arg1,(char const *)arg2);
   46330          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46331             :     }
   46332          21 :     if ( bLocalUseExceptions ) {
   46333          11 :       popErrorHandler();
   46334             :     }
   46335             : #ifndef SED_HACKS
   46336             :     if ( bLocalUseExceptions ) {
   46337             :       CPLErr eclass = CPLGetLastErrorType();
   46338             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46339             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46340             :       }
   46341             :     }
   46342             : #endif
   46343             :   }
   46344          21 :   {
   46345             :     /* %typemap(out) (retStringAndCPLFree*) */
   46346          21 :     Py_XDECREF(resultobj);
   46347          21 :     if(result)
   46348             :     {
   46349          21 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46350          21 :       CPLFree(result);
   46351             :     }
   46352             :     else
   46353             :     {
   46354           0 :       resultobj = Py_None;
   46355           0 :       Py_INCREF(resultobj);
   46356             :     }
   46357             :   }
   46358          21 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46359          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; } }
   46360             :   return resultobj;
   46361           0 : fail:
   46362           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46363             :   return NULL;
   46364             : }
   46365             : 
   46366             : 
   46367         277 : SWIGINTERN PyObject *SubdatasetInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46368         277 :   PyObject *obj;
   46369         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   46370         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALSubdatasetInfo, SWIG_NewClientData(obj));
   46371         277 :   return SWIG_Py_Void();
   46372             : }
   46373             : 
   46374          83 : SWIGINTERN PyObject *_wrap_GetSubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46375          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46376          83 :   char *arg1 = (char *) 0 ;
   46377          83 :   int res1 ;
   46378          83 :   char *buf1 = 0 ;
   46379          83 :   int alloc1 = 0 ;
   46380          83 :   PyObject *swig_obj[1] ;
   46381          83 :   GDALSubdatasetInfoShadow *result = 0 ;
   46382             :   
   46383          83 :   if (!args) SWIG_fail;
   46384          83 :   swig_obj[0] = args;
   46385          83 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   46386          83 :   if (!SWIG_IsOK(res1)) {
   46387           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSubdatasetInfo" "', argument " "1"" of type '" "char const *""'");
   46388             :   }
   46389          83 :   arg1 = reinterpret_cast< char * >(buf1);
   46390          83 :   {
   46391          83 :     const int bLocalUseExceptions = GetUseExceptions();
   46392          83 :     if ( bLocalUseExceptions ) {
   46393          51 :       pushErrorHandler();
   46394             :     }
   46395          83 :     {
   46396          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46397          83 :       result = (GDALSubdatasetInfoShadow *)GetSubdatasetInfo((char const *)arg1);
   46398          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46399             :     }
   46400          83 :     if ( bLocalUseExceptions ) {
   46401          51 :       popErrorHandler();
   46402             :     }
   46403             : #ifndef SED_HACKS
   46404             :     if ( bLocalUseExceptions ) {
   46405             :       CPLErr eclass = CPLGetLastErrorType();
   46406             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46407             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46408             :       }
   46409             :     }
   46410             : #endif
   46411             :   }
   46412          83 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_OWN |  0 );
   46413          83 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46414          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; } }
   46415             :   return resultobj;
   46416           0 : fail:
   46417           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46418             :   return NULL;
   46419             : }
   46420             : 
   46421             : 
   46422          30 : SWIGINTERN PyObject *_wrap_new_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46423          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46424          30 :   char *arg1 = (char *) 0 ;
   46425          30 :   char *arg2 = (char *) 0 ;
   46426          30 :   char *arg3 = (char *) 0 ;
   46427          30 :   GDALRelationshipCardinality arg4 ;
   46428          30 :   int res1 ;
   46429          30 :   char *buf1 = 0 ;
   46430          30 :   int alloc1 = 0 ;
   46431          30 :   int res2 ;
   46432          30 :   char *buf2 = 0 ;
   46433          30 :   int alloc2 = 0 ;
   46434          30 :   int res3 ;
   46435          30 :   char *buf3 = 0 ;
   46436          30 :   int alloc3 = 0 ;
   46437          30 :   int val4 ;
   46438          30 :   int ecode4 = 0 ;
   46439          30 :   PyObject *swig_obj[4] ;
   46440          30 :   GDALRelationshipShadow *result = 0 ;
   46441             :   
   46442          30 :   if (!SWIG_Python_UnpackTuple(args, "new_Relationship", 4, 4, swig_obj)) SWIG_fail;
   46443          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   46444          30 :   if (!SWIG_IsOK(res1)) {
   46445           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Relationship" "', argument " "1"" of type '" "char const *""'");
   46446             :   }
   46447          30 :   arg1 = reinterpret_cast< char * >(buf1);
   46448          30 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   46449          30 :   if (!SWIG_IsOK(res2)) {
   46450           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Relationship" "', argument " "2"" of type '" "char const *""'");
   46451             :   }
   46452          30 :   arg2 = reinterpret_cast< char * >(buf2);
   46453          30 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   46454          30 :   if (!SWIG_IsOK(res3)) {
   46455           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Relationship" "', argument " "3"" of type '" "char const *""'");
   46456             :   }
   46457          30 :   arg3 = reinterpret_cast< char * >(buf3);
   46458          30 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   46459          30 :   if (!SWIG_IsOK(ecode4)) {
   46460           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Relationship" "', argument " "4"" of type '" "GDALRelationshipCardinality""'");
   46461             :   } 
   46462          30 :   arg4 = static_cast< GDALRelationshipCardinality >(val4);
   46463          30 :   {
   46464          30 :     if (!arg1) {
   46465           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46466             :     }
   46467             :   }
   46468          29 :   {
   46469          29 :     const int bLocalUseExceptions = GetUseExceptions();
   46470          29 :     if ( bLocalUseExceptions ) {
   46471           2 :       pushErrorHandler();
   46472             :     }
   46473          29 :     {
   46474          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46475          29 :       result = (GDALRelationshipShadow *)new_GDALRelationshipShadow((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4);
   46476          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46477             :     }
   46478          29 :     if ( bLocalUseExceptions ) {
   46479           2 :       popErrorHandler();
   46480             :     }
   46481             : #ifndef SED_HACKS
   46482             :     if ( bLocalUseExceptions ) {
   46483             :       CPLErr eclass = CPLGetLastErrorType();
   46484             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46485             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46486             :       }
   46487             :     }
   46488             : #endif
   46489             :   }
   46490          29 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_NEW |  0 );
   46491          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46492          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46493          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46494          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; } }
   46495             :   return resultobj;
   46496           1 : fail:
   46497           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46498           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46499           1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46500             :   return NULL;
   46501             : }
   46502             : 
   46503             : 
   46504          29 : SWIGINTERN PyObject *_wrap_delete_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46505          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46506          29 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46507          29 :   void *argp1 = 0 ;
   46508          29 :   int res1 = 0 ;
   46509          29 :   PyObject *swig_obj[1] ;
   46510             :   
   46511          29 :   if (!args) SWIG_fail;
   46512          29 :   swig_obj[0] = args;
   46513          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_DISOWN |  0 );
   46514          29 :   if (!SWIG_IsOK(res1)) {
   46515           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Relationship" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46516             :   }
   46517          29 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46518          29 :   {
   46519          29 :     const int bLocalUseExceptions = GetUseExceptions();
   46520          29 :     if ( bLocalUseExceptions ) {
   46521           2 :       pushErrorHandler();
   46522             :     }
   46523          29 :     {
   46524          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46525          29 :       delete_GDALRelationshipShadow(arg1);
   46526          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46527             :     }
   46528          29 :     if ( bLocalUseExceptions ) {
   46529           2 :       popErrorHandler();
   46530             :     }
   46531             : #ifndef SED_HACKS
   46532             :     if ( bLocalUseExceptions ) {
   46533             :       CPLErr eclass = CPLGetLastErrorType();
   46534             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46535             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46536             :       }
   46537             :     }
   46538             : #endif
   46539             :   }
   46540          29 :   resultobj = SWIG_Py_Void();
   46541          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; } }
   46542             :   return resultobj;
   46543             : fail:
   46544             :   return NULL;
   46545             : }
   46546             : 
   46547             : 
   46548          31 : SWIGINTERN PyObject *_wrap_Relationship_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46549          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46550          31 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46551          31 :   void *argp1 = 0 ;
   46552          31 :   int res1 = 0 ;
   46553          31 :   PyObject *swig_obj[1] ;
   46554          31 :   char *result = 0 ;
   46555             :   
   46556          31 :   if (!args) SWIG_fail;
   46557          31 :   swig_obj[0] = args;
   46558          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46559          31 :   if (!SWIG_IsOK(res1)) {
   46560           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46561             :   }
   46562          31 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46563          31 :   {
   46564          31 :     const int bLocalUseExceptions = GetUseExceptions();
   46565          31 :     if ( bLocalUseExceptions ) {
   46566           8 :       pushErrorHandler();
   46567             :     }
   46568          31 :     {
   46569          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46570          31 :       result = (char *)GDALRelationshipShadow_GetName(arg1);
   46571          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46572             :     }
   46573          31 :     if ( bLocalUseExceptions ) {
   46574           8 :       popErrorHandler();
   46575             :     }
   46576             : #ifndef SED_HACKS
   46577             :     if ( bLocalUseExceptions ) {
   46578             :       CPLErr eclass = CPLGetLastErrorType();
   46579             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46580             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46581             :       }
   46582             :     }
   46583             : #endif
   46584             :   }
   46585          31 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46586          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; } }
   46587             :   return resultobj;
   46588             : fail:
   46589             :   return NULL;
   46590             : }
   46591             : 
   46592             : 
   46593          47 : SWIGINTERN PyObject *_wrap_Relationship_GetCardinality(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46594          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46595          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46596          47 :   void *argp1 = 0 ;
   46597          47 :   int res1 = 0 ;
   46598          47 :   PyObject *swig_obj[1] ;
   46599          47 :   GDALRelationshipCardinality result;
   46600             :   
   46601          47 :   if (!args) SWIG_fail;
   46602          47 :   swig_obj[0] = args;
   46603          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46604          47 :   if (!SWIG_IsOK(res1)) {
   46605           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetCardinality" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46606             :   }
   46607          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46608          47 :   {
   46609          47 :     const int bLocalUseExceptions = GetUseExceptions();
   46610          47 :     if ( bLocalUseExceptions ) {
   46611           9 :       pushErrorHandler();
   46612             :     }
   46613          47 :     {
   46614          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46615          47 :       result = (GDALRelationshipCardinality)GDALRelationshipShadow_GetCardinality(arg1);
   46616          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46617             :     }
   46618          47 :     if ( bLocalUseExceptions ) {
   46619           9 :       popErrorHandler();
   46620             :     }
   46621             : #ifndef SED_HACKS
   46622             :     if ( bLocalUseExceptions ) {
   46623             :       CPLErr eclass = CPLGetLastErrorType();
   46624             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46625             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46626             :       }
   46627             :     }
   46628             : #endif
   46629             :   }
   46630          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46631          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; } }
   46632             :   return resultobj;
   46633             : fail:
   46634             :   return NULL;
   46635             : }
   46636             : 
   46637             : 
   46638          49 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46639          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46640          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46641          49 :   void *argp1 = 0 ;
   46642          49 :   int res1 = 0 ;
   46643          49 :   PyObject *swig_obj[1] ;
   46644          49 :   char *result = 0 ;
   46645             :   
   46646          49 :   if (!args) SWIG_fail;
   46647          49 :   swig_obj[0] = args;
   46648          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46649          49 :   if (!SWIG_IsOK(res1)) {
   46650           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46651             :   }
   46652          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46653          49 :   {
   46654          49 :     const int bLocalUseExceptions = GetUseExceptions();
   46655          49 :     if ( bLocalUseExceptions ) {
   46656          10 :       pushErrorHandler();
   46657             :     }
   46658          49 :     {
   46659          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46660          49 :       result = (char *)GDALRelationshipShadow_GetLeftTableName(arg1);
   46661          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46662             :     }
   46663          49 :     if ( bLocalUseExceptions ) {
   46664          10 :       popErrorHandler();
   46665             :     }
   46666             : #ifndef SED_HACKS
   46667             :     if ( bLocalUseExceptions ) {
   46668             :       CPLErr eclass = CPLGetLastErrorType();
   46669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46671             :       }
   46672             :     }
   46673             : #endif
   46674             :   }
   46675          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46676          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; } }
   46677             :   return resultobj;
   46678             : fail:
   46679             :   return NULL;
   46680             : }
   46681             : 
   46682             : 
   46683          49 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46684          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46685          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46686          49 :   void *argp1 = 0 ;
   46687          49 :   int res1 = 0 ;
   46688          49 :   PyObject *swig_obj[1] ;
   46689          49 :   char *result = 0 ;
   46690             :   
   46691          49 :   if (!args) SWIG_fail;
   46692          49 :   swig_obj[0] = args;
   46693          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46694          49 :   if (!SWIG_IsOK(res1)) {
   46695           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46696             :   }
   46697          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46698          49 :   {
   46699          49 :     const int bLocalUseExceptions = GetUseExceptions();
   46700          49 :     if ( bLocalUseExceptions ) {
   46701          10 :       pushErrorHandler();
   46702             :     }
   46703          49 :     {
   46704          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46705          49 :       result = (char *)GDALRelationshipShadow_GetRightTableName(arg1);
   46706          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46707             :     }
   46708          49 :     if ( bLocalUseExceptions ) {
   46709          10 :       popErrorHandler();
   46710             :     }
   46711             : #ifndef SED_HACKS
   46712             :     if ( bLocalUseExceptions ) {
   46713             :       CPLErr eclass = CPLGetLastErrorType();
   46714             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46715             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46716             :       }
   46717             :     }
   46718             : #endif
   46719             :   }
   46720          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46721          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; } }
   46722             :   return resultobj;
   46723             : fail:
   46724             :   return NULL;
   46725             : }
   46726             : 
   46727             : 
   46728          34 : SWIGINTERN PyObject *_wrap_Relationship_GetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46729          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46730          34 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46731          34 :   void *argp1 = 0 ;
   46732          34 :   int res1 = 0 ;
   46733          34 :   PyObject *swig_obj[1] ;
   46734          34 :   char *result = 0 ;
   46735             :   
   46736          34 :   if (!args) SWIG_fail;
   46737          34 :   swig_obj[0] = args;
   46738          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46739          34 :   if (!SWIG_IsOK(res1)) {
   46740           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46741             :   }
   46742          34 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46743          34 :   {
   46744          34 :     const int bLocalUseExceptions = GetUseExceptions();
   46745          34 :     if ( bLocalUseExceptions ) {
   46746          11 :       pushErrorHandler();
   46747             :     }
   46748          34 :     {
   46749          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46750          34 :       result = (char *)GDALRelationshipShadow_GetMappingTableName(arg1);
   46751          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46752             :     }
   46753          34 :     if ( bLocalUseExceptions ) {
   46754          11 :       popErrorHandler();
   46755             :     }
   46756             : #ifndef SED_HACKS
   46757             :     if ( bLocalUseExceptions ) {
   46758             :       CPLErr eclass = CPLGetLastErrorType();
   46759             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46760             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46761             :       }
   46762             :     }
   46763             : #endif
   46764             :   }
   46765          34 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46766          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; } }
   46767             :   return resultobj;
   46768             : fail:
   46769             :   return NULL;
   46770             : }
   46771             : 
   46772             : 
   46773          14 : SWIGINTERN PyObject *_wrap_Relationship_SetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46774          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46775          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46776          14 :   char *arg2 = (char *) 0 ;
   46777          14 :   void *argp1 = 0 ;
   46778          14 :   int res1 = 0 ;
   46779          14 :   PyObject *str2 = 0 ;
   46780          14 :   int bToFree2 = 0 ;
   46781          14 :   PyObject *swig_obj[2] ;
   46782             :   
   46783          14 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetMappingTableName", 2, 2, swig_obj)) SWIG_fail;
   46784          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46785          14 :   if (!SWIG_IsOK(res1)) {
   46786           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46787             :   }
   46788          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46789          14 :   {
   46790             :     /* %typemap(in) (tostring argin) */
   46791          14 :     str2 = PyObject_Str( swig_obj[1] );
   46792          14 :     if ( str2 == 0 ) {
   46793           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   46794           0 :       SWIG_fail;
   46795             :     }
   46796             :     
   46797          14 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   46798             :   }
   46799          14 :   {
   46800          14 :     const int bLocalUseExceptions = GetUseExceptions();
   46801          14 :     if ( bLocalUseExceptions ) {
   46802           1 :       pushErrorHandler();
   46803             :     }
   46804          14 :     {
   46805          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46806          14 :       GDALRelationshipShadow_SetMappingTableName(arg1,(char const *)arg2);
   46807          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46808             :     }
   46809          14 :     if ( bLocalUseExceptions ) {
   46810           1 :       popErrorHandler();
   46811             :     }
   46812             : #ifndef SED_HACKS
   46813             :     if ( bLocalUseExceptions ) {
   46814             :       CPLErr eclass = CPLGetLastErrorType();
   46815             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46816             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46817             :       }
   46818             :     }
   46819             : #endif
   46820             :   }
   46821          14 :   resultobj = SWIG_Py_Void();
   46822          14 :   {
   46823             :     /* %typemap(freearg) (tostring argin) */
   46824          14 :     if ( str2 != NULL)
   46825             :     {
   46826          14 :       Py_DECREF(str2);
   46827             :     }
   46828          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   46829             :   }
   46830          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; } }
   46831             :   return resultobj;
   46832           0 : fail:
   46833           0 :   {
   46834             :     /* %typemap(freearg) (tostring argin) */
   46835           0 :     if ( str2 != NULL)
   46836             :     {
   46837           0 :       Py_DECREF(str2);
   46838             :     }
   46839          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   46840             :   }
   46841             :   return NULL;
   46842             : }
   46843             : 
   46844             : 
   46845          48 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46846          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46847          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46848          48 :   void *argp1 = 0 ;
   46849          48 :   int res1 = 0 ;
   46850          48 :   PyObject *swig_obj[1] ;
   46851          48 :   char **result = 0 ;
   46852             :   
   46853          48 :   if (!args) SWIG_fail;
   46854          48 :   swig_obj[0] = args;
   46855          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46856          48 :   if (!SWIG_IsOK(res1)) {
   46857           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46858             :   }
   46859          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46860          48 :   {
   46861          48 :     const int bLocalUseExceptions = GetUseExceptions();
   46862          48 :     if ( bLocalUseExceptions ) {
   46863           9 :       pushErrorHandler();
   46864             :     }
   46865          48 :     {
   46866          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46867          48 :       result = (char **)GDALRelationshipShadow_GetLeftTableFields(arg1);
   46868          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46869             :     }
   46870          48 :     if ( bLocalUseExceptions ) {
   46871           9 :       popErrorHandler();
   46872             :     }
   46873             : #ifndef SED_HACKS
   46874             :     if ( bLocalUseExceptions ) {
   46875             :       CPLErr eclass = CPLGetLastErrorType();
   46876             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46877             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46878             :       }
   46879             :     }
   46880             : #endif
   46881             :   }
   46882          48 :   {
   46883             :     /* %typemap(out) char **CSL -> ( string ) */
   46884          48 :     bool bErr = false;
   46885          48 :     resultobj = CSLToList(result, &bErr);
   46886          48 :     CSLDestroy(result);
   46887          48 :     if( bErr ) {
   46888           0 :       SWIG_fail;
   46889             :     }
   46890             :   }
   46891          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; } }
   46892             :   return resultobj;
   46893             : fail:
   46894             :   return NULL;
   46895             : }
   46896             : 
   46897             : 
   46898          48 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46899          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46900          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46901          48 :   void *argp1 = 0 ;
   46902          48 :   int res1 = 0 ;
   46903          48 :   PyObject *swig_obj[1] ;
   46904          48 :   char **result = 0 ;
   46905             :   
   46906          48 :   if (!args) SWIG_fail;
   46907          48 :   swig_obj[0] = args;
   46908          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46909          48 :   if (!SWIG_IsOK(res1)) {
   46910           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46911             :   }
   46912          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46913          48 :   {
   46914          48 :     const int bLocalUseExceptions = GetUseExceptions();
   46915          48 :     if ( bLocalUseExceptions ) {
   46916           9 :       pushErrorHandler();
   46917             :     }
   46918          48 :     {
   46919          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46920          48 :       result = (char **)GDALRelationshipShadow_GetRightTableFields(arg1);
   46921          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46922             :     }
   46923          48 :     if ( bLocalUseExceptions ) {
   46924           9 :       popErrorHandler();
   46925             :     }
   46926             : #ifndef SED_HACKS
   46927             :     if ( bLocalUseExceptions ) {
   46928             :       CPLErr eclass = CPLGetLastErrorType();
   46929             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46930             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46931             :       }
   46932             :     }
   46933             : #endif
   46934             :   }
   46935          48 :   {
   46936             :     /* %typemap(out) char **CSL -> ( string ) */
   46937          48 :     bool bErr = false;
   46938          48 :     resultobj = CSLToList(result, &bErr);
   46939          48 :     CSLDestroy(result);
   46940          48 :     if( bErr ) {
   46941           0 :       SWIG_fail;
   46942             :     }
   46943             :   }
   46944          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; } }
   46945             :   return resultobj;
   46946             : fail:
   46947             :   return NULL;
   46948             : }
   46949             : 
   46950             : 
   46951          37 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46952          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46953          37 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46954          37 :   char **arg2 = (char **) 0 ;
   46955          37 :   void *argp1 = 0 ;
   46956          37 :   int res1 = 0 ;
   46957          37 :   PyObject *swig_obj[2] ;
   46958             :   
   46959          37 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftTableFields", 2, 2, swig_obj)) SWIG_fail;
   46960          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46961          37 :   if (!SWIG_IsOK(res1)) {
   46962           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46963             :   }
   46964          37 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46965          37 :   {
   46966             :     /* %typemap(in) char **dict */
   46967          37 :     arg2 = NULL;
   46968          37 :     if ( PySequence_Check( swig_obj[1] ) ) {
   46969          37 :       int bErr = FALSE;
   46970          37 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   46971          37 :       if ( bErr )
   46972             :       {
   46973           0 :         SWIG_fail;
   46974             :       }
   46975             :     }
   46976           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   46977           0 :       int bErr = FALSE;
   46978           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   46979           0 :       if ( bErr )
   46980             :       {
   46981           0 :         SWIG_fail;
   46982             :       }
   46983             :     }
   46984             :     else {
   46985           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46986           0 :       SWIG_fail;
   46987             :     }
   46988             :   }
   46989          37 :   {
   46990          37 :     const int bLocalUseExceptions = GetUseExceptions();
   46991          37 :     if ( bLocalUseExceptions ) {
   46992           1 :       pushErrorHandler();
   46993             :     }
   46994          37 :     {
   46995          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46996          37 :       GDALRelationshipShadow_SetLeftTableFields(arg1,arg2);
   46997          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46998             :     }
   46999          37 :     if ( bLocalUseExceptions ) {
   47000           1 :       popErrorHandler();
   47001             :     }
   47002             : #ifndef SED_HACKS
   47003             :     if ( bLocalUseExceptions ) {
   47004             :       CPLErr eclass = CPLGetLastErrorType();
   47005             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47006             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47007             :       }
   47008             :     }
   47009             : #endif
   47010             :   }
   47011          37 :   resultobj = SWIG_Py_Void();
   47012          37 :   {
   47013             :     /* %typemap(freearg) char **dict */
   47014          37 :     CSLDestroy( arg2 );
   47015             :   }
   47016          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; } }
   47017             :   return resultobj;
   47018           0 : fail:
   47019           0 :   {
   47020             :     /* %typemap(freearg) char **dict */
   47021           0 :     CSLDestroy( arg2 );
   47022             :   }
   47023             :   return NULL;
   47024             : }
   47025             : 
   47026             : 
   47027          38 : SWIGINTERN PyObject *_wrap_Relationship_SetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47028          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47029          38 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47030          38 :   char **arg2 = (char **) 0 ;
   47031          38 :   void *argp1 = 0 ;
   47032          38 :   int res1 = 0 ;
   47033          38 :   PyObject *swig_obj[2] ;
   47034             :   
   47035          38 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightTableFields", 2, 2, swig_obj)) SWIG_fail;
   47036          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47037          38 :   if (!SWIG_IsOK(res1)) {
   47038           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47039             :   }
   47040          38 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47041          38 :   {
   47042             :     /* %typemap(in) char **dict */
   47043          38 :     arg2 = NULL;
   47044          38 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47045          38 :       int bErr = FALSE;
   47046          38 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47047          38 :       if ( bErr )
   47048             :       {
   47049           0 :         SWIG_fail;
   47050             :       }
   47051             :     }
   47052           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47053           0 :       int bErr = FALSE;
   47054           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47055           0 :       if ( bErr )
   47056             :       {
   47057           0 :         SWIG_fail;
   47058             :       }
   47059             :     }
   47060             :     else {
   47061           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47062           0 :       SWIG_fail;
   47063             :     }
   47064             :   }
   47065          38 :   {
   47066          38 :     const int bLocalUseExceptions = GetUseExceptions();
   47067          38 :     if ( bLocalUseExceptions ) {
   47068           1 :       pushErrorHandler();
   47069             :     }
   47070          38 :     {
   47071          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47072          38 :       GDALRelationshipShadow_SetRightTableFields(arg1,arg2);
   47073          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47074             :     }
   47075          38 :     if ( bLocalUseExceptions ) {
   47076           1 :       popErrorHandler();
   47077             :     }
   47078             : #ifndef SED_HACKS
   47079             :     if ( bLocalUseExceptions ) {
   47080             :       CPLErr eclass = CPLGetLastErrorType();
   47081             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47082             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47083             :       }
   47084             :     }
   47085             : #endif
   47086             :   }
   47087          38 :   resultobj = SWIG_Py_Void();
   47088          38 :   {
   47089             :     /* %typemap(freearg) char **dict */
   47090          38 :     CSLDestroy( arg2 );
   47091             :   }
   47092          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; } }
   47093             :   return resultobj;
   47094           0 : fail:
   47095           0 :   {
   47096             :     /* %typemap(freearg) char **dict */
   47097           0 :     CSLDestroy( arg2 );
   47098             :   }
   47099             :   return NULL;
   47100             : }
   47101             : 
   47102             : 
   47103          23 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47104          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47105          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47106          23 :   void *argp1 = 0 ;
   47107          23 :   int res1 = 0 ;
   47108          23 :   PyObject *swig_obj[1] ;
   47109          23 :   char **result = 0 ;
   47110             :   
   47111          23 :   if (!args) SWIG_fail;
   47112          23 :   swig_obj[0] = args;
   47113          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47114          23 :   if (!SWIG_IsOK(res1)) {
   47115           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47116             :   }
   47117          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47118          23 :   {
   47119          23 :     const int bLocalUseExceptions = GetUseExceptions();
   47120          23 :     if ( bLocalUseExceptions ) {
   47121           5 :       pushErrorHandler();
   47122             :     }
   47123          23 :     {
   47124          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47125          23 :       result = (char **)GDALRelationshipShadow_GetLeftMappingTableFields(arg1);
   47126          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47127             :     }
   47128          23 :     if ( bLocalUseExceptions ) {
   47129           5 :       popErrorHandler();
   47130             :     }
   47131             : #ifndef SED_HACKS
   47132             :     if ( bLocalUseExceptions ) {
   47133             :       CPLErr eclass = CPLGetLastErrorType();
   47134             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47135             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47136             :       }
   47137             :     }
   47138             : #endif
   47139             :   }
   47140          23 :   {
   47141             :     /* %typemap(out) char **CSL -> ( string ) */
   47142          23 :     bool bErr = false;
   47143          23 :     resultobj = CSLToList(result, &bErr);
   47144          23 :     CSLDestroy(result);
   47145          23 :     if( bErr ) {
   47146           0 :       SWIG_fail;
   47147             :     }
   47148             :   }
   47149          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; } }
   47150             :   return resultobj;
   47151             : fail:
   47152             :   return NULL;
   47153             : }
   47154             : 
   47155             : 
   47156          23 : SWIGINTERN PyObject *_wrap_Relationship_GetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47157          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47158          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47159          23 :   void *argp1 = 0 ;
   47160          23 :   int res1 = 0 ;
   47161          23 :   PyObject *swig_obj[1] ;
   47162          23 :   char **result = 0 ;
   47163             :   
   47164          23 :   if (!args) SWIG_fail;
   47165          23 :   swig_obj[0] = args;
   47166          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47167          23 :   if (!SWIG_IsOK(res1)) {
   47168           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47169             :   }
   47170          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47171          23 :   {
   47172          23 :     const int bLocalUseExceptions = GetUseExceptions();
   47173          23 :     if ( bLocalUseExceptions ) {
   47174           5 :       pushErrorHandler();
   47175             :     }
   47176          23 :     {
   47177          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47178          23 :       result = (char **)GDALRelationshipShadow_GetRightMappingTableFields(arg1);
   47179          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47180             :     }
   47181          23 :     if ( bLocalUseExceptions ) {
   47182           5 :       popErrorHandler();
   47183             :     }
   47184             : #ifndef SED_HACKS
   47185             :     if ( bLocalUseExceptions ) {
   47186             :       CPLErr eclass = CPLGetLastErrorType();
   47187             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47188             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47189             :       }
   47190             :     }
   47191             : #endif
   47192             :   }
   47193          23 :   {
   47194             :     /* %typemap(out) char **CSL -> ( string ) */
   47195          23 :     bool bErr = false;
   47196          23 :     resultobj = CSLToList(result, &bErr);
   47197          23 :     CSLDestroy(result);
   47198          23 :     if( bErr ) {
   47199           0 :       SWIG_fail;
   47200             :     }
   47201             :   }
   47202          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; } }
   47203             :   return resultobj;
   47204             : fail:
   47205             :   return NULL;
   47206             : }
   47207             : 
   47208             : 
   47209           9 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47210           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47211           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47212           9 :   char **arg2 = (char **) 0 ;
   47213           9 :   void *argp1 = 0 ;
   47214           9 :   int res1 = 0 ;
   47215           9 :   PyObject *swig_obj[2] ;
   47216             :   
   47217           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   47218           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47219           9 :   if (!SWIG_IsOK(res1)) {
   47220           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47221             :   }
   47222           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47223           9 :   {
   47224             :     /* %typemap(in) char **dict */
   47225           9 :     arg2 = NULL;
   47226           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47227           9 :       int bErr = FALSE;
   47228           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47229           9 :       if ( bErr )
   47230             :       {
   47231           0 :         SWIG_fail;
   47232             :       }
   47233             :     }
   47234           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47235           0 :       int bErr = FALSE;
   47236           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47237           0 :       if ( bErr )
   47238             :       {
   47239           0 :         SWIG_fail;
   47240             :       }
   47241             :     }
   47242             :     else {
   47243           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47244           0 :       SWIG_fail;
   47245             :     }
   47246             :   }
   47247           9 :   {
   47248           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47249           9 :     if ( bLocalUseExceptions ) {
   47250           1 :       pushErrorHandler();
   47251             :     }
   47252           9 :     {
   47253           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47254           9 :       GDALRelationshipShadow_SetLeftMappingTableFields(arg1,arg2);
   47255           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47256             :     }
   47257           9 :     if ( bLocalUseExceptions ) {
   47258           1 :       popErrorHandler();
   47259             :     }
   47260             : #ifndef SED_HACKS
   47261             :     if ( bLocalUseExceptions ) {
   47262             :       CPLErr eclass = CPLGetLastErrorType();
   47263             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47264             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47265             :       }
   47266             :     }
   47267             : #endif
   47268             :   }
   47269           9 :   resultobj = SWIG_Py_Void();
   47270           9 :   {
   47271             :     /* %typemap(freearg) char **dict */
   47272           9 :     CSLDestroy( arg2 );
   47273             :   }
   47274           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; } }
   47275             :   return resultobj;
   47276           0 : fail:
   47277           0 :   {
   47278             :     /* %typemap(freearg) char **dict */
   47279           0 :     CSLDestroy( arg2 );
   47280             :   }
   47281             :   return NULL;
   47282             : }
   47283             : 
   47284             : 
   47285           9 : SWIGINTERN PyObject *_wrap_Relationship_SetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47286           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47287           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47288           9 :   char **arg2 = (char **) 0 ;
   47289           9 :   void *argp1 = 0 ;
   47290           9 :   int res1 = 0 ;
   47291           9 :   PyObject *swig_obj[2] ;
   47292             :   
   47293           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   47294           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47295           9 :   if (!SWIG_IsOK(res1)) {
   47296           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47297             :   }
   47298           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47299           9 :   {
   47300             :     /* %typemap(in) char **dict */
   47301           9 :     arg2 = NULL;
   47302           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47303           9 :       int bErr = FALSE;
   47304           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47305           9 :       if ( bErr )
   47306             :       {
   47307           0 :         SWIG_fail;
   47308             :       }
   47309             :     }
   47310           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47311           0 :       int bErr = FALSE;
   47312           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47313           0 :       if ( bErr )
   47314             :       {
   47315           0 :         SWIG_fail;
   47316             :       }
   47317             :     }
   47318             :     else {
   47319           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47320           0 :       SWIG_fail;
   47321             :     }
   47322             :   }
   47323           9 :   {
   47324           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47325           9 :     if ( bLocalUseExceptions ) {
   47326           1 :       pushErrorHandler();
   47327             :     }
   47328           9 :     {
   47329           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47330           9 :       GDALRelationshipShadow_SetRightMappingTableFields(arg1,arg2);
   47331           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47332             :     }
   47333           9 :     if ( bLocalUseExceptions ) {
   47334           1 :       popErrorHandler();
   47335             :     }
   47336             : #ifndef SED_HACKS
   47337             :     if ( bLocalUseExceptions ) {
   47338             :       CPLErr eclass = CPLGetLastErrorType();
   47339             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47340             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47341             :       }
   47342             :     }
   47343             : #endif
   47344             :   }
   47345           9 :   resultobj = SWIG_Py_Void();
   47346           9 :   {
   47347             :     /* %typemap(freearg) char **dict */
   47348           9 :     CSLDestroy( arg2 );
   47349             :   }
   47350           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; } }
   47351             :   return resultobj;
   47352           0 : fail:
   47353           0 :   {
   47354             :     /* %typemap(freearg) char **dict */
   47355           0 :     CSLDestroy( arg2 );
   47356             :   }
   47357             :   return NULL;
   47358             : }
   47359             : 
   47360             : 
   47361          47 : SWIGINTERN PyObject *_wrap_Relationship_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47362          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47363          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47364          47 :   void *argp1 = 0 ;
   47365          47 :   int res1 = 0 ;
   47366          47 :   PyObject *swig_obj[1] ;
   47367          47 :   GDALRelationshipType result;
   47368             :   
   47369          47 :   if (!args) SWIG_fail;
   47370          47 :   swig_obj[0] = args;
   47371          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47372          47 :   if (!SWIG_IsOK(res1)) {
   47373           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47374             :   }
   47375          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47376          47 :   {
   47377          47 :     const int bLocalUseExceptions = GetUseExceptions();
   47378          47 :     if ( bLocalUseExceptions ) {
   47379           9 :       pushErrorHandler();
   47380             :     }
   47381          47 :     {
   47382          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47383          47 :       result = (GDALRelationshipType)GDALRelationshipShadow_GetType(arg1);
   47384          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47385             :     }
   47386          47 :     if ( bLocalUseExceptions ) {
   47387           9 :       popErrorHandler();
   47388             :     }
   47389             : #ifndef SED_HACKS
   47390             :     if ( bLocalUseExceptions ) {
   47391             :       CPLErr eclass = CPLGetLastErrorType();
   47392             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47393             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47394             :       }
   47395             :     }
   47396             : #endif
   47397             :   }
   47398          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47399          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; } }
   47400             :   return resultobj;
   47401             : fail:
   47402             :   return NULL;
   47403             : }
   47404             : 
   47405             : 
   47406          10 : SWIGINTERN PyObject *_wrap_Relationship_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47407          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47408          10 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47409          10 :   GDALRelationshipType arg2 ;
   47410          10 :   void *argp1 = 0 ;
   47411          10 :   int res1 = 0 ;
   47412          10 :   int val2 ;
   47413          10 :   int ecode2 = 0 ;
   47414          10 :   PyObject *swig_obj[2] ;
   47415             :   
   47416          10 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetType", 2, 2, swig_obj)) SWIG_fail;
   47417          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47418          10 :   if (!SWIG_IsOK(res1)) {
   47419           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47420             :   }
   47421          10 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47422          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   47423          10 :   if (!SWIG_IsOK(ecode2)) {
   47424           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Relationship_SetType" "', argument " "2"" of type '" "GDALRelationshipType""'");
   47425             :   } 
   47426          10 :   arg2 = static_cast< GDALRelationshipType >(val2);
   47427          10 :   {
   47428          10 :     const int bLocalUseExceptions = GetUseExceptions();
   47429          10 :     if ( bLocalUseExceptions ) {
   47430           1 :       pushErrorHandler();
   47431             :     }
   47432          10 :     {
   47433          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47434          10 :       GDALRelationshipShadow_SetType(arg1,arg2);
   47435          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47436             :     }
   47437          10 :     if ( bLocalUseExceptions ) {
   47438           1 :       popErrorHandler();
   47439             :     }
   47440             : #ifndef SED_HACKS
   47441             :     if ( bLocalUseExceptions ) {
   47442             :       CPLErr eclass = CPLGetLastErrorType();
   47443             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47444             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47445             :       }
   47446             :     }
   47447             : #endif
   47448             :   }
   47449          10 :   resultobj = SWIG_Py_Void();
   47450          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; } }
   47451             :   return resultobj;
   47452             : fail:
   47453             :   return NULL;
   47454             : }
   47455             : 
   47456             : 
   47457          14 : SWIGINTERN PyObject *_wrap_Relationship_GetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47458          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47459          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47460          14 :   void *argp1 = 0 ;
   47461          14 :   int res1 = 0 ;
   47462          14 :   PyObject *swig_obj[1] ;
   47463          14 :   char *result = 0 ;
   47464             :   
   47465          14 :   if (!args) SWIG_fail;
   47466          14 :   swig_obj[0] = args;
   47467          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47468          14 :   if (!SWIG_IsOK(res1)) {
   47469           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47470             :   }
   47471          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47472          14 :   {
   47473          14 :     const int bLocalUseExceptions = GetUseExceptions();
   47474          14 :     if ( bLocalUseExceptions ) {
   47475           4 :       pushErrorHandler();
   47476             :     }
   47477          14 :     {
   47478          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47479          14 :       result = (char *)GDALRelationshipShadow_GetForwardPathLabel(arg1);
   47480          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47481             :     }
   47482          14 :     if ( bLocalUseExceptions ) {
   47483           4 :       popErrorHandler();
   47484             :     }
   47485             : #ifndef SED_HACKS
   47486             :     if ( bLocalUseExceptions ) {
   47487             :       CPLErr eclass = CPLGetLastErrorType();
   47488             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47489             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47490             :       }
   47491             :     }
   47492             : #endif
   47493             :   }
   47494          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47495          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; } }
   47496             :   return resultobj;
   47497             : fail:
   47498             :   return NULL;
   47499             : }
   47500             : 
   47501             : 
   47502           9 : SWIGINTERN PyObject *_wrap_Relationship_SetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47503           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47504           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47505           9 :   char *arg2 = (char *) 0 ;
   47506           9 :   void *argp1 = 0 ;
   47507           9 :   int res1 = 0 ;
   47508           9 :   PyObject *str2 = 0 ;
   47509           9 :   int bToFree2 = 0 ;
   47510           9 :   PyObject *swig_obj[2] ;
   47511             :   
   47512           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetForwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   47513           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47514           9 :   if (!SWIG_IsOK(res1)) {
   47515           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47516             :   }
   47517           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47518           9 :   {
   47519             :     /* %typemap(in) (tostring argin) */
   47520           9 :     str2 = PyObject_Str( swig_obj[1] );
   47521           9 :     if ( str2 == 0 ) {
   47522           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47523           0 :       SWIG_fail;
   47524             :     }
   47525             :     
   47526           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47527             :   }
   47528           9 :   {
   47529           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47530           9 :     if ( bLocalUseExceptions ) {
   47531           1 :       pushErrorHandler();
   47532             :     }
   47533           9 :     {
   47534           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47535           9 :       GDALRelationshipShadow_SetForwardPathLabel(arg1,(char const *)arg2);
   47536           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47537             :     }
   47538           9 :     if ( bLocalUseExceptions ) {
   47539           1 :       popErrorHandler();
   47540             :     }
   47541             : #ifndef SED_HACKS
   47542             :     if ( bLocalUseExceptions ) {
   47543             :       CPLErr eclass = CPLGetLastErrorType();
   47544             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47545             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47546             :       }
   47547             :     }
   47548             : #endif
   47549             :   }
   47550           9 :   resultobj = SWIG_Py_Void();
   47551           9 :   {
   47552             :     /* %typemap(freearg) (tostring argin) */
   47553           9 :     if ( str2 != NULL)
   47554             :     {
   47555           9 :       Py_DECREF(str2);
   47556             :     }
   47557           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47558             :   }
   47559           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; } }
   47560             :   return resultobj;
   47561           0 : fail:
   47562           0 :   {
   47563             :     /* %typemap(freearg) (tostring argin) */
   47564           0 :     if ( str2 != NULL)
   47565             :     {
   47566           0 :       Py_DECREF(str2);
   47567             :     }
   47568           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47569             :   }
   47570             :   return NULL;
   47571             : }
   47572             : 
   47573             : 
   47574          14 : SWIGINTERN PyObject *_wrap_Relationship_GetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47575          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47576          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47577          14 :   void *argp1 = 0 ;
   47578          14 :   int res1 = 0 ;
   47579          14 :   PyObject *swig_obj[1] ;
   47580          14 :   char *result = 0 ;
   47581             :   
   47582          14 :   if (!args) SWIG_fail;
   47583          14 :   swig_obj[0] = args;
   47584          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47585          14 :   if (!SWIG_IsOK(res1)) {
   47586           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47587             :   }
   47588          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47589          14 :   {
   47590          14 :     const int bLocalUseExceptions = GetUseExceptions();
   47591          14 :     if ( bLocalUseExceptions ) {
   47592           4 :       pushErrorHandler();
   47593             :     }
   47594          14 :     {
   47595          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47596          14 :       result = (char *)GDALRelationshipShadow_GetBackwardPathLabel(arg1);
   47597          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47598             :     }
   47599          14 :     if ( bLocalUseExceptions ) {
   47600           4 :       popErrorHandler();
   47601             :     }
   47602             : #ifndef SED_HACKS
   47603             :     if ( bLocalUseExceptions ) {
   47604             :       CPLErr eclass = CPLGetLastErrorType();
   47605             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47606             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47607             :       }
   47608             :     }
   47609             : #endif
   47610             :   }
   47611          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47612          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; } }
   47613             :   return resultobj;
   47614             : fail:
   47615             :   return NULL;
   47616             : }
   47617             : 
   47618             : 
   47619           9 : SWIGINTERN PyObject *_wrap_Relationship_SetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47620           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47621           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47622           9 :   char *arg2 = (char *) 0 ;
   47623           9 :   void *argp1 = 0 ;
   47624           9 :   int res1 = 0 ;
   47625           9 :   PyObject *str2 = 0 ;
   47626           9 :   int bToFree2 = 0 ;
   47627           9 :   PyObject *swig_obj[2] ;
   47628             :   
   47629           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetBackwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   47630           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47631           9 :   if (!SWIG_IsOK(res1)) {
   47632           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47633             :   }
   47634           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47635           9 :   {
   47636             :     /* %typemap(in) (tostring argin) */
   47637           9 :     str2 = PyObject_Str( swig_obj[1] );
   47638           9 :     if ( str2 == 0 ) {
   47639           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47640           0 :       SWIG_fail;
   47641             :     }
   47642             :     
   47643           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47644             :   }
   47645           9 :   {
   47646           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47647           9 :     if ( bLocalUseExceptions ) {
   47648           1 :       pushErrorHandler();
   47649             :     }
   47650           9 :     {
   47651           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47652           9 :       GDALRelationshipShadow_SetBackwardPathLabel(arg1,(char const *)arg2);
   47653           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47654             :     }
   47655           9 :     if ( bLocalUseExceptions ) {
   47656           1 :       popErrorHandler();
   47657             :     }
   47658             : #ifndef SED_HACKS
   47659             :     if ( bLocalUseExceptions ) {
   47660             :       CPLErr eclass = CPLGetLastErrorType();
   47661             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47662             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47663             :       }
   47664             :     }
   47665             : #endif
   47666             :   }
   47667           9 :   resultobj = SWIG_Py_Void();
   47668           9 :   {
   47669             :     /* %typemap(freearg) (tostring argin) */
   47670           9 :     if ( str2 != NULL)
   47671             :     {
   47672           9 :       Py_DECREF(str2);
   47673             :     }
   47674           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47675             :   }
   47676           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; } }
   47677             :   return resultobj;
   47678           0 : fail:
   47679           0 :   {
   47680             :     /* %typemap(freearg) (tostring argin) */
   47681           0 :     if ( str2 != NULL)
   47682             :     {
   47683           0 :       Py_DECREF(str2);
   47684             :     }
   47685           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47686             :   }
   47687             :   return NULL;
   47688             : }
   47689             : 
   47690             : 
   47691          44 : SWIGINTERN PyObject *_wrap_Relationship_GetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47692          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47693          44 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47694          44 :   void *argp1 = 0 ;
   47695          44 :   int res1 = 0 ;
   47696          44 :   PyObject *swig_obj[1] ;
   47697          44 :   char *result = 0 ;
   47698             :   
   47699          44 :   if (!args) SWIG_fail;
   47700          44 :   swig_obj[0] = args;
   47701          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47702          44 :   if (!SWIG_IsOK(res1)) {
   47703           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47704             :   }
   47705          44 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47706          44 :   {
   47707          44 :     const int bLocalUseExceptions = GetUseExceptions();
   47708          44 :     if ( bLocalUseExceptions ) {
   47709           9 :       pushErrorHandler();
   47710             :     }
   47711          44 :     {
   47712          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47713          44 :       result = (char *)GDALRelationshipShadow_GetRelatedTableType(arg1);
   47714          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47715             :     }
   47716          44 :     if ( bLocalUseExceptions ) {
   47717           9 :       popErrorHandler();
   47718             :     }
   47719             : #ifndef SED_HACKS
   47720             :     if ( bLocalUseExceptions ) {
   47721             :       CPLErr eclass = CPLGetLastErrorType();
   47722             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47723             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47724             :       }
   47725             :     }
   47726             : #endif
   47727             :   }
   47728          44 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47729          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; } }
   47730             :   return resultobj;
   47731             : fail:
   47732             :   return NULL;
   47733             : }
   47734             : 
   47735             : 
   47736          20 : SWIGINTERN PyObject *_wrap_Relationship_SetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47737          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47738          20 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47739          20 :   char *arg2 = (char *) 0 ;
   47740          20 :   void *argp1 = 0 ;
   47741          20 :   int res1 = 0 ;
   47742          20 :   PyObject *str2 = 0 ;
   47743          20 :   int bToFree2 = 0 ;
   47744          20 :   PyObject *swig_obj[2] ;
   47745             :   
   47746          20 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRelatedTableType", 2, 2, swig_obj)) SWIG_fail;
   47747          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47748          20 :   if (!SWIG_IsOK(res1)) {
   47749           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47750             :   }
   47751          20 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47752          20 :   {
   47753             :     /* %typemap(in) (tostring argin) */
   47754          20 :     str2 = PyObject_Str( swig_obj[1] );
   47755          20 :     if ( str2 == 0 ) {
   47756           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47757           0 :       SWIG_fail;
   47758             :     }
   47759             :     
   47760          20 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47761             :   }
   47762          20 :   {
   47763          20 :     const int bLocalUseExceptions = GetUseExceptions();
   47764          20 :     if ( bLocalUseExceptions ) {
   47765           1 :       pushErrorHandler();
   47766             :     }
   47767          20 :     {
   47768          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47769          20 :       GDALRelationshipShadow_SetRelatedTableType(arg1,(char const *)arg2);
   47770          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47771             :     }
   47772          20 :     if ( bLocalUseExceptions ) {
   47773           1 :       popErrorHandler();
   47774             :     }
   47775             : #ifndef SED_HACKS
   47776             :     if ( bLocalUseExceptions ) {
   47777             :       CPLErr eclass = CPLGetLastErrorType();
   47778             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47779             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47780             :       }
   47781             :     }
   47782             : #endif
   47783             :   }
   47784          20 :   resultobj = SWIG_Py_Void();
   47785          20 :   {
   47786             :     /* %typemap(freearg) (tostring argin) */
   47787          20 :     if ( str2 != NULL)
   47788             :     {
   47789          20 :       Py_DECREF(str2);
   47790             :     }
   47791          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   47792             :   }
   47793          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; } }
   47794             :   return resultobj;
   47795           0 : fail:
   47796           0 :   {
   47797             :     /* %typemap(freearg) (tostring argin) */
   47798           0 :     if ( str2 != NULL)
   47799             :     {
   47800           0 :       Py_DECREF(str2);
   47801             :     }
   47802          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   47803             :   }
   47804             :   return NULL;
   47805             : }
   47806             : 
   47807             : 
   47808         277 : SWIGINTERN PyObject *Relationship_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47809         277 :   PyObject *obj;
   47810         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   47811         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRelationshipShadow, SWIG_NewClientData(obj));
   47812         277 :   return SWIG_Py_Void();
   47813             : }
   47814             : 
   47815          29 : SWIGINTERN PyObject *Relationship_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47816          29 :   return SWIG_Python_InitShadowInstance(args);
   47817             : }
   47818             : 
   47819        3713 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47820        3713 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47821        3713 :   double arg1 ;
   47822        3713 :   char *arg2 = (char *) NULL ;
   47823        3713 :   void *arg3 = (void *) NULL ;
   47824        3713 :   double val1 ;
   47825        3713 :   int ecode1 = 0 ;
   47826        3713 :   int res2 ;
   47827        3713 :   char *buf2 = 0 ;
   47828        3713 :   int alloc2 = 0 ;
   47829        3713 :   int res3 ;
   47830        3713 :   PyObject * obj0 = 0 ;
   47831        3713 :   PyObject * obj1 = 0 ;
   47832        3713 :   PyObject * obj2 = 0 ;
   47833        3713 :   char * kwnames[] = {
   47834             :     (char *)"dfProgress",  (char *)"pszMessage",  (char *)"pData",  NULL 
   47835             :   };
   47836        3713 :   int result;
   47837             :   
   47838        3713 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   47839        3713 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   47840        3713 :   if (!SWIG_IsOK(ecode1)) {
   47841           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   47842             :   } 
   47843        3713 :   arg1 = static_cast< double >(val1);
   47844        3713 :   if (obj1) {
   47845        1347 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   47846        1347 :     if (!SWIG_IsOK(res2)) {
   47847           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   47848             :     }
   47849        1347 :     arg2 = reinterpret_cast< char * >(buf2);
   47850             :   }
   47851        3713 :   if (obj2) {
   47852        1347 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   47853        1347 :     if (!SWIG_IsOK(res3)) {
   47854           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   47855             :     }
   47856             :   }
   47857        3713 :   {
   47858        3713 :     const int bLocalUseExceptions = GetUseExceptions();
   47859        3713 :     if ( bLocalUseExceptions ) {
   47860        3710 :       pushErrorHandler();
   47861             :     }
   47862        3713 :     {
   47863        3713 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47864        3713 :       result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   47865        3713 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47866             :     }
   47867        3713 :     if ( bLocalUseExceptions ) {
   47868        3710 :       popErrorHandler();
   47869             :     }
   47870             : #ifndef SED_HACKS
   47871             :     if ( bLocalUseExceptions ) {
   47872             :       CPLErr eclass = CPLGetLastErrorType();
   47873             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47874             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47875             :       }
   47876             :     }
   47877             : #endif
   47878             :   }
   47879        3713 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47880        3713 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   47881        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; } }
   47882             :   return resultobj;
   47883           0 : fail:
   47884           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   47885             :   return NULL;
   47886             : }
   47887             : 
   47888             : 
   47889           4 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47890           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47891           4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47892           4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47893           4 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   47894           4 :   int arg4 ;
   47895           4 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   47896           4 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47897           4 :   void *arg7 = (void *) NULL ;
   47898           4 :   void *argp1 = 0 ;
   47899           4 :   int res1 = 0 ;
   47900           4 :   void *argp2 = 0 ;
   47901           4 :   int res2 = 0 ;
   47902           4 :   void *argp3 = 0 ;
   47903           4 :   int res3 = 0 ;
   47904           4 :   int val4 ;
   47905           4 :   int ecode4 = 0 ;
   47906           4 :   void *argp5 = 0 ;
   47907           4 :   int res5 = 0 ;
   47908           4 :   PyObject * obj0 = 0 ;
   47909           4 :   PyObject * obj1 = 0 ;
   47910           4 :   PyObject * obj2 = 0 ;
   47911           4 :   PyObject * obj3 = 0 ;
   47912           4 :   PyObject * obj4 = 0 ;
   47913           4 :   PyObject * obj5 = 0 ;
   47914           4 :   PyObject * obj6 = 0 ;
   47915           4 :   char * kwnames[] = {
   47916             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"num_colors",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   47917             :   };
   47918           4 :   int result;
   47919             :   
   47920             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47921           4 :   PyProgressData *psProgressInfo;
   47922           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47923           4 :   psProgressInfo->nLastReported = -1;
   47924           4 :   psProgressInfo->psPyCallback = NULL;
   47925           4 :   psProgressInfo->psPyCallbackData = NULL;
   47926           4 :   arg7 = psProgressInfo;
   47927           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:ComputeMedianCutPCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   47928           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47929           4 :   if (!SWIG_IsOK(res1)) {
   47930           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   47931             :   }
   47932           4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   47933           4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47934           4 :   if (!SWIG_IsOK(res2)) {
   47935           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   47936             :   }
   47937           4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   47938           4 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47939           4 :   if (!SWIG_IsOK(res3)) {
   47940           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   47941             :   }
   47942           4 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   47943           4 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   47944           4 :   if (!SWIG_IsOK(ecode4)) {
   47945           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   47946             :   } 
   47947           4 :   arg4 = static_cast< int >(val4);
   47948           4 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   47949           4 :   if (!SWIG_IsOK(res5)) {
   47950           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   47951             :   }
   47952           4 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   47953           4 :   if (obj5) {
   47954           3 :     {
   47955             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47956             :       /* callback_func typemap */
   47957             :       
   47958             :       /* In some cases 0 is passed instead of None. */
   47959             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47960           3 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   47961             :       {
   47962           0 :         if( PyLong_AsLong(obj5) == 0 )
   47963             :         {
   47964           0 :           obj5 = Py_None;
   47965             :         }
   47966             :       }
   47967             :       
   47968           3 :       if (obj5 && obj5 != Py_None ) {
   47969           3 :         void* cbfunction = NULL;
   47970           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   47971             :             (void**)&cbfunction,
   47972             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47973             :             SWIG_POINTER_EXCEPTION | 0 ));
   47974             :         
   47975           3 :         if ( cbfunction == GDALTermProgress ) {
   47976             :           arg6 = GDALTermProgress;
   47977             :         } else {
   47978           3 :           if (!PyCallable_Check(obj5)) {
   47979           0 :             PyErr_SetString( PyExc_RuntimeError,
   47980             :               "Object given is not a Python function" );
   47981           0 :             SWIG_fail;
   47982             :           }
   47983           3 :           psProgressInfo->psPyCallback = obj5;
   47984           3 :           arg6 = PyProgressProxy;
   47985             :         }
   47986             :         
   47987             :       }
   47988             :       
   47989             :     }
   47990             :   }
   47991           4 :   if (obj6) {
   47992           0 :     {
   47993             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47994           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   47995             :     }
   47996             :   }
   47997           4 :   {
   47998           4 :     if (!arg1) {
   47999           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48000             :     }
   48001             :   }
   48002           4 :   {
   48003           4 :     if (!arg2) {
   48004           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48005             :     }
   48006             :   }
   48007           4 :   {
   48008           4 :     if (!arg3) {
   48009           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48010             :     }
   48011             :   }
   48012           4 :   {
   48013           4 :     if (!arg5) {
   48014           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48015             :     }
   48016             :   }
   48017           4 :   {
   48018           4 :     const int bLocalUseExceptions = GetUseExceptions();
   48019           4 :     if ( bLocalUseExceptions ) {
   48020           4 :       pushErrorHandler();
   48021             :     }
   48022           4 :     {
   48023           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48024           4 :       result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   48025           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48026             :     }
   48027           4 :     if ( bLocalUseExceptions ) {
   48028           4 :       popErrorHandler();
   48029             :     }
   48030             : #ifndef SED_HACKS
   48031             :     if ( bLocalUseExceptions ) {
   48032             :       CPLErr eclass = CPLGetLastErrorType();
   48033             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48034             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48035             :       }
   48036             :     }
   48037             : #endif
   48038             :   }
   48039           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48040           4 :   {
   48041             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48042             :     
   48043           4 :     CPLFree(psProgressInfo);
   48044             :     
   48045             :   }
   48046           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; } }
   48047             :   return resultobj;
   48048           0 : fail:
   48049           0 :   {
   48050             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48051             :     
   48052           0 :     CPLFree(psProgressInfo);
   48053             :     
   48054             :   }
   48055             :   return NULL;
   48056             : }
   48057             : 
   48058             : 
   48059           7 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48060           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48061           7 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48062           7 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48063           7 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   48064           7 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   48065           7 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   48066           7 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   48067           7 :   void *arg7 = (void *) NULL ;
   48068           7 :   void *argp1 = 0 ;
   48069           7 :   int res1 = 0 ;
   48070           7 :   void *argp2 = 0 ;
   48071           7 :   int res2 = 0 ;
   48072           7 :   void *argp3 = 0 ;
   48073           7 :   int res3 = 0 ;
   48074           7 :   void *argp4 = 0 ;
   48075           7 :   int res4 = 0 ;
   48076           7 :   void *argp5 = 0 ;
   48077           7 :   int res5 = 0 ;
   48078           7 :   PyObject * obj0 = 0 ;
   48079           7 :   PyObject * obj1 = 0 ;
   48080           7 :   PyObject * obj2 = 0 ;
   48081           7 :   PyObject * obj3 = 0 ;
   48082           7 :   PyObject * obj4 = 0 ;
   48083           7 :   PyObject * obj5 = 0 ;
   48084           7 :   PyObject * obj6 = 0 ;
   48085           7 :   char * kwnames[] = {
   48086             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"target",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   48087             :   };
   48088           7 :   int result;
   48089             :   
   48090             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48091           7 :   PyProgressData *psProgressInfo;
   48092           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48093           7 :   psProgressInfo->nLastReported = -1;
   48094           7 :   psProgressInfo->psPyCallback = NULL;
   48095           7 :   psProgressInfo->psPyCallbackData = NULL;
   48096           7 :   arg7 = psProgressInfo;
   48097           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:DitherRGB2PCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   48098           7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48099           7 :   if (!SWIG_IsOK(res1)) {
   48100           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48101             :   }
   48102           7 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48103           7 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48104           7 :   if (!SWIG_IsOK(res2)) {
   48105           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48106             :   }
   48107           7 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48108           7 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48109           7 :   if (!SWIG_IsOK(res3)) {
   48110           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   48111             :   }
   48112           7 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   48113           7 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48114           7 :   if (!SWIG_IsOK(res4)) {
   48115           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   48116             :   }
   48117           7 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   48118           7 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   48119           7 :   if (!SWIG_IsOK(res5)) {
   48120           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   48121             :   }
   48122           7 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   48123           7 :   if (obj5) {
   48124           6 :     {
   48125             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48126             :       /* callback_func typemap */
   48127             :       
   48128             :       /* In some cases 0 is passed instead of None. */
   48129             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48130           6 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   48131             :       {
   48132           0 :         if( PyLong_AsLong(obj5) == 0 )
   48133             :         {
   48134           0 :           obj5 = Py_None;
   48135             :         }
   48136             :       }
   48137             :       
   48138           6 :       if (obj5 && obj5 != Py_None ) {
   48139           6 :         void* cbfunction = NULL;
   48140           6 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   48141             :             (void**)&cbfunction,
   48142             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48143             :             SWIG_POINTER_EXCEPTION | 0 ));
   48144             :         
   48145           6 :         if ( cbfunction == GDALTermProgress ) {
   48146             :           arg6 = GDALTermProgress;
   48147             :         } else {
   48148           6 :           if (!PyCallable_Check(obj5)) {
   48149           0 :             PyErr_SetString( PyExc_RuntimeError,
   48150             :               "Object given is not a Python function" );
   48151           0 :             SWIG_fail;
   48152             :           }
   48153           6 :           psProgressInfo->psPyCallback = obj5;
   48154           6 :           arg6 = PyProgressProxy;
   48155             :         }
   48156             :         
   48157             :       }
   48158             :       
   48159             :     }
   48160             :   }
   48161           7 :   if (obj6) {
   48162           0 :     {
   48163             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48164           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   48165             :     }
   48166             :   }
   48167           7 :   {
   48168           7 :     if (!arg1) {
   48169           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48170             :     }
   48171             :   }
   48172           7 :   {
   48173           7 :     if (!arg2) {
   48174           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48175             :     }
   48176             :   }
   48177           7 :   {
   48178           7 :     if (!arg3) {
   48179           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48180             :     }
   48181             :   }
   48182           7 :   {
   48183           7 :     if (!arg4) {
   48184           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48185             :     }
   48186             :   }
   48187           7 :   {
   48188           7 :     if (!arg5) {
   48189           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48190             :     }
   48191             :   }
   48192           7 :   {
   48193           7 :     const int bLocalUseExceptions = GetUseExceptions();
   48194           7 :     if ( bLocalUseExceptions ) {
   48195           7 :       pushErrorHandler();
   48196             :     }
   48197           7 :     {
   48198           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48199           7 :       result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   48200           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48201             :     }
   48202           7 :     if ( bLocalUseExceptions ) {
   48203           7 :       popErrorHandler();
   48204             :     }
   48205             : #ifndef SED_HACKS
   48206             :     if ( bLocalUseExceptions ) {
   48207             :       CPLErr eclass = CPLGetLastErrorType();
   48208             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48209             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48210             :       }
   48211             :     }
   48212             : #endif
   48213             :   }
   48214           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48215           7 :   {
   48216             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48217             :     
   48218           7 :     CPLFree(psProgressInfo);
   48219             :     
   48220             :   }
   48221           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; } }
   48222             :   return resultobj;
   48223           0 : fail:
   48224           0 :   {
   48225             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48226             :     
   48227           0 :     CPLFree(psProgressInfo);
   48228             :     
   48229             :   }
   48230             :   return NULL;
   48231             : }
   48232             : 
   48233             : 
   48234          62 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48235          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48236          62 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   48237          62 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   48238          62 :   char *arg3 = (char *) NULL ;
   48239          62 :   char *arg4 = (char *) NULL ;
   48240          62 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   48241          62 :   double arg6 = (double) 0.0 ;
   48242          62 :   double arg7 = (double) 0.0 ;
   48243          62 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   48244          62 :   void *arg9 = (void *) NULL ;
   48245          62 :   char **arg10 = (char **) NULL ;
   48246          62 :   void *argp1 = 0 ;
   48247          62 :   int res1 = 0 ;
   48248          62 :   void *argp2 = 0 ;
   48249          62 :   int res2 = 0 ;
   48250          62 :   int res3 ;
   48251          62 :   char *buf3 = 0 ;
   48252          62 :   int alloc3 = 0 ;
   48253          62 :   int res4 ;
   48254          62 :   char *buf4 = 0 ;
   48255          62 :   int alloc4 = 0 ;
   48256          62 :   int val5 ;
   48257          62 :   int ecode5 = 0 ;
   48258          62 :   double val6 ;
   48259          62 :   int ecode6 = 0 ;
   48260          62 :   double val7 ;
   48261          62 :   int ecode7 = 0 ;
   48262          62 :   PyObject * obj0 = 0 ;
   48263          62 :   PyObject * obj1 = 0 ;
   48264          62 :   PyObject * obj2 = 0 ;
   48265          62 :   PyObject * obj3 = 0 ;
   48266          62 :   PyObject * obj4 = 0 ;
   48267          62 :   PyObject * obj5 = 0 ;
   48268          62 :   PyObject * obj6 = 0 ;
   48269          62 :   PyObject * obj7 = 0 ;
   48270          62 :   PyObject * obj8 = 0 ;
   48271          62 :   PyObject * obj9 = 0 ;
   48272          62 :   char * kwnames[] = {
   48273             :     (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 
   48274             :   };
   48275          62 :   CPLErr result;
   48276             :   
   48277             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48278          62 :   PyProgressData *psProgressInfo;
   48279          62 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48280          62 :   psProgressInfo->nLastReported = -1;
   48281          62 :   psProgressInfo->psPyCallback = NULL;
   48282          62 :   psProgressInfo->psPyCallbackData = NULL;
   48283          62 :   arg9 = psProgressInfo;
   48284          62 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOOOOO:ReprojectImage", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
   48285          62 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48286          62 :   if (!SWIG_IsOK(res1)) {
   48287           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   48288             :   }
   48289          62 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   48290          62 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48291          62 :   if (!SWIG_IsOK(res2)) {
   48292           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   48293             :   }
   48294          62 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   48295          62 :   if (obj2) {
   48296          61 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   48297          61 :     if (!SWIG_IsOK(res3)) {
   48298           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   48299             :     }
   48300          61 :     arg3 = reinterpret_cast< char * >(buf3);
   48301             :   }
   48302          62 :   if (obj3) {
   48303          61 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   48304          61 :     if (!SWIG_IsOK(res4)) {
   48305           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   48306             :     }
   48307          61 :     arg4 = reinterpret_cast< char * >(buf4);
   48308             :   }
   48309          62 :   if (obj4) {
   48310          60 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   48311          60 :     if (!SWIG_IsOK(ecode5)) {
   48312           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   48313             :     } 
   48314          60 :     arg5 = static_cast< GDALResampleAlg >(val5);
   48315             :   }
   48316          62 :   if (obj5) {
   48317           3 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   48318           3 :     if (!SWIG_IsOK(ecode6)) {
   48319           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   48320             :     } 
   48321           3 :     arg6 = static_cast< double >(val6);
   48322             :   }
   48323          62 :   if (obj6) {
   48324           3 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   48325           3 :     if (!SWIG_IsOK(ecode7)) {
   48326           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   48327             :     } 
   48328           3 :     arg7 = static_cast< double >(val7);
   48329             :   }
   48330          62 :   if (obj7) {
   48331           3 :     {
   48332             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48333             :       /* callback_func typemap */
   48334             :       
   48335             :       /* In some cases 0 is passed instead of None. */
   48336             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48337           3 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   48338             :       {
   48339           0 :         if( PyLong_AsLong(obj7) == 0 )
   48340             :         {
   48341           0 :           obj7 = Py_None;
   48342             :         }
   48343             :       }
   48344             :       
   48345           3 :       if (obj7 && obj7 != Py_None ) {
   48346           3 :         void* cbfunction = NULL;
   48347           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   48348             :             (void**)&cbfunction,
   48349             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48350             :             SWIG_POINTER_EXCEPTION | 0 ));
   48351             :         
   48352           3 :         if ( cbfunction == GDALTermProgress ) {
   48353             :           arg8 = GDALTermProgress;
   48354             :         } else {
   48355           3 :           if (!PyCallable_Check(obj7)) {
   48356           0 :             PyErr_SetString( PyExc_RuntimeError,
   48357             :               "Object given is not a Python function" );
   48358           0 :             SWIG_fail;
   48359             :           }
   48360           3 :           psProgressInfo->psPyCallback = obj7;
   48361           3 :           arg8 = PyProgressProxy;
   48362             :         }
   48363             :         
   48364             :       }
   48365             :       
   48366             :     }
   48367             :   }
   48368          62 :   if (obj8) {
   48369           3 :     {
   48370             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48371           3 :       psProgressInfo->psPyCallbackData = obj8 ;
   48372             :     }
   48373             :   }
   48374          62 :   if (obj9) {
   48375           1 :     {
   48376             :       /* %typemap(in) char **dict */
   48377           1 :       arg10 = NULL;
   48378           1 :       if ( PySequence_Check( obj9 ) ) {
   48379           1 :         int bErr = FALSE;
   48380           1 :         arg10 = CSLFromPySequence(obj9, &bErr);
   48381           1 :         if ( bErr )
   48382             :         {
   48383           0 :           SWIG_fail;
   48384             :         }
   48385             :       }
   48386           0 :       else if ( PyMapping_Check( obj9 ) ) {
   48387           0 :         int bErr = FALSE;
   48388           0 :         arg10 = CSLFromPyMapping(obj9, &bErr);
   48389           0 :         if ( bErr )
   48390             :         {
   48391           0 :           SWIG_fail;
   48392             :         }
   48393             :       }
   48394             :       else {
   48395           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48396           0 :         SWIG_fail;
   48397             :       }
   48398             :     }
   48399             :   }
   48400          62 :   {
   48401          62 :     if (!arg1) {
   48402           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48403             :     }
   48404             :   }
   48405          62 :   {
   48406          62 :     if (!arg2) {
   48407           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48408             :     }
   48409             :   }
   48410          62 :   {
   48411          62 :     const int bLocalUseExceptions = GetUseExceptions();
   48412          62 :     if ( bLocalUseExceptions ) {
   48413          62 :       pushErrorHandler();
   48414             :     }
   48415          62 :     {
   48416          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48417          62 :       result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10);
   48418          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48419             :     }
   48420          62 :     if ( bLocalUseExceptions ) {
   48421          62 :       popErrorHandler();
   48422             :     }
   48423             : #ifndef SED_HACKS
   48424             :     if ( bLocalUseExceptions ) {
   48425             :       CPLErr eclass = CPLGetLastErrorType();
   48426             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48427             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48428             :       }
   48429             :     }
   48430             : #endif
   48431             :   }
   48432          62 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48433          62 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48434          62 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48435          62 :   {
   48436             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48437             :     
   48438          62 :     CPLFree(psProgressInfo);
   48439             :     
   48440             :   }
   48441          62 :   {
   48442             :     /* %typemap(freearg) char **dict */
   48443          62 :     CSLDestroy( arg10 );
   48444             :   }
   48445          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; } }
   48446             :   return resultobj;
   48447           0 : fail:
   48448           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48449           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48450           0 :   {
   48451             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48452             :     
   48453           0 :     CPLFree(psProgressInfo);
   48454             :     
   48455             :   }
   48456           0 :   {
   48457             :     /* %typemap(freearg) char **dict */
   48458           0 :     CSLDestroy( arg10 );
   48459             :   }
   48460             :   return NULL;
   48461             : }
   48462             : 
   48463             : 
   48464           6 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48465           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48466           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48467           6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48468           6 :   char **arg3 = (char **) NULL ;
   48469           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   48470           6 :   void *arg5 = (void *) NULL ;
   48471           6 :   void *argp1 = 0 ;
   48472           6 :   int res1 = 0 ;
   48473           6 :   void *argp2 = 0 ;
   48474           6 :   int res2 = 0 ;
   48475           6 :   PyObject * obj0 = 0 ;
   48476           6 :   PyObject * obj1 = 0 ;
   48477           6 :   PyObject * obj2 = 0 ;
   48478           6 :   PyObject * obj3 = 0 ;
   48479           6 :   PyObject * obj4 = 0 ;
   48480           6 :   char * kwnames[] = {
   48481             :     (char *)"srcBand",  (char *)"proximityBand",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48482             :   };
   48483           6 :   int result;
   48484             :   
   48485             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48486           6 :   PyProgressData *psProgressInfo;
   48487           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48488           6 :   psProgressInfo->nLastReported = -1;
   48489           6 :   psProgressInfo->psPyCallback = NULL;
   48490           6 :   psProgressInfo->psPyCallbackData = NULL;
   48491           6 :   arg5 = psProgressInfo;
   48492           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ComputeProximity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   48493           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48494           6 :   if (!SWIG_IsOK(res1)) {
   48495           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48496             :   }
   48497           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48498           6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48499           6 :   if (!SWIG_IsOK(res2)) {
   48500           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48501             :   }
   48502           6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48503           6 :   if (obj2) {
   48504           5 :     {
   48505             :       /* %typemap(in) char **dict */
   48506           5 :       arg3 = NULL;
   48507           5 :       if ( PySequence_Check( obj2 ) ) {
   48508           5 :         int bErr = FALSE;
   48509           5 :         arg3 = CSLFromPySequence(obj2, &bErr);
   48510           5 :         if ( bErr )
   48511             :         {
   48512           0 :           SWIG_fail;
   48513             :         }
   48514             :       }
   48515           0 :       else if ( PyMapping_Check( obj2 ) ) {
   48516           0 :         int bErr = FALSE;
   48517           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   48518           0 :         if ( bErr )
   48519             :         {
   48520           0 :           SWIG_fail;
   48521             :         }
   48522             :       }
   48523             :       else {
   48524           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48525           0 :         SWIG_fail;
   48526             :       }
   48527             :     }
   48528             :   }
   48529           6 :   if (obj3) {
   48530           3 :     {
   48531             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48532             :       /* callback_func typemap */
   48533             :       
   48534             :       /* In some cases 0 is passed instead of None. */
   48535             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48536           3 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   48537             :       {
   48538           0 :         if( PyLong_AsLong(obj3) == 0 )
   48539             :         {
   48540           0 :           obj3 = Py_None;
   48541             :         }
   48542             :       }
   48543             :       
   48544           3 :       if (obj3 && obj3 != Py_None ) {
   48545           1 :         void* cbfunction = NULL;
   48546           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   48547             :             (void**)&cbfunction,
   48548             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48549             :             SWIG_POINTER_EXCEPTION | 0 ));
   48550             :         
   48551           1 :         if ( cbfunction == GDALTermProgress ) {
   48552             :           arg4 = GDALTermProgress;
   48553             :         } else {
   48554           1 :           if (!PyCallable_Check(obj3)) {
   48555           0 :             PyErr_SetString( PyExc_RuntimeError,
   48556             :               "Object given is not a Python function" );
   48557           0 :             SWIG_fail;
   48558             :           }
   48559           1 :           psProgressInfo->psPyCallback = obj3;
   48560           1 :           arg4 = PyProgressProxy;
   48561             :         }
   48562             :         
   48563             :       }
   48564             :       
   48565             :     }
   48566             :   }
   48567           6 :   if (obj4) {
   48568           0 :     {
   48569             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48570           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   48571             :     }
   48572             :   }
   48573           6 :   {
   48574           6 :     if (!arg1) {
   48575           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48576             :     }
   48577             :   }
   48578           6 :   {
   48579           6 :     if (!arg2) {
   48580           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48581             :     }
   48582             :   }
   48583           6 :   {
   48584           6 :     const int bLocalUseExceptions = GetUseExceptions();
   48585           6 :     if ( bLocalUseExceptions ) {
   48586           6 :       pushErrorHandler();
   48587             :     }
   48588           6 :     {
   48589           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48590           6 :       result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   48591           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48592             :     }
   48593           6 :     if ( bLocalUseExceptions ) {
   48594           6 :       popErrorHandler();
   48595             :     }
   48596             : #ifndef SED_HACKS
   48597             :     if ( bLocalUseExceptions ) {
   48598             :       CPLErr eclass = CPLGetLastErrorType();
   48599             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48600             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48601             :       }
   48602             :     }
   48603             : #endif
   48604             :   }
   48605           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48606           6 :   {
   48607             :     /* %typemap(freearg) char **dict */
   48608           6 :     CSLDestroy( arg3 );
   48609             :   }
   48610           6 :   {
   48611             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48612             :     
   48613           6 :     CPLFree(psProgressInfo);
   48614             :     
   48615             :   }
   48616           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; } }
   48617             :   return resultobj;
   48618           0 : fail:
   48619           0 :   {
   48620             :     /* %typemap(freearg) char **dict */
   48621           0 :     CSLDestroy( arg3 );
   48622             :   }
   48623           0 :   {
   48624             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48625             :     
   48626           0 :     CPLFree(psProgressInfo);
   48627             :     
   48628             :   }
   48629             :   return NULL;
   48630             : }
   48631             : 
   48632             : 
   48633          42 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48634          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48635          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   48636          42 :   int arg2 ;
   48637          42 :   int *arg3 = (int *) 0 ;
   48638          42 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   48639          42 :   void *arg5 = (void *) NULL ;
   48640          42 :   void *arg6 = (void *) NULL ;
   48641          42 :   int arg7 = (int) 0 ;
   48642          42 :   double *arg8 = (double *) NULL ;
   48643          42 :   char **arg9 = (char **) NULL ;
   48644          42 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   48645          42 :   void *arg11 = (void *) NULL ;
   48646          42 :   void *argp1 = 0 ;
   48647          42 :   int res1 = 0 ;
   48648          42 :   void *argp4 = 0 ;
   48649          42 :   int res4 = 0 ;
   48650          42 :   int res5 ;
   48651          42 :   int res6 ;
   48652          42 :   PyObject * obj0 = 0 ;
   48653          42 :   PyObject * obj1 = 0 ;
   48654          42 :   PyObject * obj2 = 0 ;
   48655          42 :   PyObject * obj3 = 0 ;
   48656          42 :   PyObject * obj4 = 0 ;
   48657          42 :   PyObject * obj5 = 0 ;
   48658          42 :   PyObject * obj6 = 0 ;
   48659          42 :   PyObject * obj7 = 0 ;
   48660          42 :   PyObject * obj8 = 0 ;
   48661          42 :   char * kwnames[] = {
   48662             :     (char *)"dataset",  (char *)"bands",  (char *)"layer",  (char *)"pfnTransformer",  (char *)"pTransformArg",  (char *)"burn_values",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48663             :   };
   48664          42 :   int result;
   48665             :   
   48666             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48667          42 :   PyProgressData *psProgressInfo;
   48668          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48669          42 :   psProgressInfo->nLastReported = -1;
   48670          42 :   psProgressInfo->psPyCallback = NULL;
   48671          42 :   psProgressInfo->psPyCallbackData = NULL;
   48672          42 :   arg11 = psProgressInfo;
   48673          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOOOO:RasterizeLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
   48674          42 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48675          42 :   if (!SWIG_IsOK(res1)) {
   48676           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   48677             :   }
   48678          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   48679          42 :   {
   48680             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   48681          42 :     arg3 = CreateCIntListFromSequence(obj1, &arg2);
   48682          42 :     if( arg2 < 0 ) {
   48683           0 :       SWIG_fail;
   48684             :     }
   48685             :   }
   48686          42 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48687          42 :   if (!SWIG_IsOK(res4)) {
   48688           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   48689             :   }
   48690          42 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   48691          42 :   if (obj3) {
   48692           0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   48693           0 :     if (!SWIG_IsOK(res5)) {
   48694           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   48695             :     }
   48696             :   }
   48697          42 :   if (obj4) {
   48698           0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   48699           0 :     if (!SWIG_IsOK(res6)) {
   48700           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   48701             :     }
   48702             :   }
   48703          42 :   if (obj5) {
   48704          41 :     {
   48705             :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   48706          41 :       arg8 = CreateCDoubleListFromSequence(obj5, &arg7);
   48707          41 :       if( arg7 < 0 ) {
   48708           0 :         SWIG_fail;
   48709             :       }
   48710             :     }
   48711             :   }
   48712          42 :   if (obj6) {
   48713          41 :     {
   48714             :       /* %typemap(in) char **dict */
   48715          41 :       arg9 = NULL;
   48716          41 :       if ( PySequence_Check( obj6 ) ) {
   48717          41 :         int bErr = FALSE;
   48718          41 :         arg9 = CSLFromPySequence(obj6, &bErr);
   48719          41 :         if ( bErr )
   48720             :         {
   48721           0 :           SWIG_fail;
   48722             :         }
   48723             :       }
   48724           0 :       else if ( PyMapping_Check( obj6 ) ) {
   48725           0 :         int bErr = FALSE;
   48726           0 :         arg9 = CSLFromPyMapping(obj6, &bErr);
   48727           0 :         if ( bErr )
   48728             :         {
   48729           0 :           SWIG_fail;
   48730             :         }
   48731             :       }
   48732             :       else {
   48733           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48734           0 :         SWIG_fail;
   48735             :       }
   48736             :     }
   48737             :   }
   48738          42 :   if (obj7) {
   48739           0 :     {
   48740             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48741             :       /* callback_func typemap */
   48742             :       
   48743             :       /* In some cases 0 is passed instead of None. */
   48744             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48745           0 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   48746             :       {
   48747           0 :         if( PyLong_AsLong(obj7) == 0 )
   48748             :         {
   48749           0 :           obj7 = Py_None;
   48750             :         }
   48751             :       }
   48752             :       
   48753           0 :       if (obj7 && obj7 != Py_None ) {
   48754           0 :         void* cbfunction = NULL;
   48755           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   48756             :             (void**)&cbfunction,
   48757             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48758             :             SWIG_POINTER_EXCEPTION | 0 ));
   48759             :         
   48760           0 :         if ( cbfunction == GDALTermProgress ) {
   48761             :           arg10 = GDALTermProgress;
   48762             :         } else {
   48763           0 :           if (!PyCallable_Check(obj7)) {
   48764           0 :             PyErr_SetString( PyExc_RuntimeError,
   48765             :               "Object given is not a Python function" );
   48766           0 :             SWIG_fail;
   48767             :           }
   48768           0 :           psProgressInfo->psPyCallback = obj7;
   48769           0 :           arg10 = PyProgressProxy;
   48770             :         }
   48771             :         
   48772             :       }
   48773             :       
   48774             :     }
   48775             :   }
   48776          42 :   if (obj8) {
   48777           0 :     {
   48778             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48779           0 :       psProgressInfo->psPyCallbackData = obj8 ;
   48780             :     }
   48781             :   }
   48782          42 :   {
   48783          42 :     if (!arg1) {
   48784           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48785             :     }
   48786             :   }
   48787          42 :   {
   48788          42 :     if (!arg4) {
   48789           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48790             :     }
   48791             :   }
   48792          42 :   {
   48793          42 :     const int bLocalUseExceptions = GetUseExceptions();
   48794          42 :     if ( bLocalUseExceptions ) {
   48795          42 :       pushErrorHandler();
   48796             :     }
   48797          42 :     {
   48798          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48799          42 :       result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   48800          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48801             :     }
   48802          42 :     if ( bLocalUseExceptions ) {
   48803          42 :       popErrorHandler();
   48804             :     }
   48805             : #ifndef SED_HACKS
   48806             :     if ( bLocalUseExceptions ) {
   48807             :       CPLErr eclass = CPLGetLastErrorType();
   48808             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48809             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48810             :       }
   48811             :     }
   48812             : #endif
   48813             :   }
   48814          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48815          42 :   {
   48816             :     /* %typemap(freearg) (int nList, int* pList) */
   48817          42 :     free(arg3);
   48818             :   }
   48819          42 :   {
   48820             :     /* %typemap(freearg) (int nList, double* pList) */
   48821          42 :     free(arg8);
   48822             :   }
   48823          42 :   {
   48824             :     /* %typemap(freearg) char **dict */
   48825          42 :     CSLDestroy( arg9 );
   48826             :   }
   48827          42 :   {
   48828             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48829             :     
   48830          42 :     CPLFree(psProgressInfo);
   48831             :     
   48832             :   }
   48833          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; } }
   48834             :   return resultobj;
   48835           0 : fail:
   48836           0 :   {
   48837             :     /* %typemap(freearg) (int nList, int* pList) */
   48838           0 :     free(arg3);
   48839             :   }
   48840           0 :   {
   48841             :     /* %typemap(freearg) (int nList, double* pList) */
   48842           0 :     free(arg8);
   48843             :   }
   48844           0 :   {
   48845             :     /* %typemap(freearg) char **dict */
   48846           0 :     CSLDestroy( arg9 );
   48847             :   }
   48848           0 :   {
   48849             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48850             :     
   48851           0 :     CPLFree(psProgressInfo);
   48852             :     
   48853             :   }
   48854             :   return NULL;
   48855             : }
   48856             : 
   48857             : 
   48858          21 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48859          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48860          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48861          21 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48862          21 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   48863          21 :   int arg4 ;
   48864          21 :   char **arg5 = (char **) NULL ;
   48865          21 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   48866          21 :   void *arg7 = (void *) NULL ;
   48867          21 :   void *argp1 = 0 ;
   48868          21 :   int res1 = 0 ;
   48869          21 :   void *argp2 = 0 ;
   48870          21 :   int res2 = 0 ;
   48871          21 :   void *argp3 = 0 ;
   48872          21 :   int res3 = 0 ;
   48873          21 :   int val4 ;
   48874          21 :   int ecode4 = 0 ;
   48875          21 :   PyObject * obj0 = 0 ;
   48876          21 :   PyObject * obj1 = 0 ;
   48877          21 :   PyObject * obj2 = 0 ;
   48878          21 :   PyObject * obj3 = 0 ;
   48879          21 :   PyObject * obj4 = 0 ;
   48880          21 :   PyObject * obj5 = 0 ;
   48881          21 :   PyObject * obj6 = 0 ;
   48882          21 :   char * kwnames[] = {
   48883             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48884             :   };
   48885          21 :   int result;
   48886             :   
   48887             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48888          21 :   PyProgressData *psProgressInfo;
   48889          21 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48890          21 :   psProgressInfo->nLastReported = -1;
   48891          21 :   psProgressInfo->psPyCallback = NULL;
   48892          21 :   psProgressInfo->psPyCallbackData = NULL;
   48893          21 :   arg7 = psProgressInfo;
   48894          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Polygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   48895          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48896          21 :   if (!SWIG_IsOK(res1)) {
   48897           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48898             :   }
   48899          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48900          21 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48901          21 :   if (!SWIG_IsOK(res2)) {
   48902           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48903             :   }
   48904          21 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48905          21 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48906          21 :   if (!SWIG_IsOK(res3)) {
   48907           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   48908             :   }
   48909          21 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   48910          21 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   48911          21 :   if (!SWIG_IsOK(ecode4)) {
   48912           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   48913             :   } 
   48914          21 :   arg4 = static_cast< int >(val4);
   48915          21 :   if (obj4) {
   48916          14 :     {
   48917             :       /* %typemap(in) char **dict */
   48918          14 :       arg5 = NULL;
   48919          14 :       if ( PySequence_Check( obj4 ) ) {
   48920          14 :         int bErr = FALSE;
   48921          14 :         arg5 = CSLFromPySequence(obj4, &bErr);
   48922          14 :         if ( bErr )
   48923             :         {
   48924           0 :           SWIG_fail;
   48925             :         }
   48926             :       }
   48927           0 :       else if ( PyMapping_Check( obj4 ) ) {
   48928           0 :         int bErr = FALSE;
   48929           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   48930           0 :         if ( bErr )
   48931             :         {
   48932           0 :           SWIG_fail;
   48933             :         }
   48934             :       }
   48935             :       else {
   48936           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48937           0 :         SWIG_fail;
   48938             :       }
   48939             :     }
   48940             :   }
   48941          21 :   if (obj5) {
   48942          12 :     {
   48943             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48944             :       /* callback_func typemap */
   48945             :       
   48946             :       /* In some cases 0 is passed instead of None. */
   48947             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48948          12 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   48949             :       {
   48950           0 :         if( PyLong_AsLong(obj5) == 0 )
   48951             :         {
   48952           0 :           obj5 = Py_None;
   48953             :         }
   48954             :       }
   48955             :       
   48956          12 :       if (obj5 && obj5 != Py_None ) {
   48957           7 :         void* cbfunction = NULL;
   48958           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   48959             :             (void**)&cbfunction,
   48960             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48961             :             SWIG_POINTER_EXCEPTION | 0 ));
   48962             :         
   48963           7 :         if ( cbfunction == GDALTermProgress ) {
   48964             :           arg6 = GDALTermProgress;
   48965             :         } else {
   48966           7 :           if (!PyCallable_Check(obj5)) {
   48967           0 :             PyErr_SetString( PyExc_RuntimeError,
   48968             :               "Object given is not a Python function" );
   48969           0 :             SWIG_fail;
   48970             :           }
   48971           7 :           psProgressInfo->psPyCallback = obj5;
   48972           7 :           arg6 = PyProgressProxy;
   48973             :         }
   48974             :         
   48975             :       }
   48976             :       
   48977             :     }
   48978             :   }
   48979          21 :   if (obj6) {
   48980           0 :     {
   48981             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48982           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   48983             :     }
   48984             :   }
   48985          21 :   {
   48986          21 :     if (!arg1) {
   48987           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48988             :     }
   48989             :   }
   48990          21 :   {
   48991          21 :     if (!arg3) {
   48992           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48993             :     }
   48994             :   }
   48995          21 :   {
   48996          21 :     const int bLocalUseExceptions = GetUseExceptions();
   48997          21 :     if ( bLocalUseExceptions ) {
   48998          21 :       pushErrorHandler();
   48999             :     }
   49000          21 :     {
   49001          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49002          21 :       result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   49003          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49004             :     }
   49005          21 :     if ( bLocalUseExceptions ) {
   49006          21 :       popErrorHandler();
   49007             :     }
   49008             : #ifndef SED_HACKS
   49009             :     if ( bLocalUseExceptions ) {
   49010             :       CPLErr eclass = CPLGetLastErrorType();
   49011             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49012             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49013             :       }
   49014             :     }
   49015             : #endif
   49016             :   }
   49017          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49018          21 :   {
   49019             :     /* %typemap(freearg) char **dict */
   49020          21 :     CSLDestroy( arg5 );
   49021             :   }
   49022          21 :   {
   49023             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49024             :     
   49025          21 :     CPLFree(psProgressInfo);
   49026             :     
   49027             :   }
   49028          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; } }
   49029             :   return resultobj;
   49030           0 : fail:
   49031           0 :   {
   49032             :     /* %typemap(freearg) char **dict */
   49033           0 :     CSLDestroy( arg5 );
   49034             :   }
   49035           0 :   {
   49036             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49037             :     
   49038           0 :     CPLFree(psProgressInfo);
   49039             :     
   49040             :   }
   49041             :   return NULL;
   49042             : }
   49043             : 
   49044             : 
   49045           1 : SWIGINTERN PyObject *_wrap_FPolygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49046           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49047           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49048           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49049           1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   49050           1 :   int arg4 ;
   49051           1 :   char **arg5 = (char **) NULL ;
   49052           1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   49053           1 :   void *arg7 = (void *) NULL ;
   49054           1 :   void *argp1 = 0 ;
   49055           1 :   int res1 = 0 ;
   49056           1 :   void *argp2 = 0 ;
   49057           1 :   int res2 = 0 ;
   49058           1 :   void *argp3 = 0 ;
   49059           1 :   int res3 = 0 ;
   49060           1 :   int val4 ;
   49061           1 :   int ecode4 = 0 ;
   49062           1 :   PyObject * obj0 = 0 ;
   49063           1 :   PyObject * obj1 = 0 ;
   49064           1 :   PyObject * obj2 = 0 ;
   49065           1 :   PyObject * obj3 = 0 ;
   49066           1 :   PyObject * obj4 = 0 ;
   49067           1 :   PyObject * obj5 = 0 ;
   49068           1 :   PyObject * obj6 = 0 ;
   49069           1 :   char * kwnames[] = {
   49070             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49071             :   };
   49072           1 :   int result;
   49073             :   
   49074             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49075           1 :   PyProgressData *psProgressInfo;
   49076           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49077           1 :   psProgressInfo->nLastReported = -1;
   49078           1 :   psProgressInfo->psPyCallback = NULL;
   49079           1 :   psProgressInfo->psPyCallbackData = NULL;
   49080           1 :   arg7 = psProgressInfo;
   49081           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FPolygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   49082           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49083           1 :   if (!SWIG_IsOK(res1)) {
   49084           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FPolygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49085             :   }
   49086           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49087           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49088           1 :   if (!SWIG_IsOK(res2)) {
   49089           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FPolygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49090             :   }
   49091           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49092           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   49093           1 :   if (!SWIG_IsOK(res3)) {
   49094           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FPolygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   49095             :   }
   49096           1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   49097           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49098           1 :   if (!SWIG_IsOK(ecode4)) {
   49099           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FPolygonize" "', argument " "4"" of type '" "int""'");
   49100             :   } 
   49101           1 :   arg4 = static_cast< int >(val4);
   49102           1 :   if (obj4) {
   49103           0 :     {
   49104             :       /* %typemap(in) char **dict */
   49105           0 :       arg5 = NULL;
   49106           0 :       if ( PySequence_Check( obj4 ) ) {
   49107           0 :         int bErr = FALSE;
   49108           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   49109           0 :         if ( bErr )
   49110             :         {
   49111           0 :           SWIG_fail;
   49112             :         }
   49113             :       }
   49114           0 :       else if ( PyMapping_Check( obj4 ) ) {
   49115           0 :         int bErr = FALSE;
   49116           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   49117           0 :         if ( bErr )
   49118             :         {
   49119           0 :           SWIG_fail;
   49120             :         }
   49121             :       }
   49122             :       else {
   49123           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49124           0 :         SWIG_fail;
   49125             :       }
   49126             :     }
   49127             :   }
   49128           1 :   if (obj5) {
   49129           0 :     {
   49130             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49131             :       /* callback_func typemap */
   49132             :       
   49133             :       /* In some cases 0 is passed instead of None. */
   49134             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49135           0 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   49136             :       {
   49137           0 :         if( PyLong_AsLong(obj5) == 0 )
   49138             :         {
   49139           0 :           obj5 = Py_None;
   49140             :         }
   49141             :       }
   49142             :       
   49143           0 :       if (obj5 && obj5 != Py_None ) {
   49144           0 :         void* cbfunction = NULL;
   49145           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   49146             :             (void**)&cbfunction,
   49147             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49148             :             SWIG_POINTER_EXCEPTION | 0 ));
   49149             :         
   49150           0 :         if ( cbfunction == GDALTermProgress ) {
   49151             :           arg6 = GDALTermProgress;
   49152             :         } else {
   49153           0 :           if (!PyCallable_Check(obj5)) {
   49154           0 :             PyErr_SetString( PyExc_RuntimeError,
   49155             :               "Object given is not a Python function" );
   49156           0 :             SWIG_fail;
   49157             :           }
   49158           0 :           psProgressInfo->psPyCallback = obj5;
   49159           0 :           arg6 = PyProgressProxy;
   49160             :         }
   49161             :         
   49162             :       }
   49163             :       
   49164             :     }
   49165             :   }
   49166           1 :   if (obj6) {
   49167           0 :     {
   49168             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49169           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   49170             :     }
   49171             :   }
   49172           1 :   {
   49173           1 :     if (!arg1) {
   49174           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49175             :     }
   49176             :   }
   49177           1 :   {
   49178           1 :     if (!arg3) {
   49179           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49180             :     }
   49181             :   }
   49182           1 :   {
   49183           1 :     const int bLocalUseExceptions = GetUseExceptions();
   49184           1 :     if ( bLocalUseExceptions ) {
   49185           1 :       pushErrorHandler();
   49186             :     }
   49187           1 :     {
   49188           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49189           1 :       result = (int)FPolygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   49190           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49191             :     }
   49192           1 :     if ( bLocalUseExceptions ) {
   49193           1 :       popErrorHandler();
   49194             :     }
   49195             : #ifndef SED_HACKS
   49196             :     if ( bLocalUseExceptions ) {
   49197             :       CPLErr eclass = CPLGetLastErrorType();
   49198             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49199             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49200             :       }
   49201             :     }
   49202             : #endif
   49203             :   }
   49204           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49205           1 :   {
   49206             :     /* %typemap(freearg) char **dict */
   49207           1 :     CSLDestroy( arg5 );
   49208             :   }
   49209           1 :   {
   49210             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49211             :     
   49212           1 :     CPLFree(psProgressInfo);
   49213             :     
   49214             :   }
   49215           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; } }
   49216             :   return resultobj;
   49217           0 : fail:
   49218           0 :   {
   49219             :     /* %typemap(freearg) char **dict */
   49220           0 :     CSLDestroy( arg5 );
   49221             :   }
   49222           0 :   {
   49223             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49224             :     
   49225           0 :     CPLFree(psProgressInfo);
   49226             :     
   49227             :   }
   49228             :   return NULL;
   49229             : }
   49230             : 
   49231             : 
   49232          29 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49233          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49234          29 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49235          29 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49236          29 :   double arg3 ;
   49237          29 :   int arg4 ;
   49238          29 :   char **arg5 = (char **) NULL ;
   49239          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   49240          29 :   void *arg7 = (void *) NULL ;
   49241          29 :   void *argp1 = 0 ;
   49242          29 :   int res1 = 0 ;
   49243          29 :   void *argp2 = 0 ;
   49244          29 :   int res2 = 0 ;
   49245          29 :   double val3 ;
   49246          29 :   int ecode3 = 0 ;
   49247          29 :   int val4 ;
   49248          29 :   int ecode4 = 0 ;
   49249          29 :   PyObject * obj0 = 0 ;
   49250          29 :   PyObject * obj1 = 0 ;
   49251          29 :   PyObject * obj2 = 0 ;
   49252          29 :   PyObject * obj3 = 0 ;
   49253          29 :   PyObject * obj4 = 0 ;
   49254          29 :   PyObject * obj5 = 0 ;
   49255          29 :   PyObject * obj6 = 0 ;
   49256          29 :   char * kwnames[] = {
   49257             :     (char *)"targetBand",  (char *)"maskBand",  (char *)"maxSearchDist",  (char *)"smoothingIterations",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49258             :   };
   49259          29 :   int result;
   49260             :   
   49261             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49262          29 :   PyProgressData *psProgressInfo;
   49263          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49264          29 :   psProgressInfo->nLastReported = -1;
   49265          29 :   psProgressInfo->psPyCallback = NULL;
   49266          29 :   psProgressInfo->psPyCallbackData = NULL;
   49267          29 :   arg7 = psProgressInfo;
   49268          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FillNodata", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   49269          29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49270          29 :   if (!SWIG_IsOK(res1)) {
   49271           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49272             :   }
   49273          29 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49274          29 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49275          29 :   if (!SWIG_IsOK(res2)) {
   49276           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49277             :   }
   49278          29 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49279          29 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   49280          29 :   if (!SWIG_IsOK(ecode3)) {
   49281           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   49282             :   } 
   49283          29 :   arg3 = static_cast< double >(val3);
   49284          29 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49285          29 :   if (!SWIG_IsOK(ecode4)) {
   49286           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   49287             :   } 
   49288          29 :   arg4 = static_cast< int >(val4);
   49289          29 :   if (obj4) {
   49290          26 :     {
   49291             :       /* %typemap(in) char **dict */
   49292          26 :       arg5 = NULL;
   49293          26 :       if ( PySequence_Check( obj4 ) ) {
   49294          26 :         int bErr = FALSE;
   49295          26 :         arg5 = CSLFromPySequence(obj4, &bErr);
   49296          26 :         if ( bErr )
   49297             :         {
   49298           0 :           SWIG_fail;
   49299             :         }
   49300             :       }
   49301           0 :       else if ( PyMapping_Check( obj4 ) ) {
   49302           0 :         int bErr = FALSE;
   49303           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   49304           0 :         if ( bErr )
   49305             :         {
   49306           0 :           SWIG_fail;
   49307             :         }
   49308             :       }
   49309             :       else {
   49310           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49311           0 :         SWIG_fail;
   49312             :       }
   49313             :     }
   49314             :   }
   49315          29 :   if (obj5) {
   49316           4 :     {
   49317             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49318             :       /* callback_func typemap */
   49319             :       
   49320             :       /* In some cases 0 is passed instead of None. */
   49321             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49322           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   49323             :       {
   49324           0 :         if( PyLong_AsLong(obj5) == 0 )
   49325             :         {
   49326           0 :           obj5 = Py_None;
   49327             :         }
   49328             :       }
   49329             :       
   49330           4 :       if (obj5 && obj5 != Py_None ) {
   49331           4 :         void* cbfunction = NULL;
   49332           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   49333             :             (void**)&cbfunction,
   49334             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49335             :             SWIG_POINTER_EXCEPTION | 0 ));
   49336             :         
   49337           4 :         if ( cbfunction == GDALTermProgress ) {
   49338             :           arg6 = GDALTermProgress;
   49339             :         } else {
   49340           4 :           if (!PyCallable_Check(obj5)) {
   49341           0 :             PyErr_SetString( PyExc_RuntimeError,
   49342             :               "Object given is not a Python function" );
   49343           0 :             SWIG_fail;
   49344             :           }
   49345           4 :           psProgressInfo->psPyCallback = obj5;
   49346           4 :           arg6 = PyProgressProxy;
   49347             :         }
   49348             :         
   49349             :       }
   49350             :       
   49351             :     }
   49352             :   }
   49353          29 :   if (obj6) {
   49354           0 :     {
   49355             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49356           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   49357             :     }
   49358             :   }
   49359          29 :   {
   49360          29 :     if (!arg1) {
   49361           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49362             :     }
   49363             :   }
   49364          29 :   {
   49365          29 :     const int bLocalUseExceptions = GetUseExceptions();
   49366          29 :     if ( bLocalUseExceptions ) {
   49367          29 :       pushErrorHandler();
   49368             :     }
   49369          29 :     {
   49370          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49371          29 :       result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   49372          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49373             :     }
   49374          29 :     if ( bLocalUseExceptions ) {
   49375          29 :       popErrorHandler();
   49376             :     }
   49377             : #ifndef SED_HACKS
   49378             :     if ( bLocalUseExceptions ) {
   49379             :       CPLErr eclass = CPLGetLastErrorType();
   49380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49382             :       }
   49383             :     }
   49384             : #endif
   49385             :   }
   49386          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49387          29 :   {
   49388             :     /* %typemap(freearg) char **dict */
   49389          29 :     CSLDestroy( arg5 );
   49390             :   }
   49391          29 :   {
   49392             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49393             :     
   49394          29 :     CPLFree(psProgressInfo);
   49395             :     
   49396             :   }
   49397          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; } }
   49398             :   return resultobj;
   49399           0 : fail:
   49400           0 :   {
   49401             :     /* %typemap(freearg) char **dict */
   49402           0 :     CSLDestroy( arg5 );
   49403             :   }
   49404           0 :   {
   49405             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49406             :     
   49407           0 :     CPLFree(psProgressInfo);
   49408             :     
   49409             :   }
   49410             :   return NULL;
   49411             : }
   49412             : 
   49413             : 
   49414          12 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49415          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49416          12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49417          12 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49418          12 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   49419          12 :   int arg4 ;
   49420          12 :   int arg5 = (int) 4 ;
   49421          12 :   char **arg6 = (char **) NULL ;
   49422          12 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   49423          12 :   void *arg8 = (void *) NULL ;
   49424          12 :   void *argp1 = 0 ;
   49425          12 :   int res1 = 0 ;
   49426          12 :   void *argp2 = 0 ;
   49427          12 :   int res2 = 0 ;
   49428          12 :   void *argp3 = 0 ;
   49429          12 :   int res3 = 0 ;
   49430          12 :   int val4 ;
   49431          12 :   int ecode4 = 0 ;
   49432          12 :   int val5 ;
   49433          12 :   int ecode5 = 0 ;
   49434          12 :   PyObject * obj0 = 0 ;
   49435          12 :   PyObject * obj1 = 0 ;
   49436          12 :   PyObject * obj2 = 0 ;
   49437          12 :   PyObject * obj3 = 0 ;
   49438          12 :   PyObject * obj4 = 0 ;
   49439          12 :   PyObject * obj5 = 0 ;
   49440          12 :   PyObject * obj6 = 0 ;
   49441          12 :   PyObject * obj7 = 0 ;
   49442          12 :   char * kwnames[] = {
   49443             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"dstBand",  (char *)"threshold",  (char *)"connectedness",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49444             :   };
   49445          12 :   int result;
   49446             :   
   49447             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49448          12 :   PyProgressData *psProgressInfo;
   49449          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49450          12 :   psProgressInfo->nLastReported = -1;
   49451          12 :   psProgressInfo->psPyCallback = NULL;
   49452          12 :   psProgressInfo->psPyCallbackData = NULL;
   49453          12 :   arg8 = psProgressInfo;
   49454          12 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOOO:SieveFilter", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   49455          12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49456          12 :   if (!SWIG_IsOK(res1)) {
   49457           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49458             :   }
   49459          12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49460          12 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49461          12 :   if (!SWIG_IsOK(res2)) {
   49462           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49463             :   }
   49464          12 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49465          12 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49466          12 :   if (!SWIG_IsOK(res3)) {
   49467           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   49468             :   }
   49469          12 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   49470          12 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49471          12 :   if (!SWIG_IsOK(ecode4)) {
   49472           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   49473             :   } 
   49474          12 :   arg4 = static_cast< int >(val4);
   49475          12 :   if (obj4) {
   49476          12 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   49477          12 :     if (!SWIG_IsOK(ecode5)) {
   49478           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   49479             :     } 
   49480             :     arg5 = static_cast< int >(val5);
   49481             :   }
   49482          12 :   if (obj5) {
   49483           0 :     {
   49484             :       /* %typemap(in) char **dict */
   49485           0 :       arg6 = NULL;
   49486           0 :       if ( PySequence_Check( obj5 ) ) {
   49487           0 :         int bErr = FALSE;
   49488           0 :         arg6 = CSLFromPySequence(obj5, &bErr);
   49489           0 :         if ( bErr )
   49490             :         {
   49491           0 :           SWIG_fail;
   49492             :         }
   49493             :       }
   49494           0 :       else if ( PyMapping_Check( obj5 ) ) {
   49495           0 :         int bErr = FALSE;
   49496           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   49497           0 :         if ( bErr )
   49498             :         {
   49499           0 :           SWIG_fail;
   49500             :         }
   49501             :       }
   49502             :       else {
   49503           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49504           0 :         SWIG_fail;
   49505             :       }
   49506             :     }
   49507             :   }
   49508          12 :   if (obj6) {
   49509           2 :     {
   49510             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49511             :       /* callback_func typemap */
   49512             :       
   49513             :       /* In some cases 0 is passed instead of None. */
   49514             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49515           2 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   49516             :       {
   49517           0 :         if( PyLong_AsLong(obj6) == 0 )
   49518             :         {
   49519           0 :           obj6 = Py_None;
   49520             :         }
   49521             :       }
   49522             :       
   49523           2 :       if (obj6 && obj6 != Py_None ) {
   49524           2 :         void* cbfunction = NULL;
   49525           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   49526             :             (void**)&cbfunction,
   49527             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49528             :             SWIG_POINTER_EXCEPTION | 0 ));
   49529             :         
   49530           2 :         if ( cbfunction == GDALTermProgress ) {
   49531             :           arg7 = GDALTermProgress;
   49532             :         } else {
   49533           2 :           if (!PyCallable_Check(obj6)) {
   49534           0 :             PyErr_SetString( PyExc_RuntimeError,
   49535             :               "Object given is not a Python function" );
   49536           0 :             SWIG_fail;
   49537             :           }
   49538           2 :           psProgressInfo->psPyCallback = obj6;
   49539           2 :           arg7 = PyProgressProxy;
   49540             :         }
   49541             :         
   49542             :       }
   49543             :       
   49544             :     }
   49545             :   }
   49546          12 :   if (obj7) {
   49547           0 :     {
   49548             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49549           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   49550             :     }
   49551             :   }
   49552          12 :   {
   49553          12 :     if (!arg1) {
   49554           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49555             :     }
   49556             :   }
   49557          12 :   {
   49558          12 :     if (!arg3) {
   49559           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49560             :     }
   49561             :   }
   49562          12 :   {
   49563          12 :     const int bLocalUseExceptions = GetUseExceptions();
   49564          12 :     if ( bLocalUseExceptions ) {
   49565          12 :       pushErrorHandler();
   49566             :     }
   49567          12 :     {
   49568          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49569          12 :       result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   49570          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49571             :     }
   49572          12 :     if ( bLocalUseExceptions ) {
   49573          12 :       popErrorHandler();
   49574             :     }
   49575             : #ifndef SED_HACKS
   49576             :     if ( bLocalUseExceptions ) {
   49577             :       CPLErr eclass = CPLGetLastErrorType();
   49578             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49579             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49580             :       }
   49581             :     }
   49582             : #endif
   49583             :   }
   49584          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49585          12 :   {
   49586             :     /* %typemap(freearg) char **dict */
   49587          12 :     CSLDestroy( arg6 );
   49588             :   }
   49589          12 :   {
   49590             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49591             :     
   49592          12 :     CPLFree(psProgressInfo);
   49593             :     
   49594             :   }
   49595          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; } }
   49596             :   return resultobj;
   49597           0 : fail:
   49598           0 :   {
   49599             :     /* %typemap(freearg) char **dict */
   49600           0 :     CSLDestroy( arg6 );
   49601             :   }
   49602           0 :   {
   49603             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49604             :     
   49605           0 :     CPLFree(psProgressInfo);
   49606             :     
   49607             :   }
   49608             :   return NULL;
   49609             : }
   49610             : 
   49611             : 
   49612           2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49613           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49614           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49615           2 :   int arg2 ;
   49616           2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   49617           2 :   char *arg4 = (char *) "average" ;
   49618           2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   49619           2 :   void *arg6 = (void *) NULL ;
   49620           2 :   void *argp1 = 0 ;
   49621           2 :   int res1 = 0 ;
   49622           2 :   int res4 ;
   49623           2 :   char *buf4 = 0 ;
   49624           2 :   int alloc4 = 0 ;
   49625           2 :   PyObject * obj0 = 0 ;
   49626           2 :   PyObject * obj1 = 0 ;
   49627           2 :   PyObject * obj2 = 0 ;
   49628           2 :   PyObject * obj3 = 0 ;
   49629           2 :   PyObject * obj4 = 0 ;
   49630           2 :   char * kwnames[] = {
   49631             :     (char *)"srcBand",  (char *)"overviewBandCount",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   49632             :   };
   49633           2 :   int result;
   49634             :   
   49635             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49636           2 :   PyProgressData *psProgressInfo;
   49637           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49638           2 :   psProgressInfo->nLastReported = -1;
   49639           2 :   psProgressInfo->psPyCallback = NULL;
   49640           2 :   psProgressInfo->psPyCallbackData = NULL;
   49641           2 :   arg6 = psProgressInfo;
   49642           2 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   49643           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49644           2 :   if (!SWIG_IsOK(res1)) {
   49645           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49646             :   }
   49647           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49648           2 :   {
   49649             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   49650           2 :     if ( !PySequence_Check(obj1) ) {
   49651           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   49652           0 :       SWIG_fail;
   49653             :     }
   49654           2 :     Py_ssize_t size = PySequence_Size(obj1);
   49655           2 :     if( size > (Py_ssize_t)INT_MAX ) {
   49656           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49657           0 :       SWIG_fail;
   49658             :     }
   49659           2 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   49660           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49661           0 :       SWIG_fail;
   49662             :     }
   49663           2 :     arg2 = (int)size;
   49664           2 :     arg3 = (GDALRasterBandShadow**) VSIMalloc(arg2*sizeof(GDALRasterBandShadow*));
   49665           2 :     if( !arg3) {
   49666           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   49667           0 :       SWIG_fail;
   49668             :     }
   49669             :     
   49670           6 :     for( int i = 0; i<arg2; i++ ) {
   49671           4 :       PyObject *o = PySequence_GetItem(obj1,i);
   49672           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   49673           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   49674           4 :       if (!rawobjectpointer) {
   49675           0 :         Py_DECREF(o);
   49676           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   49677           0 :         SWIG_fail;
   49678             :       }
   49679           4 :       arg3[i] = rawobjectpointer;
   49680           4 :       Py_DECREF(o);
   49681             :       
   49682             :     }
   49683             :   }
   49684           2 :   if (obj2) {
   49685           2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   49686           2 :     if (!SWIG_IsOK(res4)) {
   49687           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   49688             :     }
   49689           2 :     arg4 = reinterpret_cast< char * >(buf4);
   49690             :   }
   49691           2 :   if (obj3) {
   49692           0 :     {
   49693             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49694             :       /* callback_func typemap */
   49695             :       
   49696             :       /* In some cases 0 is passed instead of None. */
   49697             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49698           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   49699             :       {
   49700           0 :         if( PyLong_AsLong(obj3) == 0 )
   49701             :         {
   49702           0 :           obj3 = Py_None;
   49703             :         }
   49704             :       }
   49705             :       
   49706           0 :       if (obj3 && obj3 != Py_None ) {
   49707           0 :         void* cbfunction = NULL;
   49708           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   49709             :             (void**)&cbfunction,
   49710             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49711             :             SWIG_POINTER_EXCEPTION | 0 ));
   49712             :         
   49713           0 :         if ( cbfunction == GDALTermProgress ) {
   49714             :           arg5 = GDALTermProgress;
   49715             :         } else {
   49716           0 :           if (!PyCallable_Check(obj3)) {
   49717           0 :             PyErr_SetString( PyExc_RuntimeError,
   49718             :               "Object given is not a Python function" );
   49719           0 :             SWIG_fail;
   49720             :           }
   49721           0 :           psProgressInfo->psPyCallback = obj3;
   49722           0 :           arg5 = PyProgressProxy;
   49723             :         }
   49724             :         
   49725             :       }
   49726             :       
   49727             :     }
   49728             :   }
   49729           2 :   if (obj4) {
   49730           0 :     {
   49731             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49732           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   49733             :     }
   49734             :   }
   49735           2 :   {
   49736           2 :     if (!arg1) {
   49737           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49738             :     }
   49739             :   }
   49740           2 :   {
   49741           2 :     const int bLocalUseExceptions = GetUseExceptions();
   49742           2 :     if ( bLocalUseExceptions ) {
   49743           0 :       pushErrorHandler();
   49744             :     }
   49745           2 :     {
   49746           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49747           2 :       result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   49748           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49749             :     }
   49750           2 :     if ( bLocalUseExceptions ) {
   49751           0 :       popErrorHandler();
   49752             :     }
   49753             : #ifndef SED_HACKS
   49754             :     if ( bLocalUseExceptions ) {
   49755             :       CPLErr eclass = CPLGetLastErrorType();
   49756             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49757             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49758             :       }
   49759             :     }
   49760             : #endif
   49761             :   }
   49762           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49763           2 :   {
   49764             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49765           2 :     CPLFree( arg3 );
   49766             :   }
   49767           2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   49768           2 :   {
   49769             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49770             :     
   49771           2 :     CPLFree(psProgressInfo);
   49772             :     
   49773             :   }
   49774           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; } }
   49775             :   return resultobj;
   49776           0 : fail:
   49777           0 :   {
   49778             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49779           0 :     CPLFree( arg3 );
   49780             :   }
   49781           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   49782           0 :   {
   49783             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49784             :     
   49785           0 :     CPLFree(psProgressInfo);
   49786             :     
   49787             :   }
   49788             :   return NULL;
   49789             : }
   49790             : 
   49791             : 
   49792         248 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49793         248 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49794         248 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49795         248 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49796         248 :   char *arg3 = (char *) "average" ;
   49797         248 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   49798         248 :   void *arg5 = (void *) NULL ;
   49799         248 :   void *argp1 = 0 ;
   49800         248 :   int res1 = 0 ;
   49801         248 :   void *argp2 = 0 ;
   49802         248 :   int res2 = 0 ;
   49803         248 :   int res3 ;
   49804         248 :   char *buf3 = 0 ;
   49805         248 :   int alloc3 = 0 ;
   49806         248 :   PyObject * obj0 = 0 ;
   49807         248 :   PyObject * obj1 = 0 ;
   49808         248 :   PyObject * obj2 = 0 ;
   49809         248 :   PyObject * obj3 = 0 ;
   49810         248 :   PyObject * obj4 = 0 ;
   49811         248 :   char * kwnames[] = {
   49812             :     (char *)"srcBand",  (char *)"overviewBand",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   49813             :   };
   49814         248 :   int result;
   49815             :   
   49816             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49817         248 :   PyProgressData *psProgressInfo;
   49818         248 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49819         248 :   psProgressInfo->nLastReported = -1;
   49820         248 :   psProgressInfo->psPyCallback = NULL;
   49821         248 :   psProgressInfo->psPyCallbackData = NULL;
   49822         248 :   arg5 = psProgressInfo;
   49823         248 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverview", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   49824         248 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49825         248 :   if (!SWIG_IsOK(res1)) {
   49826           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49827             :   }
   49828         248 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49829         248 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49830         248 :   if (!SWIG_IsOK(res2)) {
   49831           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49832             :   }
   49833         248 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49834         248 :   if (obj2) {
   49835         248 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   49836         248 :     if (!SWIG_IsOK(res3)) {
   49837           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   49838             :     }
   49839         248 :     arg3 = reinterpret_cast< char * >(buf3);
   49840             :   }
   49841         248 :   if (obj3) {
   49842           0 :     {
   49843             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49844             :       /* callback_func typemap */
   49845             :       
   49846             :       /* In some cases 0 is passed instead of None. */
   49847             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49848           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   49849             :       {
   49850           0 :         if( PyLong_AsLong(obj3) == 0 )
   49851             :         {
   49852           0 :           obj3 = Py_None;
   49853             :         }
   49854             :       }
   49855             :       
   49856           0 :       if (obj3 && obj3 != Py_None ) {
   49857           0 :         void* cbfunction = NULL;
   49858           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   49859             :             (void**)&cbfunction,
   49860             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49861             :             SWIG_POINTER_EXCEPTION | 0 ));
   49862             :         
   49863           0 :         if ( cbfunction == GDALTermProgress ) {
   49864             :           arg4 = GDALTermProgress;
   49865             :         } else {
   49866           0 :           if (!PyCallable_Check(obj3)) {
   49867           0 :             PyErr_SetString( PyExc_RuntimeError,
   49868             :               "Object given is not a Python function" );
   49869           0 :             SWIG_fail;
   49870             :           }
   49871           0 :           psProgressInfo->psPyCallback = obj3;
   49872           0 :           arg4 = PyProgressProxy;
   49873             :         }
   49874             :         
   49875             :       }
   49876             :       
   49877             :     }
   49878             :   }
   49879         248 :   if (obj4) {
   49880           0 :     {
   49881             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49882           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   49883             :     }
   49884             :   }
   49885         248 :   {
   49886         248 :     if (!arg1) {
   49887           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49888             :     }
   49889             :   }
   49890         248 :   {
   49891         248 :     if (!arg2) {
   49892           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49893             :     }
   49894             :   }
   49895         248 :   {
   49896         248 :     const int bLocalUseExceptions = GetUseExceptions();
   49897         248 :     if ( bLocalUseExceptions ) {
   49898         246 :       pushErrorHandler();
   49899             :     }
   49900         248 :     {
   49901         248 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49902         248 :       result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   49903         248 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49904             :     }
   49905         248 :     if ( bLocalUseExceptions ) {
   49906         246 :       popErrorHandler();
   49907             :     }
   49908             : #ifndef SED_HACKS
   49909             :     if ( bLocalUseExceptions ) {
   49910             :       CPLErr eclass = CPLGetLastErrorType();
   49911             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49912             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49913             :       }
   49914             :     }
   49915             : #endif
   49916             :   }
   49917         248 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49918         248 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49919         248 :   {
   49920             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49921             :     
   49922         248 :     CPLFree(psProgressInfo);
   49923             :     
   49924             :   }
   49925         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; } }
   49926             :   return resultobj;
   49927           0 : fail:
   49928           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49929           0 :   {
   49930             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49931             :     
   49932           0 :     CPLFree(psProgressInfo);
   49933             :     
   49934             :   }
   49935             :   return NULL;
   49936             : }
   49937             : 
   49938             : 
   49939           3 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49940           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49941           3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49942           3 :   double arg2 ;
   49943           3 :   double arg3 ;
   49944           3 :   int arg4 ;
   49945           3 :   double *arg5 = (double *) 0 ;
   49946           3 :   int arg6 ;
   49947           3 :   double arg7 ;
   49948           3 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   49949           3 :   int arg9 ;
   49950           3 :   int arg10 ;
   49951           3 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   49952           3 :   void *arg12 = (void *) NULL ;
   49953           3 :   void *argp1 = 0 ;
   49954           3 :   int res1 = 0 ;
   49955           3 :   double val2 ;
   49956           3 :   int ecode2 = 0 ;
   49957           3 :   double val3 ;
   49958           3 :   int ecode3 = 0 ;
   49959           3 :   int val6 ;
   49960           3 :   int ecode6 = 0 ;
   49961           3 :   double val7 ;
   49962           3 :   int ecode7 = 0 ;
   49963           3 :   void *argp8 = 0 ;
   49964           3 :   int res8 = 0 ;
   49965           3 :   int val9 ;
   49966           3 :   int ecode9 = 0 ;
   49967           3 :   int val10 ;
   49968           3 :   int ecode10 = 0 ;
   49969           3 :   PyObject * obj0 = 0 ;
   49970           3 :   PyObject * obj1 = 0 ;
   49971           3 :   PyObject * obj2 = 0 ;
   49972           3 :   PyObject * obj3 = 0 ;
   49973           3 :   PyObject * obj4 = 0 ;
   49974           3 :   PyObject * obj5 = 0 ;
   49975           3 :   PyObject * obj6 = 0 ;
   49976           3 :   PyObject * obj7 = 0 ;
   49977           3 :   PyObject * obj8 = 0 ;
   49978           3 :   PyObject * obj9 = 0 ;
   49979           3 :   PyObject * obj10 = 0 ;
   49980           3 :   char * kwnames[] = {
   49981             :     (char *)"srcBand",  (char *)"contourInterval",  (char *)"contourBase",  (char *)"fixedLevelCount",  (char *)"useNoData",  (char *)"noDataValue",  (char *)"dstLayer",  (char *)"idField",  (char *)"elevField",  (char *)"callback",  (char *)"callback_data",  NULL 
   49982             :   };
   49983           3 :   int result;
   49984             :   
   49985             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49986           3 :   PyProgressData *psProgressInfo;
   49987           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49988           3 :   psProgressInfo->nLastReported = -1;
   49989           3 :   psProgressInfo->psPyCallback = NULL;
   49990           3 :   psProgressInfo->psPyCallbackData = NULL;
   49991           3 :   arg12 = psProgressInfo;
   49992           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO|OO:ContourGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   49993           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49994           3 :   if (!SWIG_IsOK(res1)) {
   49995           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49996             :   }
   49997           3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49998           3 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   49999           3 :   if (!SWIG_IsOK(ecode2)) {
   50000           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   50001             :   } 
   50002           3 :   arg2 = static_cast< double >(val2);
   50003           3 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   50004           3 :   if (!SWIG_IsOK(ecode3)) {
   50005           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   50006             :   } 
   50007           3 :   arg3 = static_cast< double >(val3);
   50008           3 :   {
   50009             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   50010           3 :     arg5 = CreateCDoubleListFromSequence(obj3, &arg4);
   50011           3 :     if( arg4 < 0 ) {
   50012           0 :       SWIG_fail;
   50013             :     }
   50014             :   }
   50015           3 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   50016           3 :   if (!SWIG_IsOK(ecode6)) {
   50017           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   50018             :   } 
   50019           3 :   arg6 = static_cast< int >(val6);
   50020           3 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   50021           3 :   if (!SWIG_IsOK(ecode7)) {
   50022           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   50023             :   } 
   50024           3 :   arg7 = static_cast< double >(val7);
   50025           3 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   50026           3 :   if (!SWIG_IsOK(res8)) {
   50027           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   50028             :   }
   50029           3 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   50030           3 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   50031           3 :   if (!SWIG_IsOK(ecode9)) {
   50032           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   50033             :   } 
   50034           3 :   arg9 = static_cast< int >(val9);
   50035           3 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   50036           3 :   if (!SWIG_IsOK(ecode10)) {
   50037           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   50038             :   } 
   50039           3 :   arg10 = static_cast< int >(val10);
   50040           3 :   if (obj9) {
   50041           0 :     {
   50042             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50043             :       /* callback_func typemap */
   50044             :       
   50045             :       /* In some cases 0 is passed instead of None. */
   50046             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50047           0 :       if ( PyLong_Check(obj9) || PyInt_Check(obj9) )
   50048             :       {
   50049           0 :         if( PyLong_AsLong(obj9) == 0 )
   50050             :         {
   50051           0 :           obj9 = Py_None;
   50052             :         }
   50053             :       }
   50054             :       
   50055           0 :       if (obj9 && obj9 != Py_None ) {
   50056           0 :         void* cbfunction = NULL;
   50057           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj9,
   50058             :             (void**)&cbfunction,
   50059             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50060             :             SWIG_POINTER_EXCEPTION | 0 ));
   50061             :         
   50062           0 :         if ( cbfunction == GDALTermProgress ) {
   50063             :           arg11 = GDALTermProgress;
   50064             :         } else {
   50065           0 :           if (!PyCallable_Check(obj9)) {
   50066           0 :             PyErr_SetString( PyExc_RuntimeError,
   50067             :               "Object given is not a Python function" );
   50068           0 :             SWIG_fail;
   50069             :           }
   50070           0 :           psProgressInfo->psPyCallback = obj9;
   50071           0 :           arg11 = PyProgressProxy;
   50072             :         }
   50073             :         
   50074             :       }
   50075             :       
   50076             :     }
   50077             :   }
   50078           3 :   if (obj10) {
   50079           0 :     {
   50080             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50081           0 :       psProgressInfo->psPyCallbackData = obj10 ;
   50082             :     }
   50083             :   }
   50084           3 :   {
   50085           3 :     if (!arg1) {
   50086           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50087             :     }
   50088             :   }
   50089           3 :   {
   50090           3 :     if (!arg8) {
   50091           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50092             :     }
   50093             :   }
   50094           3 :   {
   50095           3 :     const int bLocalUseExceptions = GetUseExceptions();
   50096           3 :     if ( bLocalUseExceptions ) {
   50097           3 :       pushErrorHandler();
   50098             :     }
   50099           3 :     {
   50100           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50101           3 :       result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   50102           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50103             :     }
   50104           3 :     if ( bLocalUseExceptions ) {
   50105           3 :       popErrorHandler();
   50106             :     }
   50107             : #ifndef SED_HACKS
   50108             :     if ( bLocalUseExceptions ) {
   50109             :       CPLErr eclass = CPLGetLastErrorType();
   50110             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50111             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50112             :       }
   50113             :     }
   50114             : #endif
   50115             :   }
   50116           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50117           3 :   {
   50118             :     /* %typemap(freearg) (int nList, double* pList) */
   50119           3 :     free(arg5);
   50120             :   }
   50121           3 :   {
   50122             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50123             :     
   50124           3 :     CPLFree(psProgressInfo);
   50125             :     
   50126             :   }
   50127           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; } }
   50128             :   return resultobj;
   50129           0 : fail:
   50130           0 :   {
   50131             :     /* %typemap(freearg) (int nList, double* pList) */
   50132           0 :     free(arg5);
   50133             :   }
   50134           0 :   {
   50135             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50136             :     
   50137           0 :     CPLFree(psProgressInfo);
   50138             :     
   50139             :   }
   50140             :   return NULL;
   50141             : }
   50142             : 
   50143             : 
   50144          25 : SWIGINTERN PyObject *_wrap_ContourGenerateEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50145          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50146          25 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50147          25 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   50148          25 :   char **arg3 = (char **) NULL ;
   50149          25 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   50150          25 :   void *arg5 = (void *) NULL ;
   50151          25 :   void *argp1 = 0 ;
   50152          25 :   int res1 = 0 ;
   50153          25 :   void *argp2 = 0 ;
   50154          25 :   int res2 = 0 ;
   50155          25 :   PyObject * obj0 = 0 ;
   50156          25 :   PyObject * obj1 = 0 ;
   50157          25 :   PyObject * obj2 = 0 ;
   50158          25 :   PyObject * obj3 = 0 ;
   50159          25 :   PyObject * obj4 = 0 ;
   50160          25 :   char * kwnames[] = {
   50161             :     (char *)"srcBand",  (char *)"dstLayer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   50162             :   };
   50163          25 :   int result;
   50164             :   
   50165             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50166          25 :   PyProgressData *psProgressInfo;
   50167          25 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50168          25 :   psProgressInfo->nLastReported = -1;
   50169          25 :   psProgressInfo->psPyCallback = NULL;
   50170          25 :   psProgressInfo->psPyCallbackData = NULL;
   50171          25 :   arg5 = psProgressInfo;
   50172          25 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ContourGenerateEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   50173          25 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50174          25 :   if (!SWIG_IsOK(res1)) {
   50175           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerateEx" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50176             :   }
   50177          25 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50178          25 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   50179          25 :   if (!SWIG_IsOK(res2)) {
   50180           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContourGenerateEx" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   50181             :   }
   50182          25 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   50183          25 :   if (obj2) {
   50184          25 :     {
   50185             :       /* %typemap(in) char **dict */
   50186          25 :       arg3 = NULL;
   50187          25 :       if ( PySequence_Check( obj2 ) ) {
   50188          25 :         int bErr = FALSE;
   50189          25 :         arg3 = CSLFromPySequence(obj2, &bErr);
   50190          25 :         if ( bErr )
   50191             :         {
   50192           0 :           SWIG_fail;
   50193             :         }
   50194             :       }
   50195           0 :       else if ( PyMapping_Check( obj2 ) ) {
   50196           0 :         int bErr = FALSE;
   50197           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   50198           0 :         if ( bErr )
   50199             :         {
   50200           0 :           SWIG_fail;
   50201             :         }
   50202             :       }
   50203             :       else {
   50204           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50205           0 :         SWIG_fail;
   50206             :       }
   50207             :     }
   50208             :   }
   50209          25 :   if (obj3) {
   50210           0 :     {
   50211             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50212             :       /* callback_func typemap */
   50213             :       
   50214             :       /* In some cases 0 is passed instead of None. */
   50215             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50216           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   50217             :       {
   50218           0 :         if( PyLong_AsLong(obj3) == 0 )
   50219             :         {
   50220           0 :           obj3 = Py_None;
   50221             :         }
   50222             :       }
   50223             :       
   50224           0 :       if (obj3 && obj3 != Py_None ) {
   50225           0 :         void* cbfunction = NULL;
   50226           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   50227             :             (void**)&cbfunction,
   50228             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50229             :             SWIG_POINTER_EXCEPTION | 0 ));
   50230             :         
   50231           0 :         if ( cbfunction == GDALTermProgress ) {
   50232             :           arg4 = GDALTermProgress;
   50233             :         } else {
   50234           0 :           if (!PyCallable_Check(obj3)) {
   50235           0 :             PyErr_SetString( PyExc_RuntimeError,
   50236             :               "Object given is not a Python function" );
   50237           0 :             SWIG_fail;
   50238             :           }
   50239           0 :           psProgressInfo->psPyCallback = obj3;
   50240           0 :           arg4 = PyProgressProxy;
   50241             :         }
   50242             :         
   50243             :       }
   50244             :       
   50245             :     }
   50246             :   }
   50247          25 :   if (obj4) {
   50248           0 :     {
   50249             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50250           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   50251             :     }
   50252             :   }
   50253          25 :   {
   50254          25 :     if (!arg1) {
   50255           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50256             :     }
   50257             :   }
   50258          25 :   {
   50259          25 :     if (!arg2) {
   50260           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50261             :     }
   50262             :   }
   50263          25 :   {
   50264          25 :     const int bLocalUseExceptions = GetUseExceptions();
   50265          25 :     if ( bLocalUseExceptions ) {
   50266          25 :       pushErrorHandler();
   50267             :     }
   50268          25 :     {
   50269          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50270          25 :       result = (int)ContourGenerateEx(arg1,arg2,arg3,arg4,arg5);
   50271          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50272             :     }
   50273          25 :     if ( bLocalUseExceptions ) {
   50274          25 :       popErrorHandler();
   50275             :     }
   50276             : #ifndef SED_HACKS
   50277             :     if ( bLocalUseExceptions ) {
   50278             :       CPLErr eclass = CPLGetLastErrorType();
   50279             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50280             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50281             :       }
   50282             :     }
   50283             : #endif
   50284             :   }
   50285          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50286          25 :   {
   50287             :     /* %typemap(freearg) char **dict */
   50288          25 :     CSLDestroy( arg3 );
   50289             :   }
   50290          25 :   {
   50291             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50292             :     
   50293          25 :     CPLFree(psProgressInfo);
   50294             :     
   50295             :   }
   50296          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; } }
   50297             :   return resultobj;
   50298           0 : fail:
   50299           0 :   {
   50300             :     /* %typemap(freearg) char **dict */
   50301           0 :     CSLDestroy( arg3 );
   50302             :   }
   50303           0 :   {
   50304             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50305             :     
   50306           0 :     CPLFree(psProgressInfo);
   50307             :     
   50308             :   }
   50309             :   return NULL;
   50310             : }
   50311             : 
   50312             : 
   50313           0 : SWIGINTERN PyObject *_wrap_ViewshedGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50314           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50315           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50316           0 :   char *arg2 = (char *) 0 ;
   50317           0 :   char *arg3 = (char *) 0 ;
   50318           0 :   char **arg4 = (char **) 0 ;
   50319           0 :   double arg5 ;
   50320           0 :   double arg6 ;
   50321           0 :   double arg7 ;
   50322           0 :   double arg8 ;
   50323           0 :   double arg9 ;
   50324           0 :   double arg10 ;
   50325           0 :   double arg11 ;
   50326           0 :   double arg12 ;
   50327           0 :   double arg13 ;
   50328           0 :   GDALViewshedMode arg14 ;
   50329           0 :   double arg15 ;
   50330           0 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   50331           0 :   void *arg17 = (void *) NULL ;
   50332           0 :   GDALViewshedOutputType arg18 = (GDALViewshedOutputType) GVOT_NORMAL ;
   50333           0 :   char **arg19 = (char **) NULL ;
   50334           0 :   void *argp1 = 0 ;
   50335           0 :   int res1 = 0 ;
   50336           0 :   int res2 ;
   50337           0 :   char *buf2 = 0 ;
   50338           0 :   int alloc2 = 0 ;
   50339           0 :   int res3 ;
   50340           0 :   char *buf3 = 0 ;
   50341           0 :   int alloc3 = 0 ;
   50342           0 :   double val5 ;
   50343           0 :   int ecode5 = 0 ;
   50344           0 :   double val6 ;
   50345           0 :   int ecode6 = 0 ;
   50346           0 :   double val7 ;
   50347           0 :   int ecode7 = 0 ;
   50348           0 :   double val8 ;
   50349           0 :   int ecode8 = 0 ;
   50350           0 :   double val9 ;
   50351           0 :   int ecode9 = 0 ;
   50352           0 :   double val10 ;
   50353           0 :   int ecode10 = 0 ;
   50354           0 :   double val11 ;
   50355           0 :   int ecode11 = 0 ;
   50356           0 :   double val12 ;
   50357           0 :   int ecode12 = 0 ;
   50358           0 :   double val13 ;
   50359           0 :   int ecode13 = 0 ;
   50360           0 :   int val14 ;
   50361           0 :   int ecode14 = 0 ;
   50362           0 :   double val15 ;
   50363           0 :   int ecode15 = 0 ;
   50364           0 :   int val18 ;
   50365           0 :   int ecode18 = 0 ;
   50366           0 :   PyObject * obj0 = 0 ;
   50367           0 :   PyObject * obj1 = 0 ;
   50368           0 :   PyObject * obj2 = 0 ;
   50369           0 :   PyObject * obj3 = 0 ;
   50370           0 :   PyObject * obj4 = 0 ;
   50371           0 :   PyObject * obj5 = 0 ;
   50372           0 :   PyObject * obj6 = 0 ;
   50373           0 :   PyObject * obj7 = 0 ;
   50374           0 :   PyObject * obj8 = 0 ;
   50375           0 :   PyObject * obj9 = 0 ;
   50376           0 :   PyObject * obj10 = 0 ;
   50377           0 :   PyObject * obj11 = 0 ;
   50378           0 :   PyObject * obj12 = 0 ;
   50379           0 :   PyObject * obj13 = 0 ;
   50380           0 :   PyObject * obj14 = 0 ;
   50381           0 :   PyObject * obj15 = 0 ;
   50382           0 :   PyObject * obj16 = 0 ;
   50383           0 :   PyObject * obj17 = 0 ;
   50384           0 :   PyObject * obj18 = 0 ;
   50385           0 :   char * kwnames[] = {
   50386             :     (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 
   50387             :   };
   50388           0 :   GDALDatasetShadow *result = 0 ;
   50389             :   
   50390             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50391           0 :   PyProgressData *psProgressInfo;
   50392           0 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50393           0 :   psProgressInfo->nLastReported = -1;
   50394           0 :   psProgressInfo->psPyCallback = NULL;
   50395           0 :   psProgressInfo->psPyCallbackData = NULL;
   50396           0 :   arg17 = psProgressInfo;
   50397           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;
   50398           0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50399           0 :   if (!SWIG_IsOK(res1)) {
   50400           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewshedGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50401             :   }
   50402           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50403           0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   50404           0 :   if (!SWIG_IsOK(res2)) {
   50405           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewshedGenerate" "', argument " "2"" of type '" "char const *""'");
   50406             :   }
   50407           0 :   arg2 = reinterpret_cast< char * >(buf2);
   50408           0 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   50409           0 :   if (!SWIG_IsOK(res3)) {
   50410           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewshedGenerate" "', argument " "3"" of type '" "char const *""'");
   50411             :   }
   50412           0 :   arg3 = reinterpret_cast< char * >(buf3);
   50413           0 :   {
   50414             :     /* %typemap(in) char **dict */
   50415           0 :     arg4 = NULL;
   50416           0 :     if ( PySequence_Check( obj3 ) ) {
   50417           0 :       int bErr = FALSE;
   50418           0 :       arg4 = CSLFromPySequence(obj3, &bErr);
   50419           0 :       if ( bErr )
   50420             :       {
   50421           0 :         SWIG_fail;
   50422             :       }
   50423             :     }
   50424           0 :     else if ( PyMapping_Check( obj3 ) ) {
   50425           0 :       int bErr = FALSE;
   50426           0 :       arg4 = CSLFromPyMapping(obj3, &bErr);
   50427           0 :       if ( bErr )
   50428             :       {
   50429           0 :         SWIG_fail;
   50430             :       }
   50431             :     }
   50432             :     else {
   50433           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50434           0 :       SWIG_fail;
   50435             :     }
   50436             :   }
   50437           0 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   50438           0 :   if (!SWIG_IsOK(ecode5)) {
   50439           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ViewshedGenerate" "', argument " "5"" of type '" "double""'");
   50440             :   } 
   50441           0 :   arg5 = static_cast< double >(val5);
   50442           0 :   ecode6 = SWIG_AsVal_double(obj5, &val6);
   50443           0 :   if (!SWIG_IsOK(ecode6)) {
   50444           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ViewshedGenerate" "', argument " "6"" of type '" "double""'");
   50445             :   } 
   50446           0 :   arg6 = static_cast< double >(val6);
   50447           0 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   50448           0 :   if (!SWIG_IsOK(ecode7)) {
   50449           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ViewshedGenerate" "', argument " "7"" of type '" "double""'");
   50450             :   } 
   50451           0 :   arg7 = static_cast< double >(val7);
   50452           0 :   ecode8 = SWIG_AsVal_double(obj7, &val8);
   50453           0 :   if (!SWIG_IsOK(ecode8)) {
   50454           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ViewshedGenerate" "', argument " "8"" of type '" "double""'");
   50455             :   } 
   50456           0 :   arg8 = static_cast< double >(val8);
   50457           0 :   ecode9 = SWIG_AsVal_double(obj8, &val9);
   50458           0 :   if (!SWIG_IsOK(ecode9)) {
   50459           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ViewshedGenerate" "', argument " "9"" of type '" "double""'");
   50460             :   } 
   50461           0 :   arg9 = static_cast< double >(val9);
   50462           0 :   ecode10 = SWIG_AsVal_double(obj9, &val10);
   50463           0 :   if (!SWIG_IsOK(ecode10)) {
   50464           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ViewshedGenerate" "', argument " "10"" of type '" "double""'");
   50465             :   } 
   50466           0 :   arg10 = static_cast< double >(val10);
   50467           0 :   ecode11 = SWIG_AsVal_double(obj10, &val11);
   50468           0 :   if (!SWIG_IsOK(ecode11)) {
   50469           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "ViewshedGenerate" "', argument " "11"" of type '" "double""'");
   50470             :   } 
   50471           0 :   arg11 = static_cast< double >(val11);
   50472           0 :   ecode12 = SWIG_AsVal_double(obj11, &val12);
   50473           0 :   if (!SWIG_IsOK(ecode12)) {
   50474           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ViewshedGenerate" "', argument " "12"" of type '" "double""'");
   50475             :   } 
   50476           0 :   arg12 = static_cast< double >(val12);
   50477           0 :   ecode13 = SWIG_AsVal_double(obj12, &val13);
   50478           0 :   if (!SWIG_IsOK(ecode13)) {
   50479           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "ViewshedGenerate" "', argument " "13"" of type '" "double""'");
   50480             :   } 
   50481           0 :   arg13 = static_cast< double >(val13);
   50482           0 :   ecode14 = SWIG_AsVal_int(obj13, &val14);
   50483           0 :   if (!SWIG_IsOK(ecode14)) {
   50484           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "ViewshedGenerate" "', argument " "14"" of type '" "GDALViewshedMode""'");
   50485             :   } 
   50486           0 :   arg14 = static_cast< GDALViewshedMode >(val14);
   50487           0 :   ecode15 = SWIG_AsVal_double(obj14, &val15);
   50488           0 :   if (!SWIG_IsOK(ecode15)) {
   50489           0 :     SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "ViewshedGenerate" "', argument " "15"" of type '" "double""'");
   50490             :   } 
   50491           0 :   arg15 = static_cast< double >(val15);
   50492           0 :   if (obj15) {
   50493           0 :     {
   50494             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50495             :       /* callback_func typemap */
   50496             :       
   50497             :       /* In some cases 0 is passed instead of None. */
   50498             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50499           0 :       if ( PyLong_Check(obj15) || PyInt_Check(obj15) )
   50500             :       {
   50501           0 :         if( PyLong_AsLong(obj15) == 0 )
   50502             :         {
   50503           0 :           obj15 = Py_None;
   50504             :         }
   50505             :       }
   50506             :       
   50507           0 :       if (obj15 && obj15 != Py_None ) {
   50508           0 :         void* cbfunction = NULL;
   50509           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj15,
   50510             :             (void**)&cbfunction,
   50511             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50512             :             SWIG_POINTER_EXCEPTION | 0 ));
   50513             :         
   50514           0 :         if ( cbfunction == GDALTermProgress ) {
   50515             :           arg16 = GDALTermProgress;
   50516             :         } else {
   50517           0 :           if (!PyCallable_Check(obj15)) {
   50518           0 :             PyErr_SetString( PyExc_RuntimeError,
   50519             :               "Object given is not a Python function" );
   50520           0 :             SWIG_fail;
   50521             :           }
   50522           0 :           psProgressInfo->psPyCallback = obj15;
   50523           0 :           arg16 = PyProgressProxy;
   50524             :         }
   50525             :         
   50526             :       }
   50527             :       
   50528             :     }
   50529             :   }
   50530           0 :   if (obj16) {
   50531           0 :     {
   50532             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50533           0 :       psProgressInfo->psPyCallbackData = obj16 ;
   50534             :     }
   50535             :   }
   50536           0 :   if (obj17) {
   50537           0 :     ecode18 = SWIG_AsVal_int(obj17, &val18);
   50538           0 :     if (!SWIG_IsOK(ecode18)) {
   50539           0 :       SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "ViewshedGenerate" "', argument " "18"" of type '" "GDALViewshedOutputType""'");
   50540             :     } 
   50541           0 :     arg18 = static_cast< GDALViewshedOutputType >(val18);
   50542             :   }
   50543           0 :   if (obj18) {
   50544           0 :     {
   50545             :       /* %typemap(in) char **dict */
   50546           0 :       arg19 = NULL;
   50547           0 :       if ( PySequence_Check( obj18 ) ) {
   50548           0 :         int bErr = FALSE;
   50549           0 :         arg19 = CSLFromPySequence(obj18, &bErr);
   50550           0 :         if ( bErr )
   50551             :         {
   50552           0 :           SWIG_fail;
   50553             :         }
   50554             :       }
   50555           0 :       else if ( PyMapping_Check( obj18 ) ) {
   50556           0 :         int bErr = FALSE;
   50557           0 :         arg19 = CSLFromPyMapping(obj18, &bErr);
   50558           0 :         if ( bErr )
   50559             :         {
   50560           0 :           SWIG_fail;
   50561             :         }
   50562             :       }
   50563             :       else {
   50564           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50565           0 :         SWIG_fail;
   50566             :       }
   50567             :     }
   50568             :   }
   50569           0 :   {
   50570           0 :     if (!arg1) {
   50571           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50572             :     }
   50573             :   }
   50574           0 :   {
   50575           0 :     const int bLocalUseExceptions = GetUseExceptions();
   50576           0 :     if ( bLocalUseExceptions ) {
   50577           0 :       pushErrorHandler();
   50578             :     }
   50579           0 :     {
   50580           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50581           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);
   50582           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50583             :     }
   50584           0 :     if ( bLocalUseExceptions ) {
   50585           0 :       popErrorHandler();
   50586             :     }
   50587             : #ifndef SED_HACKS
   50588             :     if ( bLocalUseExceptions ) {
   50589             :       CPLErr eclass = CPLGetLastErrorType();
   50590             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50591             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50592             :       }
   50593             :     }
   50594             : #endif
   50595             :   }
   50596           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50597           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50598           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50599           0 :   {
   50600             :     /* %typemap(freearg) char **dict */
   50601           0 :     CSLDestroy( arg4 );
   50602             :   }
   50603           0 :   {
   50604             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50605             :     
   50606           0 :     CPLFree(psProgressInfo);
   50607             :     
   50608             :   }
   50609           0 :   {
   50610             :     /* %typemap(freearg) char **dict */
   50611           0 :     CSLDestroy( arg19 );
   50612             :   }
   50613           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; } }
   50614             :   return resultobj;
   50615           0 : fail:
   50616           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50617           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50618           0 :   {
   50619             :     /* %typemap(freearg) char **dict */
   50620           0 :     CSLDestroy( arg4 );
   50621             :   }
   50622           0 :   {
   50623             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50624             :     
   50625           0 :     CPLFree(psProgressInfo);
   50626             :     
   50627             :   }
   50628           0 :   {
   50629             :     /* %typemap(freearg) char **dict */
   50630           0 :     CSLDestroy( arg19 );
   50631             :   }
   50632             :   return NULL;
   50633             : }
   50634             : 
   50635             : 
   50636           6 : SWIGINTERN PyObject *_wrap_IsLineOfSightVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50637           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50638           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50639           6 :   int arg2 ;
   50640           6 :   int arg3 ;
   50641           6 :   double arg4 ;
   50642           6 :   int arg5 ;
   50643           6 :   int arg6 ;
   50644           6 :   double arg7 ;
   50645           6 :   bool *arg8 = (bool *) 0 ;
   50646           6 :   int *arg9 = (int *) 0 ;
   50647           6 :   int *arg10 = (int *) 0 ;
   50648           6 :   char **arg11 = (char **) NULL ;
   50649           6 :   void *argp1 = 0 ;
   50650           6 :   int res1 = 0 ;
   50651           6 :   int val2 ;
   50652           6 :   int ecode2 = 0 ;
   50653           6 :   int val3 ;
   50654           6 :   int ecode3 = 0 ;
   50655           6 :   double val4 ;
   50656           6 :   int ecode4 = 0 ;
   50657           6 :   int val5 ;
   50658           6 :   int ecode5 = 0 ;
   50659           6 :   int val6 ;
   50660           6 :   int ecode6 = 0 ;
   50661           6 :   double val7 ;
   50662           6 :   int ecode7 = 0 ;
   50663           6 :   bool visible8 = 0 ;
   50664           6 :   int nxintersection8 = 0 ;
   50665           6 :   int nyintersection8 = 0 ;
   50666           6 :   PyObject * obj0 = 0 ;
   50667           6 :   PyObject * obj1 = 0 ;
   50668           6 :   PyObject * obj2 = 0 ;
   50669           6 :   PyObject * obj3 = 0 ;
   50670           6 :   PyObject * obj4 = 0 ;
   50671           6 :   PyObject * obj5 = 0 ;
   50672           6 :   PyObject * obj6 = 0 ;
   50673           6 :   PyObject * obj7 = 0 ;
   50674           6 :   char * kwnames[] = {
   50675             :     (char *)"band",  (char *)"xA",  (char *)"yA",  (char *)"zA",  (char *)"xB",  (char *)"yB",  (char *)"zB",  (char *)"options",  NULL 
   50676             :   };
   50677             :   
   50678           6 :   {
   50679             :     /* %typemap(in) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection) */
   50680           6 :     arg8 = &visible8;
   50681           6 :     arg9 = &nxintersection8;
   50682           6 :     arg10 = &nyintersection8;
   50683             :   }
   50684           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO|O:IsLineOfSightVisible", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   50685           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50686           6 :   if (!SWIG_IsOK(res1)) {
   50687           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsLineOfSightVisible" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50688             :   }
   50689           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50690           6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   50691           6 :   if (!SWIG_IsOK(ecode2)) {
   50692           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IsLineOfSightVisible" "', argument " "2"" of type '" "int""'");
   50693             :   } 
   50694           6 :   arg2 = static_cast< int >(val2);
   50695           6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   50696           6 :   if (!SWIG_IsOK(ecode3)) {
   50697           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IsLineOfSightVisible" "', argument " "3"" of type '" "int""'");
   50698             :   } 
   50699           6 :   arg3 = static_cast< int >(val3);
   50700           6 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   50701           6 :   if (!SWIG_IsOK(ecode4)) {
   50702           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IsLineOfSightVisible" "', argument " "4"" of type '" "double""'");
   50703             :   } 
   50704           6 :   arg4 = static_cast< double >(val4);
   50705           6 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   50706           6 :   if (!SWIG_IsOK(ecode5)) {
   50707           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IsLineOfSightVisible" "', argument " "5"" of type '" "int""'");
   50708             :   } 
   50709           6 :   arg5 = static_cast< int >(val5);
   50710           6 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   50711           6 :   if (!SWIG_IsOK(ecode6)) {
   50712           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IsLineOfSightVisible" "', argument " "6"" of type '" "int""'");
   50713             :   } 
   50714           6 :   arg6 = static_cast< int >(val6);
   50715           6 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   50716           6 :   if (!SWIG_IsOK(ecode7)) {
   50717           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IsLineOfSightVisible" "', argument " "7"" of type '" "double""'");
   50718             :   } 
   50719           6 :   arg7 = static_cast< double >(val7);
   50720           6 :   if (obj7) {
   50721           0 :     {
   50722             :       /* %typemap(in) char **dict */
   50723           0 :       arg11 = NULL;
   50724           0 :       if ( PySequence_Check( obj7 ) ) {
   50725           0 :         int bErr = FALSE;
   50726           0 :         arg11 = CSLFromPySequence(obj7, &bErr);
   50727           0 :         if ( bErr )
   50728             :         {
   50729           0 :           SWIG_fail;
   50730             :         }
   50731             :       }
   50732           0 :       else if ( PyMapping_Check( obj7 ) ) {
   50733           0 :         int bErr = FALSE;
   50734           0 :         arg11 = CSLFromPyMapping(obj7, &bErr);
   50735           0 :         if ( bErr )
   50736             :         {
   50737           0 :           SWIG_fail;
   50738             :         }
   50739             :       }
   50740             :       else {
   50741           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50742           0 :         SWIG_fail;
   50743             :       }
   50744             :     }
   50745             :   }
   50746           6 :   {
   50747           6 :     if (!arg1) {
   50748           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50749             :     }
   50750             :   }
   50751           5 :   {
   50752           5 :     const int bLocalUseExceptions = GetUseExceptions();
   50753           5 :     if ( bLocalUseExceptions ) {
   50754           5 :       pushErrorHandler();
   50755             :     }
   50756           5 :     {
   50757           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50758           5 :       IsLineOfSightVisible(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   50759           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50760             :     }
   50761           5 :     if ( bLocalUseExceptions ) {
   50762           5 :       popErrorHandler();
   50763             :     }
   50764             : #ifndef SED_HACKS
   50765             :     if ( bLocalUseExceptions ) {
   50766             :       CPLErr eclass = CPLGetLastErrorType();
   50767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50769             :       }
   50770             :     }
   50771             : #endif
   50772             :   }
   50773           5 :   resultobj = SWIG_Py_Void();
   50774           5 :   {
   50775             :     /* %typemap(argout) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection)  */
   50776           5 :     PyObject *r = PyTuple_New( 3 );
   50777           5 :     PyTuple_SetItem( r, 0, PyBool_FromLong(*arg8) );
   50778           5 :     PyTuple_SetItem( r, 1, PyLong_FromLong(*arg9) );
   50779           5 :     PyTuple_SetItem( r, 2, PyLong_FromLong(*arg10) );
   50780             : #if SWIG_VERSION >= 0x040300
   50781             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   50782             : #else
   50783           5 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   50784             : #endif
   50785             :   }
   50786           5 :   {
   50787             :     /* %typemap(freearg) char **dict */
   50788           5 :     CSLDestroy( arg11 );
   50789             :   }
   50790           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; } }
   50791             :   return resultobj;
   50792           1 : fail:
   50793           1 :   {
   50794             :     /* %typemap(freearg) char **dict */
   50795           1 :     CSLDestroy( arg11 );
   50796             :   }
   50797             :   return NULL;
   50798             : }
   50799             : 
   50800             : 
   50801          24 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50802          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50803          24 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50804          24 :   char *arg2 = (char *) 0 ;
   50805          24 :   char *arg3 = (char *) 0 ;
   50806          24 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   50807          24 :   double arg5 = (double) 0.0 ;
   50808          24 :   void *argp1 = 0 ;
   50809          24 :   int res1 = 0 ;
   50810          24 :   int res2 ;
   50811          24 :   char *buf2 = 0 ;
   50812          24 :   int alloc2 = 0 ;
   50813          24 :   int res3 ;
   50814          24 :   char *buf3 = 0 ;
   50815          24 :   int alloc3 = 0 ;
   50816          24 :   int val4 ;
   50817          24 :   int ecode4 = 0 ;
   50818          24 :   double val5 ;
   50819          24 :   int ecode5 = 0 ;
   50820          24 :   PyObject *swig_obj[5] ;
   50821          24 :   GDALDatasetShadow *result = 0 ;
   50822             :   
   50823          24 :   if (!SWIG_Python_UnpackTuple(args, "AutoCreateWarpedVRT", 1, 5, swig_obj)) SWIG_fail;
   50824          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50825          24 :   if (!SWIG_IsOK(res1)) {
   50826           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50827             :   }
   50828          24 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50829          24 :   if (swig_obj[1]) {
   50830           9 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   50831           9 :     if (!SWIG_IsOK(res2)) {
   50832           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   50833             :     }
   50834           9 :     arg2 = reinterpret_cast< char * >(buf2);
   50835             :   }
   50836          24 :   if (swig_obj[2]) {
   50837           9 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   50838           9 :     if (!SWIG_IsOK(res3)) {
   50839           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   50840             :     }
   50841           9 :     arg3 = reinterpret_cast< char * >(buf3);
   50842             :   }
   50843          24 :   if (swig_obj[3]) {
   50844           3 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   50845           3 :     if (!SWIG_IsOK(ecode4)) {
   50846           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   50847             :     } 
   50848           3 :     arg4 = static_cast< GDALResampleAlg >(val4);
   50849             :   }
   50850          24 :   if (swig_obj[4]) {
   50851           3 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   50852           3 :     if (!SWIG_IsOK(ecode5)) {
   50853           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   50854             :     } 
   50855           3 :     arg5 = static_cast< double >(val5);
   50856             :   }
   50857          24 :   {
   50858          24 :     if (!arg1) {
   50859           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50860             :     }
   50861             :   }
   50862          24 :   {
   50863          24 :     const int bLocalUseExceptions = GetUseExceptions();
   50864          24 :     if ( bLocalUseExceptions ) {
   50865          24 :       pushErrorHandler();
   50866             :     }
   50867          24 :     {
   50868          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50869          24 :       result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   50870          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50871             :     }
   50872          24 :     if ( bLocalUseExceptions ) {
   50873          24 :       popErrorHandler();
   50874             :     }
   50875             : #ifndef SED_HACKS
   50876             :     if ( bLocalUseExceptions ) {
   50877             :       CPLErr eclass = CPLGetLastErrorType();
   50878             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50879             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50880             :       }
   50881             :     }
   50882             : #endif
   50883             :   }
   50884          24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50885          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50886          24 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50887          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; } }
   50888             :   return resultobj;
   50889           0 : fail:
   50890           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50891           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50892             :   return NULL;
   50893             : }
   50894             : 
   50895             : 
   50896           8 : SWIGINTERN PyObject *_wrap_CreatePansharpenedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50897           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50898           8 :   char *arg1 = (char *) 0 ;
   50899           8 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   50900           8 :   int arg3 ;
   50901           8 :   GDALRasterBandShadow **arg4 = (GDALRasterBandShadow **) 0 ;
   50902           8 :   int res1 ;
   50903           8 :   char *buf1 = 0 ;
   50904           8 :   int alloc1 = 0 ;
   50905           8 :   void *argp2 = 0 ;
   50906           8 :   int res2 = 0 ;
   50907           8 :   PyObject *swig_obj[3] ;
   50908           8 :   GDALDatasetShadow *result = 0 ;
   50909             :   
   50910           8 :   if (!SWIG_Python_UnpackTuple(args, "CreatePansharpenedVRT", 3, 3, swig_obj)) SWIG_fail;
   50911           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   50912           8 :   if (!SWIG_IsOK(res1)) {
   50913           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreatePansharpenedVRT" "', argument " "1"" of type '" "char const *""'");
   50914             :   }
   50915           8 :   arg1 = reinterpret_cast< char * >(buf1);
   50916           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50917           8 :   if (!SWIG_IsOK(res2)) {
   50918           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreatePansharpenedVRT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   50919             :   }
   50920           8 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   50921           8 :   {
   50922             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   50923           8 :     if ( !PySequence_Check(swig_obj[2]) ) {
   50924           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   50925           0 :       SWIG_fail;
   50926             :     }
   50927           8 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   50928           8 :     if( size > (Py_ssize_t)INT_MAX ) {
   50929           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50930           0 :       SWIG_fail;
   50931             :     }
   50932           8 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   50933           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50934           0 :       SWIG_fail;
   50935             :     }
   50936           8 :     arg3 = (int)size;
   50937           8 :     arg4 = (GDALRasterBandShadow**) VSIMalloc(arg3*sizeof(GDALRasterBandShadow*));
   50938           8 :     if( !arg4) {
   50939           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   50940           0 :       SWIG_fail;
   50941             :     }
   50942             :     
   50943          30 :     for( int i = 0; i<arg3; i++ ) {
   50944          22 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   50945          22 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   50946          22 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   50947          22 :       if (!rawobjectpointer) {
   50948           0 :         Py_DECREF(o);
   50949           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   50950           0 :         SWIG_fail;
   50951             :       }
   50952          22 :       arg4[i] = rawobjectpointer;
   50953          22 :       Py_DECREF(o);
   50954             :       
   50955             :     }
   50956             :   }
   50957           8 :   {
   50958           8 :     if (!arg2) {
   50959           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50960             :     }
   50961             :   }
   50962           8 :   {
   50963           8 :     const int bLocalUseExceptions = GetUseExceptions();
   50964           8 :     if ( bLocalUseExceptions ) {
   50965           2 :       pushErrorHandler();
   50966             :     }
   50967           8 :     {
   50968           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50969           8 :       result = (GDALDatasetShadow *)CreatePansharpenedVRT((char const *)arg1,arg2,arg3,arg4);
   50970           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50971             :     }
   50972           8 :     if ( bLocalUseExceptions ) {
   50973           2 :       popErrorHandler();
   50974             :     }
   50975             : #ifndef SED_HACKS
   50976             :     if ( bLocalUseExceptions ) {
   50977             :       CPLErr eclass = CPLGetLastErrorType();
   50978             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50979             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50980             :       }
   50981             :     }
   50982             : #endif
   50983             :   }
   50984           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50985           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   50986           8 :   {
   50987             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   50988           8 :     CPLFree( arg4 );
   50989             :   }
   50990           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; } }
   50991             :   return resultobj;
   50992           0 : fail:
   50993           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   50994           0 :   {
   50995             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   50996           0 :     CPLFree( arg4 );
   50997             :   }
   50998             :   return NULL;
   50999             : }
   51000             : 
   51001             : 
   51002           1 : SWIGINTERN PyObject *_wrap_GetTranformerOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51003           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51004           1 :   char *result = 0 ;
   51005             :   
   51006           1 :   if (!SWIG_Python_UnpackTuple(args, "GetTranformerOptionList", 0, 0, 0)) SWIG_fail;
   51007           1 :   {
   51008           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51009           1 :     if ( bLocalUseExceptions ) {
   51010           1 :       pushErrorHandler();
   51011             :     }
   51012           1 :     {
   51013           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51014           1 :       result = (char *)GDALGetGenImgProjTranformerOptionList();
   51015           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51016             :     }
   51017           1 :     if ( bLocalUseExceptions ) {
   51018           1 :       popErrorHandler();
   51019             :     }
   51020             : #ifndef SED_HACKS
   51021             :     if ( bLocalUseExceptions ) {
   51022             :       CPLErr eclass = CPLGetLastErrorType();
   51023             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51024             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51025             :       }
   51026             :     }
   51027             : #endif
   51028             :   }
   51029           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51030           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; } }
   51031             :   return resultobj;
   51032           0 : fail:
   51033           0 :   return NULL;
   51034             : }
   51035             : 
   51036             : 
   51037          71 : SWIGINTERN PyObject *_wrap_delete_GDALTransformerInfoShadow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51038          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51039          71 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51040          71 :   void *argp1 = 0 ;
   51041          71 :   int res1 = 0 ;
   51042          71 :   PyObject *swig_obj[1] ;
   51043             :   
   51044          71 :   if (!args) SWIG_fail;
   51045          71 :   swig_obj[0] = args;
   51046          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   51047          71 :   if (!SWIG_IsOK(res1)) {
   51048           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTransformerInfoShadow" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51049             :   }
   51050          71 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51051          71 :   {
   51052          71 :     const int bLocalUseExceptions = GetUseExceptions();
   51053          71 :     if ( bLocalUseExceptions ) {
   51054          69 :       pushErrorHandler();
   51055             :     }
   51056          71 :     {
   51057          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51058          71 :       delete_GDALTransformerInfoShadow(arg1);
   51059          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51060             :     }
   51061          71 :     if ( bLocalUseExceptions ) {
   51062          69 :       popErrorHandler();
   51063             :     }
   51064             : #ifndef SED_HACKS
   51065             :     if ( bLocalUseExceptions ) {
   51066             :       CPLErr eclass = CPLGetLastErrorType();
   51067             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51068             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51069             :       }
   51070             :     }
   51071             : #endif
   51072             :   }
   51073          71 :   resultobj = SWIG_Py_Void();
   51074          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; } }
   51075             :   return resultobj;
   51076             : fail:
   51077             :   return NULL;
   51078             : }
   51079             : 
   51080             : 
   51081             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   51082             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51083             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51084             :   int arg2 ;
   51085             :   double *arg3 ;
   51086             :   void *argp1 = 0 ;
   51087             :   int res1 = 0 ;
   51088             :   int val2 ;
   51089             :   int ecode2 = 0 ;
   51090             :   double argin3[3] ;
   51091             :   int result;
   51092             :   
   51093             :   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
   51094             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51095             :   if (!SWIG_IsOK(res1)) {
   51096             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51097             :   }
   51098             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51099             :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   51100             :   if (!SWIG_IsOK(ecode2)) {
   51101             :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "2"" of type '" "int""'");
   51102             :   } 
   51103             :   arg2 = static_cast< int >(val2);
   51104             :   {
   51105             :     /* %typemap(in) (double argin3[ANY]) */
   51106             :     arg3 = argin3;
   51107             :     if (! PySequence_Check(swig_obj[2]) ) {
   51108             :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   51109             :       SWIG_fail;
   51110             :     }
   51111             :     Py_ssize_t seq_size = PySequence_Size(swig_obj[2]);
   51112             :     if ( seq_size != 3 ) {
   51113             :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   51114             :       SWIG_fail;
   51115             :     }
   51116             :     for (unsigned int i=0; i<3; i++) {
   51117             :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   51118             :       double val;
   51119             :       if ( !PyArg_Parse(o, "d", &val ) ) {
   51120             :         PyErr_SetString(PyExc_TypeError, "not a number");
   51121             :         Py_DECREF(o);
   51122             :         SWIG_fail;
   51123             :       }
   51124             :       arg3[i] =  val;
   51125             :       Py_DECREF(o);
   51126             :     }
   51127             :   }
   51128             :   {
   51129             :     const int bLocalUseExceptions = GetUseExceptions();
   51130             :     if ( bLocalUseExceptions ) {
   51131             :       pushErrorHandler();
   51132             :     }
   51133             :     {
   51134             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51135             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   51136             :       SWIG_PYTHON_THREAD_END_ALLOW;
   51137             :     }
   51138             :     if ( bLocalUseExceptions ) {
   51139             :       popErrorHandler();
   51140             :     }
   51141             : #ifndef SED_HACKS
   51142             :     if ( bLocalUseExceptions ) {
   51143             :       CPLErr eclass = CPLGetLastErrorType();
   51144             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51145             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51146             :       }
   51147             :     }
   51148             : #endif
   51149             :   }
   51150             :   resultobj = SWIG_From_int(static_cast< int >(result));
   51151             :   {
   51152             :     /* %typemap(argout) (double argout[ANY]) */
   51153             :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   51154             : #if SWIG_VERSION >= 0x040300
   51155             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   51156             : #else
   51157             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   51158             : #endif
   51159             :   }
   51160             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51161             :   return resultobj;
   51162             : fail:
   51163             :   return NULL;
   51164             : }
   51165             : 
   51166             : 
   51167             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   51168             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51169             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51170             :   double *arg2 ;
   51171             :   int arg3 ;
   51172             :   double arg4 ;
   51173             :   double arg5 ;
   51174             :   double arg6 = (double) 0.0 ;
   51175             :   void *argp1 = 0 ;
   51176             :   int res1 = 0 ;
   51177             :   double argout2[3] ;
   51178             :   int val3 ;
   51179             :   int ecode3 = 0 ;
   51180             :   double val4 ;
   51181             :   int ecode4 = 0 ;
   51182             :   double val5 ;
   51183             :   int ecode5 = 0 ;
   51184             :   double val6 ;
   51185             :   int ecode6 = 0 ;
   51186             :   int result;
   51187             :   
   51188             :   {
   51189             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   51190             :     memset(argout2, 0, sizeof(argout2));
   51191             :     arg2 = argout2;
   51192             :   }
   51193             :   if ((nobjs < 4) || (nobjs > 5)) SWIG_fail;
   51194             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51195             :   if (!SWIG_IsOK(res1)) {
   51196             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51197             :   }
   51198             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51199             :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   51200             :   if (!SWIG_IsOK(ecode3)) {
   51201             :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "3"" of type '" "int""'");
   51202             :   } 
   51203             :   arg3 = static_cast< int >(val3);
   51204             :   ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
   51205             :   if (!SWIG_IsOK(ecode4)) {
   51206             :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "4"" of type '" "double""'");
   51207             :   } 
   51208             :   arg4 = static_cast< double >(val4);
   51209             :   ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
   51210             :   if (!SWIG_IsOK(ecode5)) {
   51211             :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "5"" of type '" "double""'");
   51212             :   } 
   51213             :   arg5 = static_cast< double >(val5);
   51214             :   if (swig_obj[4]) {
   51215             :     ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
   51216             :     if (!SWIG_IsOK(ecode6)) {
   51217             :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "6"" of type '" "double""'");
   51218             :     } 
   51219             :     arg6 = static_cast< double >(val6);
   51220             :   }
   51221             :   {
   51222             :     const int bLocalUseExceptions = GetUseExceptions();
   51223             :     if ( bLocalUseExceptions ) {
   51224             :       pushErrorHandler();
   51225             :     }
   51226             :     {
   51227             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51228             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   51229             :       SWIG_PYTHON_THREAD_END_ALLOW;
   51230             :     }
   51231             :     if ( bLocalUseExceptions ) {
   51232             :       popErrorHandler();
   51233             :     }
   51234             : #ifndef SED_HACKS
   51235             :     if ( bLocalUseExceptions ) {
   51236             :       CPLErr eclass = CPLGetLastErrorType();
   51237             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51238             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51239             :       }
   51240             :     }
   51241             : #endif
   51242             :   }
   51243             :   resultobj = SWIG_From_int(static_cast< int >(result));
   51244             :   {
   51245             :     /* %typemap(argout) (double argout[ANY]) */
   51246             :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   51247             : #if SWIG_VERSION >= 0x040300
   51248             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   51249             : #else
   51250             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   51251             : #endif
   51252             :   }
   51253             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51254             :   return resultobj;
   51255             : fail:
   51256             :   return NULL;
   51257             : }
   51258             : 
   51259             : 
   51260        8677 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint(PyObject *self, PyObject *args) {
   51261        8677 :   Py_ssize_t argc;
   51262        8677 :   PyObject *argv[6] = {
   51263             :     0
   51264             :   };
   51265             :   
   51266        8677 :   if (!(argc = SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoint", 0, 5, argv))) SWIG_fail;
   51267        8677 :   --argc;
   51268        8677 :   if (argc == 3) {
   51269           0 :     int _v;
   51270           0 :     void *vptr = 0;
   51271           0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   51272           0 :     _v = SWIG_CheckState(res);
   51273           0 :     if (_v) {
   51274           0 :       {
   51275           0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   51276           0 :         _v = SWIG_CheckState(res);
   51277             :       }
   51278           0 :       if (_v) {
   51279           0 :         void *vptr = 0;
   51280           0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   51281           0 :         _v = SWIG_CheckState(res);
   51282           0 :         if (_v) {
   51283           0 :           return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(self, argc, argv);
   51284             :         }
   51285             :       }
   51286             :     }
   51287             :   }
   51288        8677 :   if ((argc >= 4) && (argc <= 5)) {
   51289        8677 :     int _v;
   51290        8677 :     void *vptr = 0;
   51291        8677 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   51292        8677 :     _v = SWIG_CheckState(res);
   51293        8677 :     if (_v) {
   51294        8677 :       {
   51295        8677 :         int res = SWIG_AsVal_int(argv[1], NULL);
   51296        8677 :         _v = SWIG_CheckState(res);
   51297             :       }
   51298        8677 :       if (_v) {
   51299        8677 :         {
   51300        8677 :           int res = SWIG_AsVal_double(argv[2], NULL);
   51301        8677 :           _v = SWIG_CheckState(res);
   51302             :         }
   51303        8677 :         if (_v) {
   51304        8677 :           {
   51305        8677 :             int res = SWIG_AsVal_double(argv[3], NULL);
   51306        8677 :             _v = SWIG_CheckState(res);
   51307             :           }
   51308        8677 :           if (_v) {
   51309        8677 :             if (argc <= 4) {
   51310        8677 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   51311             :             }
   51312          40 :             {
   51313          40 :               int res = SWIG_AsVal_double(argv[4], NULL);
   51314          40 :               _v = SWIG_CheckState(res);
   51315             :             }
   51316          40 :             if (_v) {
   51317          40 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   51318             :             }
   51319             :           }
   51320             :         }
   51321             :       }
   51322             :     }
   51323             :   }
   51324             :   
   51325           0 : fail:
   51326           0 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GDALTransformerInfoShadow_TransformPoint'.\n"
   51327             :     "  Possible C/C++ prototypes are:\n"
   51328             :     "    GDALTransformerInfoShadow::TransformPoint(int,double [3])\n"
   51329             :     "    GDALTransformerInfoShadow::TransformPoint(double [3],int,double,double,double)\n");
   51330             :   return 0;
   51331             : }
   51332             : 
   51333             : 
   51334           4 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51335           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51336           4 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51337           4 :   int arg2 ;
   51338           4 :   int arg3 ;
   51339           4 :   double *arg4 = (double *) 0 ;
   51340           4 :   double *arg5 = (double *) 0 ;
   51341           4 :   double *arg6 = (double *) 0 ;
   51342           4 :   int *arg7 = (int *) 0 ;
   51343           4 :   void *argp1 = 0 ;
   51344           4 :   int res1 = 0 ;
   51345           4 :   int val2 ;
   51346           4 :   int ecode2 = 0 ;
   51347           4 :   PyObject *swig_obj[3] ;
   51348           4 :   int result;
   51349             :   
   51350           4 :   if (!SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoints", 3, 3, swig_obj)) SWIG_fail;
   51351           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51352           4 :   if (!SWIG_IsOK(res1)) {
   51353           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51354             :   }
   51355           4 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51356           4 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   51357           4 :   if (!SWIG_IsOK(ecode2)) {
   51358           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "2"" of type '" "int""'");
   51359             :   } 
   51360           4 :   arg2 = static_cast< int >(val2);
   51361           4 :   {
   51362             :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51363           4 :     if ( !PySequence_Check(swig_obj[2]) ) {
   51364           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   51365           0 :       SWIG_fail;
   51366             :     }
   51367             :     
   51368           4 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   51369           4 :     if( size != (int)size ) {
   51370           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   51371           0 :       SWIG_fail;
   51372             :     }
   51373           4 :     arg3 = (int)size;
   51374           4 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   51375           4 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   51376           4 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   51377           4 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   51378             :     
   51379           4 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   51380             :     {
   51381           0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   51382           0 :       SWIG_fail;
   51383             :     }
   51384             :     
   51385           4 :     if (!DecomposeSequenceOfCoordinates(swig_obj[2],arg3,arg4,arg5,arg6)) {
   51386           0 :       SWIG_fail;
   51387             :     }
   51388             :   }
   51389           4 :   {
   51390           4 :     const int bLocalUseExceptions = GetUseExceptions();
   51391           4 :     if ( bLocalUseExceptions ) {
   51392           4 :       pushErrorHandler();
   51393             :     }
   51394           4 :     {
   51395           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51396           4 :       result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   51397           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51398             :     }
   51399           4 :     if ( bLocalUseExceptions ) {
   51400           4 :       popErrorHandler();
   51401             :     }
   51402             : #ifndef SED_HACKS
   51403             :     if ( bLocalUseExceptions ) {
   51404             :       CPLErr eclass = CPLGetLastErrorType();
   51405             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51406             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51407             :       }
   51408             :     }
   51409             : #endif
   51410             :   }
   51411           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51412           4 :   {
   51413             :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51414           4 :     Py_DECREF(resultobj);
   51415           4 :     PyObject *xyz = PyList_New( arg3 );
   51416           4 :     if( !xyz ) {
   51417           0 :       SWIG_fail;
   51418             :     }
   51419           4 :     PyObject *success = PyList_New( arg3 );
   51420           4 :     if( !success ) {
   51421           0 :       Py_DECREF(xyz);
   51422           0 :       SWIG_fail;
   51423             :     }
   51424          35 :     for( int i=0; i< arg3; i++ ) {
   51425          31 :       PyObject *tuple = PyTuple_New( 3 );
   51426          31 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   51427          31 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   51428          31 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   51429          31 :       PyList_SetItem( xyz, i, tuple );
   51430          31 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   51431             :     }
   51432           4 :     resultobj = PyTuple_New( 2 );
   51433           4 :     PyTuple_SetItem( resultobj, 0, xyz );
   51434           4 :     PyTuple_SetItem( resultobj, 1, success );
   51435             :   }
   51436           4 :   {
   51437             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51438           4 :     VSIFree(arg4);
   51439           4 :     VSIFree(arg5);
   51440           4 :     VSIFree(arg6);
   51441           4 :     VSIFree(arg7);
   51442             :   }
   51443           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; } }
   51444             :   return resultobj;
   51445           0 : fail:
   51446           0 :   {
   51447             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51448           0 :     VSIFree(arg4);
   51449           0 :     VSIFree(arg5);
   51450           0 :     VSIFree(arg6);
   51451           0 :     VSIFree(arg7);
   51452             :   }
   51453             :   return NULL;
   51454             : }
   51455             : 
   51456             : 
   51457           1 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformGeolocations(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   51458           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51459           1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51460           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   51461           1 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   51462           1 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   51463           1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   51464           1 :   void *arg6 = (void *) NULL ;
   51465           1 :   char **arg7 = (char **) NULL ;
   51466           1 :   void *argp1 = 0 ;
   51467           1 :   int res1 = 0 ;
   51468           1 :   void *argp2 = 0 ;
   51469           1 :   int res2 = 0 ;
   51470           1 :   void *argp3 = 0 ;
   51471           1 :   int res3 = 0 ;
   51472           1 :   void *argp4 = 0 ;
   51473           1 :   int res4 = 0 ;
   51474           1 :   PyObject * obj0 = 0 ;
   51475           1 :   PyObject * obj1 = 0 ;
   51476           1 :   PyObject * obj2 = 0 ;
   51477           1 :   PyObject * obj3 = 0 ;
   51478           1 :   PyObject * obj4 = 0 ;
   51479           1 :   PyObject * obj5 = 0 ;
   51480           1 :   PyObject * obj6 = 0 ;
   51481           1 :   char * kwnames[] = {
   51482             :     (char *)"self",  (char *)"xBand",  (char *)"yBand",  (char *)"zBand",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   51483             :   };
   51484           1 :   int result;
   51485             :   
   51486             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   51487           1 :   PyProgressData *psProgressInfo;
   51488           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51489           1 :   psProgressInfo->nLastReported = -1;
   51490           1 :   psProgressInfo->psPyCallback = NULL;
   51491           1 :   psProgressInfo->psPyCallbackData = NULL;
   51492           1 :   arg6 = psProgressInfo;
   51493           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:GDALTransformerInfoShadow_TransformGeolocations", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   51494           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51495           1 :   if (!SWIG_IsOK(res1)) {
   51496           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51497             :   }
   51498           1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51499           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51500           1 :   if (!SWIG_IsOK(res2)) {
   51501           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   51502             :   }
   51503           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   51504           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51505           1 :   if (!SWIG_IsOK(res3)) {
   51506           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   51507             :   }
   51508           1 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   51509           1 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51510           1 :   if (!SWIG_IsOK(res4)) {
   51511           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   51512             :   }
   51513           1 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   51514           1 :   if (obj4) {
   51515           0 :     {
   51516             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51517             :       /* callback_func typemap */
   51518             :       
   51519             :       /* In some cases 0 is passed instead of None. */
   51520             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51521           0 :       if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
   51522             :       {
   51523           0 :         if( PyLong_AsLong(obj4) == 0 )
   51524             :         {
   51525           0 :           obj4 = Py_None;
   51526             :         }
   51527             :       }
   51528             :       
   51529           0 :       if (obj4 && obj4 != Py_None ) {
   51530           0 :         void* cbfunction = NULL;
   51531           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
   51532             :             (void**)&cbfunction,
   51533             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51534             :             SWIG_POINTER_EXCEPTION | 0 ));
   51535             :         
   51536           0 :         if ( cbfunction == GDALTermProgress ) {
   51537             :           arg5 = GDALTermProgress;
   51538             :         } else {
   51539           0 :           if (!PyCallable_Check(obj4)) {
   51540           0 :             PyErr_SetString( PyExc_RuntimeError,
   51541             :               "Object given is not a Python function" );
   51542           0 :             SWIG_fail;
   51543             :           }
   51544           0 :           psProgressInfo->psPyCallback = obj4;
   51545           0 :           arg5 = PyProgressProxy;
   51546             :         }
   51547             :         
   51548             :       }
   51549             :       
   51550             :     }
   51551             :   }
   51552           1 :   if (obj5) {
   51553           0 :     {
   51554             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51555           0 :       psProgressInfo->psPyCallbackData = obj5 ;
   51556             :     }
   51557             :   }
   51558           1 :   if (obj6) {
   51559           0 :     {
   51560             :       /* %typemap(in) char **dict */
   51561           0 :       arg7 = NULL;
   51562           0 :       if ( PySequence_Check( obj6 ) ) {
   51563           0 :         int bErr = FALSE;
   51564           0 :         arg7 = CSLFromPySequence(obj6, &bErr);
   51565           0 :         if ( bErr )
   51566             :         {
   51567           0 :           SWIG_fail;
   51568             :         }
   51569             :       }
   51570           0 :       else if ( PyMapping_Check( obj6 ) ) {
   51571           0 :         int bErr = FALSE;
   51572           0 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   51573           0 :         if ( bErr )
   51574             :         {
   51575           0 :           SWIG_fail;
   51576             :         }
   51577             :       }
   51578             :       else {
   51579           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51580           0 :         SWIG_fail;
   51581             :       }
   51582             :     }
   51583             :   }
   51584           1 :   {
   51585           1 :     if (!arg2) {
   51586           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51587             :     }
   51588             :   }
   51589           1 :   {
   51590           1 :     if (!arg3) {
   51591           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51592             :     }
   51593             :   }
   51594           1 :   {
   51595           1 :     if (!arg4) {
   51596           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51597             :     }
   51598             :   }
   51599           1 :   {
   51600           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51601           1 :     if ( bLocalUseExceptions ) {
   51602           1 :       pushErrorHandler();
   51603             :     }
   51604           1 :     {
   51605           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51606           1 :       result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   51607           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51608             :     }
   51609           1 :     if ( bLocalUseExceptions ) {
   51610           1 :       popErrorHandler();
   51611             :     }
   51612             : #ifndef SED_HACKS
   51613             :     if ( bLocalUseExceptions ) {
   51614             :       CPLErr eclass = CPLGetLastErrorType();
   51615             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51616             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51617             :       }
   51618             :     }
   51619             : #endif
   51620             :   }
   51621           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51622           1 :   {
   51623             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51624             :     
   51625           1 :     CPLFree(psProgressInfo);
   51626             :     
   51627             :   }
   51628           1 :   {
   51629             :     /* %typemap(freearg) char **dict */
   51630           1 :     CSLDestroy( arg7 );
   51631             :   }
   51632           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; } }
   51633             :   return resultobj;
   51634           0 : fail:
   51635           0 :   {
   51636             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51637             :     
   51638           0 :     CPLFree(psProgressInfo);
   51639             :     
   51640             :   }
   51641           0 :   {
   51642             :     /* %typemap(freearg) char **dict */
   51643           0 :     CSLDestroy( arg7 );
   51644             :   }
   51645             :   return NULL;
   51646             : }
   51647             : 
   51648             : 
   51649         277 : SWIGINTERN PyObject *GDALTransformerInfoShadow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51650         277 :   PyObject *obj;
   51651         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   51652         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   51653         277 :   return SWIG_Py_Void();
   51654             : }
   51655             : 
   51656          79 : SWIGINTERN PyObject *_wrap_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51657          79 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51658          79 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   51659          79 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   51660          79 :   char **arg3 = (char **) 0 ;
   51661          79 :   void *argp1 = 0 ;
   51662          79 :   int res1 = 0 ;
   51663          79 :   void *argp2 = 0 ;
   51664          79 :   int res2 = 0 ;
   51665          79 :   PyObject *swig_obj[3] ;
   51666          79 :   GDALTransformerInfoShadow *result = 0 ;
   51667             :   
   51668          79 :   if (!SWIG_Python_UnpackTuple(args, "Transformer", 3, 3, swig_obj)) SWIG_fail;
   51669          79 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51670          79 :   if (!SWIG_IsOK(res1)) {
   51671           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51672             :   }
   51673          79 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51674          79 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51675          79 :   if (!SWIG_IsOK(res2)) {
   51676           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51677             :   }
   51678          79 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51679          79 :   {
   51680             :     /* %typemap(in) char **dict */
   51681          79 :     arg3 = NULL;
   51682          79 :     if ( PySequence_Check( swig_obj[2] ) ) {
   51683          79 :       int bErr = FALSE;
   51684          79 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   51685          79 :       if ( bErr )
   51686             :       {
   51687           0 :         SWIG_fail;
   51688             :       }
   51689             :     }
   51690           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   51691           0 :       int bErr = FALSE;
   51692           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   51693           0 :       if ( bErr )
   51694             :       {
   51695           0 :         SWIG_fail;
   51696             :       }
   51697             :     }
   51698             :     else {
   51699           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51700           0 :       SWIG_fail;
   51701             :     }
   51702             :   }
   51703          79 :   {
   51704          79 :     const int bLocalUseExceptions = GetUseExceptions();
   51705          79 :     if ( bLocalUseExceptions ) {
   51706          76 :       pushErrorHandler();
   51707             :     }
   51708          79 :     {
   51709          79 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51710          79 :       result = (GDALTransformerInfoShadow *)Transformer(arg1,arg2,arg3);
   51711          79 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51712             :     }
   51713          79 :     if ( bLocalUseExceptions ) {
   51714          76 :       popErrorHandler();
   51715             :     }
   51716             : #ifndef SED_HACKS
   51717             :     if ( bLocalUseExceptions ) {
   51718             :       CPLErr eclass = CPLGetLastErrorType();
   51719             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51720             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51721             :       }
   51722             :     }
   51723             : #endif
   51724             :   }
   51725          79 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_OWN |  0 );
   51726          79 :   {
   51727             :     /* %typemap(freearg) char **dict */
   51728          79 :     CSLDestroy( arg3 );
   51729             :   }
   51730          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; } }
   51731             :   return resultobj;
   51732           0 : fail:
   51733           0 :   {
   51734             :     /* %typemap(freearg) char **dict */
   51735           0 :     CSLDestroy( arg3 );
   51736             :   }
   51737             :   return NULL;
   51738             : }
   51739             : 
   51740             : 
   51741           1 : SWIGINTERN PyObject *_wrap_WarpGetOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51742           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51743           1 :   char *result = 0 ;
   51744             :   
   51745           1 :   if (!SWIG_Python_UnpackTuple(args, "WarpGetOptionList", 0, 0, 0)) SWIG_fail;
   51746           1 :   {
   51747           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51748           1 :     if ( bLocalUseExceptions ) {
   51749           1 :       pushErrorHandler();
   51750             :     }
   51751           1 :     {
   51752           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51753           1 :       result = (char *)GDALWarpGetOptionList();
   51754           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51755             :     }
   51756           1 :     if ( bLocalUseExceptions ) {
   51757           1 :       popErrorHandler();
   51758             :     }
   51759             : #ifndef SED_HACKS
   51760             :     if ( bLocalUseExceptions ) {
   51761             :       CPLErr eclass = CPLGetLastErrorType();
   51762             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51763             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51764             :       }
   51765             :     }
   51766             : #endif
   51767             :   }
   51768           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51769           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; } }
   51770             :   return resultobj;
   51771           0 : fail:
   51772           0 :   return NULL;
   51773             : }
   51774             : 
   51775             : 
   51776           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51777           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51778           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51779           2 :   void *argp1 = 0 ;
   51780           2 :   int res1 = 0 ;
   51781           2 :   PyObject *swig_obj[1] ;
   51782           2 :   int result;
   51783             :   
   51784           2 :   if (!args) SWIG_fail;
   51785           2 :   swig_obj[0] = args;
   51786           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51787           2 :   if (!SWIG_IsOK(res1)) {
   51788           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_width_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51789             :   }
   51790           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51791           2 :   {
   51792           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51793           2 :     result = (int) ((arg1)->width);
   51794           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51795             :   }
   51796           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51797           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; } }
   51798             :   return resultobj;
   51799             : fail:
   51800             :   return NULL;
   51801             : }
   51802             : 
   51803             : 
   51804           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51805           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51806           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51807           2 :   void *argp1 = 0 ;
   51808           2 :   int res1 = 0 ;
   51809           2 :   PyObject *swig_obj[1] ;
   51810           2 :   int result;
   51811             :   
   51812           2 :   if (!args) SWIG_fail;
   51813           2 :   swig_obj[0] = args;
   51814           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51815           2 :   if (!SWIG_IsOK(res1)) {
   51816           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_height_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51817             :   }
   51818           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51819           2 :   {
   51820           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51821           2 :     result = (int) ((arg1)->height);
   51822           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51823             :   }
   51824           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51825           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; } }
   51826             :   return resultobj;
   51827             : fail:
   51828             :   return NULL;
   51829             : }
   51830             : 
   51831             : 
   51832           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51833           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51834           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51835           3 :   void *argp1 = 0 ;
   51836           3 :   int res1 = 0 ;
   51837           3 :   PyObject *swig_obj[1] ;
   51838           3 :   double result;
   51839             :   
   51840           3 :   if (!args) SWIG_fail;
   51841           3 :   swig_obj[0] = args;
   51842           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51843           3 :   if (!SWIG_IsOK(res1)) {
   51844           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51845             :   }
   51846           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51847           3 :   {
   51848           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51849           3 :     result = (double) ((arg1)->xmin);
   51850           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51851             :   }
   51852           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51853           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; } }
   51854             :   return resultobj;
   51855             : fail:
   51856             :   return NULL;
   51857             : }
   51858             : 
   51859             : 
   51860           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51861           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51862           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51863           3 :   void *argp1 = 0 ;
   51864           3 :   int res1 = 0 ;
   51865           3 :   PyObject *swig_obj[1] ;
   51866           3 :   double result;
   51867             :   
   51868           3 :   if (!args) SWIG_fail;
   51869           3 :   swig_obj[0] = args;
   51870           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51871           3 :   if (!SWIG_IsOK(res1)) {
   51872           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51873             :   }
   51874           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51875           3 :   {
   51876           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51877           3 :     result = (double) ((arg1)->ymin);
   51878           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51879             :   }
   51880           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51881           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; } }
   51882             :   return resultobj;
   51883             : fail:
   51884             :   return NULL;
   51885             : }
   51886             : 
   51887             : 
   51888           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51889           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51890           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51891           3 :   void *argp1 = 0 ;
   51892           3 :   int res1 = 0 ;
   51893           3 :   PyObject *swig_obj[1] ;
   51894           3 :   double result;
   51895             :   
   51896           3 :   if (!args) SWIG_fail;
   51897           3 :   swig_obj[0] = args;
   51898           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51899           3 :   if (!SWIG_IsOK(res1)) {
   51900           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51901             :   }
   51902           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51903           3 :   {
   51904           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51905           3 :     result = (double) ((arg1)->xmax);
   51906           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51907             :   }
   51908           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51909           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; } }
   51910             :   return resultobj;
   51911             : fail:
   51912             :   return NULL;
   51913             : }
   51914             : 
   51915             : 
   51916           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51917           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51918           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51919           3 :   void *argp1 = 0 ;
   51920           3 :   int res1 = 0 ;
   51921           3 :   PyObject *swig_obj[1] ;
   51922           3 :   double result;
   51923             :   
   51924           3 :   if (!args) SWIG_fail;
   51925           3 :   swig_obj[0] = args;
   51926           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51927           3 :   if (!SWIG_IsOK(res1)) {
   51928           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51929             :   }
   51930           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51931           3 :   {
   51932           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51933           3 :     result = (double) ((arg1)->ymax);
   51934           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51935             :   }
   51936           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51937           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; } }
   51938             :   return resultobj;
   51939             : fail:
   51940             :   return NULL;
   51941             : }
   51942             : 
   51943             : 
   51944           3 : SWIGINTERN PyObject *_wrap_delete_SuggestedWarpOutputRes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51945           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51946           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51947           3 :   void *argp1 = 0 ;
   51948           3 :   int res1 = 0 ;
   51949           3 :   PyObject *swig_obj[1] ;
   51950             :   
   51951           3 :   if (!args) SWIG_fail;
   51952           3 :   swig_obj[0] = args;
   51953           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_DISOWN |  0 );
   51954           3 :   if (!SWIG_IsOK(res1)) {
   51955           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuggestedWarpOutputRes" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51956             :   }
   51957           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51958           3 :   {
   51959           3 :     const int bLocalUseExceptions = GetUseExceptions();
   51960           3 :     if ( bLocalUseExceptions ) {
   51961           3 :       pushErrorHandler();
   51962             :     }
   51963           3 :     {
   51964           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51965           3 :       delete_SuggestedWarpOutputRes(arg1);
   51966           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51967             :     }
   51968           3 :     if ( bLocalUseExceptions ) {
   51969           3 :       popErrorHandler();
   51970             :     }
   51971             : #ifndef SED_HACKS
   51972             :     if ( bLocalUseExceptions ) {
   51973             :       CPLErr eclass = CPLGetLastErrorType();
   51974             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51975             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51976             :       }
   51977             :     }
   51978             : #endif
   51979             :   }
   51980           3 :   resultobj = SWIG_Py_Void();
   51981           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; } }
   51982             :   return resultobj;
   51983             : fail:
   51984             :   return NULL;
   51985             : }
   51986             : 
   51987             : 
   51988           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_GetGeotransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51989           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51990           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51991           2 :   double *arg2 ;
   51992           2 :   void *argp1 = 0 ;
   51993           2 :   int res1 = 0 ;
   51994           2 :   double argout2[6] ;
   51995           2 :   PyObject *swig_obj[1] ;
   51996             :   
   51997           2 :   {
   51998             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   51999           2 :     memset(argout2, 0, sizeof(argout2));
   52000           2 :     arg2 = argout2;
   52001             :   }
   52002           2 :   if (!args) SWIG_fail;
   52003           2 :   swig_obj[0] = args;
   52004           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   52005           2 :   if (!SWIG_IsOK(res1)) {
   52006           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_GetGeotransform" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   52007             :   }
   52008           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   52009           2 :   {
   52010           2 :     const int bLocalUseExceptions = GetUseExceptions();
   52011           2 :     if ( bLocalUseExceptions ) {
   52012           2 :       pushErrorHandler();
   52013             :     }
   52014           2 :     {
   52015           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52016           2 :       SuggestedWarpOutputRes_GetGeotransform(arg1,arg2);
   52017           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52018             :     }
   52019           2 :     if ( bLocalUseExceptions ) {
   52020           2 :       popErrorHandler();
   52021             :     }
   52022             : #ifndef SED_HACKS
   52023             :     if ( bLocalUseExceptions ) {
   52024             :       CPLErr eclass = CPLGetLastErrorType();
   52025             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52026             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52027             :       }
   52028             :     }
   52029             : #endif
   52030             :   }
   52031           2 :   resultobj = SWIG_Py_Void();
   52032           2 :   {
   52033             :     /* %typemap(argout) (double argout[ANY]) */
   52034           2 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   52035             : #if SWIG_VERSION >= 0x040300
   52036             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   52037             : #else
   52038           2 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   52039             : #endif
   52040             :   }
   52041           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; } }
   52042             :   return resultobj;
   52043             : fail:
   52044             :   return NULL;
   52045             : }
   52046             : 
   52047             : 
   52048         277 : SWIGINTERN PyObject *SuggestedWarpOutputRes_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52049         277 :   PyObject *obj;
   52050         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   52051         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_NewClientData(obj));
   52052         277 :   return SWIG_Py_Void();
   52053             : }
   52054             : 
   52055           1 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52056           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52057           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52058           1 :   GDALTransformerInfoShadow *arg2 = (GDALTransformerInfoShadow *) 0 ;
   52059           1 :   void *argp1 = 0 ;
   52060           1 :   int res1 = 0 ;
   52061           1 :   void *argp2 = 0 ;
   52062           1 :   int res2 = 0 ;
   52063           1 :   PyObject *swig_obj[2] ;
   52064           1 :   SuggestedWarpOutputRes *result = 0 ;
   52065             :   
   52066           1 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromTransformer", 2, 2, swig_obj)) SWIG_fail;
   52067           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52068           1 :   if (!SWIG_IsOK(res1)) {
   52069           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52070             :   }
   52071           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52072           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   52073           1 :   if (!SWIG_IsOK(res2)) {
   52074           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "2"" of type '" "GDALTransformerInfoShadow *""'"); 
   52075             :   }
   52076           1 :   arg2 = reinterpret_cast< GDALTransformerInfoShadow * >(argp2);
   52077           1 :   {
   52078           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52079           1 :     if ( bLocalUseExceptions ) {
   52080           1 :       pushErrorHandler();
   52081             :     }
   52082           1 :     {
   52083           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52084           1 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromTransformer(arg1,arg2);
   52085           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52086             :     }
   52087           1 :     if ( bLocalUseExceptions ) {
   52088           1 :       popErrorHandler();
   52089             :     }
   52090             : #ifndef SED_HACKS
   52091             :     if ( bLocalUseExceptions ) {
   52092             :       CPLErr eclass = CPLGetLastErrorType();
   52093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52095             :       }
   52096             :     }
   52097             : #endif
   52098             :   }
   52099           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   52100           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; } }
   52101             :   return resultobj;
   52102             : fail:
   52103             :   return NULL;
   52104             : }
   52105             : 
   52106             : 
   52107           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52108           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52109           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52110           3 :   char **arg2 = (char **) 0 ;
   52111           3 :   void *argp1 = 0 ;
   52112           3 :   int res1 = 0 ;
   52113           3 :   PyObject *swig_obj[2] ;
   52114           3 :   SuggestedWarpOutputRes *result = 0 ;
   52115             :   
   52116           3 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromOptions", 2, 2, swig_obj)) SWIG_fail;
   52117           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52118           3 :   if (!SWIG_IsOK(res1)) {
   52119           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromOptions" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52120             :   }
   52121           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52122           3 :   {
   52123             :     /* %typemap(in) char **dict */
   52124           3 :     arg2 = NULL;
   52125           3 :     if ( PySequence_Check( swig_obj[1] ) ) {
   52126           2 :       int bErr = FALSE;
   52127           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   52128           2 :       if ( bErr )
   52129             :       {
   52130           0 :         SWIG_fail;
   52131             :       }
   52132             :     }
   52133           1 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   52134           1 :       int bErr = FALSE;
   52135           1 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   52136           1 :       if ( bErr )
   52137             :       {
   52138           0 :         SWIG_fail;
   52139             :       }
   52140             :     }
   52141             :     else {
   52142           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   52143           0 :       SWIG_fail;
   52144             :     }
   52145             :   }
   52146           3 :   {
   52147           3 :     if (!arg1) {
   52148           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52149             :     }
   52150             :   }
   52151           2 :   {
   52152           2 :     const int bLocalUseExceptions = GetUseExceptions();
   52153           2 :     if ( bLocalUseExceptions ) {
   52154           2 :       pushErrorHandler();
   52155             :     }
   52156           2 :     {
   52157           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52158           2 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromOptions(arg1,arg2);
   52159           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52160             :     }
   52161           2 :     if ( bLocalUseExceptions ) {
   52162           2 :       popErrorHandler();
   52163             :     }
   52164             : #ifndef SED_HACKS
   52165             :     if ( bLocalUseExceptions ) {
   52166             :       CPLErr eclass = CPLGetLastErrorType();
   52167             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52168             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52169             :       }
   52170             :     }
   52171             : #endif
   52172             :   }
   52173           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   52174           2 :   {
   52175             :     /* %typemap(freearg) char **dict */
   52176           2 :     CSLDestroy( arg2 );
   52177             :   }
   52178           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; } }
   52179             :   return resultobj;
   52180           1 : fail:
   52181           1 :   {
   52182             :     /* %typemap(freearg) char **dict */
   52183           1 :     CSLDestroy( arg2 );
   52184             :   }
   52185             :   return NULL;
   52186             : }
   52187             : 
   52188             : 
   52189          23 : SWIGINTERN PyObject *_wrap__ApplyVerticalShiftGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   52190          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52191          23 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52192          23 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52193          23 :   bool arg3 = (bool) false ;
   52194          23 :   double arg4 = (double) 1.0 ;
   52195          23 :   double arg5 = (double) 1.0 ;
   52196          23 :   char **arg6 = (char **) NULL ;
   52197          23 :   void *argp1 = 0 ;
   52198          23 :   int res1 = 0 ;
   52199          23 :   void *argp2 = 0 ;
   52200          23 :   int res2 = 0 ;
   52201          23 :   bool val3 ;
   52202          23 :   int ecode3 = 0 ;
   52203          23 :   double val4 ;
   52204          23 :   int ecode4 = 0 ;
   52205          23 :   double val5 ;
   52206          23 :   int ecode5 = 0 ;
   52207          23 :   PyObject * obj0 = 0 ;
   52208          23 :   PyObject * obj1 = 0 ;
   52209          23 :   PyObject * obj2 = 0 ;
   52210          23 :   PyObject * obj3 = 0 ;
   52211          23 :   PyObject * obj4 = 0 ;
   52212          23 :   PyObject * obj5 = 0 ;
   52213          23 :   char * kwnames[] = {
   52214             :     (char *)"src_ds",  (char *)"grid_ds",  (char *)"inverse",  (char *)"srcUnitToMeter",  (char *)"dstUnitToMeter",  (char *)"options",  NULL 
   52215             :   };
   52216          23 :   GDALDatasetShadow *result = 0 ;
   52217             :   
   52218          23 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOO:_ApplyVerticalShiftGrid", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   52219          23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52220          23 :   if (!SWIG_IsOK(res1)) {
   52221           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_ApplyVerticalShiftGrid" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52222             :   }
   52223          23 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52224          23 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52225          23 :   if (!SWIG_IsOK(res2)) {
   52226           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_ApplyVerticalShiftGrid" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52227             :   }
   52228          23 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52229          23 :   if (obj2) {
   52230           1 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   52231           1 :     if (!SWIG_IsOK(ecode3)) {
   52232           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_ApplyVerticalShiftGrid" "', argument " "3"" of type '" "bool""'");
   52233             :     } 
   52234             :     arg3 = static_cast< bool >(val3);
   52235             :   }
   52236          23 :   if (obj3) {
   52237           1 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   52238           1 :     if (!SWIG_IsOK(ecode4)) {
   52239           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_ApplyVerticalShiftGrid" "', argument " "4"" of type '" "double""'");
   52240             :     } 
   52241           1 :     arg4 = static_cast< double >(val4);
   52242             :   }
   52243          23 :   if (obj4) {
   52244           1 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   52245           1 :     if (!SWIG_IsOK(ecode5)) {
   52246           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_ApplyVerticalShiftGrid" "', argument " "5"" of type '" "double""'");
   52247             :     } 
   52248           1 :     arg5 = static_cast< double >(val5);
   52249             :   }
   52250          23 :   if (obj5) {
   52251          11 :     {
   52252             :       /* %typemap(in) char **dict */
   52253          11 :       arg6 = NULL;
   52254          11 :       if ( PySequence_Check( obj5 ) ) {
   52255          11 :         int bErr = FALSE;
   52256          11 :         arg6 = CSLFromPySequence(obj5, &bErr);
   52257          11 :         if ( bErr )
   52258             :         {
   52259           0 :           SWIG_fail;
   52260             :         }
   52261             :       }
   52262           0 :       else if ( PyMapping_Check( obj5 ) ) {
   52263           0 :         int bErr = FALSE;
   52264           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   52265           0 :         if ( bErr )
   52266             :         {
   52267           0 :           SWIG_fail;
   52268             :         }
   52269             :       }
   52270             :       else {
   52271           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   52272           0 :         SWIG_fail;
   52273             :       }
   52274             :     }
   52275             :   }
   52276          23 :   {
   52277          23 :     if (!arg1) {
   52278           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52279             :     }
   52280             :   }
   52281          23 :   {
   52282          23 :     if (!arg2) {
   52283           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52284             :     }
   52285             :   }
   52286          23 :   {
   52287          23 :     const int bLocalUseExceptions = GetUseExceptions();
   52288          23 :     if ( bLocalUseExceptions ) {
   52289          12 :       pushErrorHandler();
   52290             :     }
   52291          23 :     {
   52292          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52293          23 :       result = (GDALDatasetShadow *)ApplyVerticalShiftGrid(arg1,arg2,arg3,arg4,arg5,arg6);
   52294          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52295             :     }
   52296          23 :     if ( bLocalUseExceptions ) {
   52297          12 :       popErrorHandler();
   52298             :     }
   52299             : #ifndef SED_HACKS
   52300             :     if ( bLocalUseExceptions ) {
   52301             :       CPLErr eclass = CPLGetLastErrorType();
   52302             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52303             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52304             :       }
   52305             :     }
   52306             : #endif
   52307             :   }
   52308          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   52309          23 :   {
   52310             :     /* %typemap(freearg) char **dict */
   52311          23 :     CSLDestroy( arg6 );
   52312             :   }
   52313          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; } }
   52314             :   return resultobj;
   52315           0 : fail:
   52316           0 :   {
   52317             :     /* %typemap(freearg) char **dict */
   52318           0 :     CSLDestroy( arg6 );
   52319             :   }
   52320             :   return NULL;
   52321             : }
   52322             : 
   52323             : 
   52324        1930 : SWIGINTERN PyObject *_wrap_GetGlobalAlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52325        1930 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52326        1930 :   GDALAlgorithmRegistryHS *result = 0 ;
   52327             :   
   52328        1930 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalAlgorithmRegistry", 0, 0, 0)) SWIG_fail;
   52329        1930 :   {
   52330        1930 :     const int bLocalUseExceptions = GetUseExceptions();
   52331        1930 :     if ( bLocalUseExceptions ) {
   52332        1929 :       pushErrorHandler();
   52333             :     }
   52334        1930 :     {
   52335        1930 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52336        1930 :       result = (GDALAlgorithmRegistryHS *)GDALGetGlobalAlgorithmRegistry();
   52337        1930 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52338             :     }
   52339        1930 :     if ( bLocalUseExceptions ) {
   52340        1929 :       popErrorHandler();
   52341             :     }
   52342             : #ifndef SED_HACKS
   52343             :     if ( bLocalUseExceptions ) {
   52344             :       CPLErr eclass = CPLGetLastErrorType();
   52345             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52346             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52347             :       }
   52348             :     }
   52349             : #endif
   52350             :   }
   52351        1930 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_OWN |  0 );
   52352        1930 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52353             :   return resultobj;
   52354           0 : fail:
   52355           0 :   return NULL;
   52356             : }
   52357             : 
   52358             : 
   52359           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeIsList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52360           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52361           0 :   GDALAlgorithmArgType arg1 ;
   52362           0 :   int val1 ;
   52363           0 :   int ecode1 = 0 ;
   52364           0 :   PyObject *swig_obj[1] ;
   52365           0 :   bool result;
   52366             :   
   52367           0 :   if (!args) SWIG_fail;
   52368           0 :   swig_obj[0] = args;
   52369           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   52370           0 :   if (!SWIG_IsOK(ecode1)) {
   52371           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeIsList" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   52372             :   } 
   52373           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   52374           0 :   {
   52375           0 :     const int bLocalUseExceptions = GetUseExceptions();
   52376           0 :     if ( bLocalUseExceptions ) {
   52377           0 :       pushErrorHandler();
   52378             :     }
   52379           0 :     {
   52380           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52381           0 :       result = (bool)GDALAlgorithmArgTypeIsList(arg1);
   52382           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52383             :     }
   52384           0 :     if ( bLocalUseExceptions ) {
   52385           0 :       popErrorHandler();
   52386             :     }
   52387             : #ifndef SED_HACKS
   52388             :     if ( bLocalUseExceptions ) {
   52389             :       CPLErr eclass = CPLGetLastErrorType();
   52390             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52391             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52392             :       }
   52393             :     }
   52394             : #endif
   52395             :   }
   52396           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52397           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; } }
   52398             :   return resultobj;
   52399             : fail:
   52400             :   return NULL;
   52401             : }
   52402             : 
   52403             : 
   52404           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52405           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52406           0 :   GDALAlgorithmArgType arg1 ;
   52407           0 :   int val1 ;
   52408           0 :   int ecode1 = 0 ;
   52409           0 :   PyObject *swig_obj[1] ;
   52410           0 :   char *result = 0 ;
   52411             :   
   52412           0 :   if (!args) SWIG_fail;
   52413           0 :   swig_obj[0] = args;
   52414           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   52415           0 :   if (!SWIG_IsOK(ecode1)) {
   52416           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeName" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   52417             :   } 
   52418           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   52419           0 :   {
   52420           0 :     const int bLocalUseExceptions = GetUseExceptions();
   52421           0 :     if ( bLocalUseExceptions ) {
   52422           0 :       pushErrorHandler();
   52423             :     }
   52424           0 :     {
   52425           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52426           0 :       result = (char *)GDALAlgorithmArgTypeName(arg1);
   52427           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52428             :     }
   52429           0 :     if ( bLocalUseExceptions ) {
   52430           0 :       popErrorHandler();
   52431             :     }
   52432             : #ifndef SED_HACKS
   52433             :     if ( bLocalUseExceptions ) {
   52434             :       CPLErr eclass = CPLGetLastErrorType();
   52435             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52436             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52437             :       }
   52438             :     }
   52439             : #endif
   52440             :   }
   52441           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52442           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; } }
   52443             :   return resultobj;
   52444             : fail:
   52445             :   return NULL;
   52446             : }
   52447             : 
   52448             : 
   52449       10004 : SWIGINTERN PyObject *_wrap_delete_AlgorithmArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52450       10004 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52451       10004 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52452       10004 :   void *argp1 = 0 ;
   52453       10004 :   int res1 = 0 ;
   52454       10004 :   PyObject *swig_obj[1] ;
   52455             :   
   52456       10004 :   if (!args) SWIG_fail;
   52457       10004 :   swig_obj[0] = args;
   52458       10004 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_DISOWN |  0 );
   52459       10004 :   if (!SWIG_IsOK(res1)) {
   52460           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmArg" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52461             :   }
   52462       10004 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52463       10004 :   {
   52464       10004 :     const int bLocalUseExceptions = GetUseExceptions();
   52465       10004 :     if ( bLocalUseExceptions ) {
   52466       10001 :       pushErrorHandler();
   52467             :     }
   52468       10004 :     {
   52469       10004 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52470       10004 :       delete_GDALAlgorithmArgHS(arg1);
   52471       10004 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52472             :     }
   52473       10004 :     if ( bLocalUseExceptions ) {
   52474       10001 :       popErrorHandler();
   52475             :     }
   52476             : #ifndef SED_HACKS
   52477             :     if ( bLocalUseExceptions ) {
   52478             :       CPLErr eclass = CPLGetLastErrorType();
   52479             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52480             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52481             :       }
   52482             :     }
   52483             : #endif
   52484             :   }
   52485       10004 :   resultobj = SWIG_Py_Void();
   52486       10004 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52487             :   return resultobj;
   52488             : fail:
   52489             :   return NULL;
   52490             : }
   52491             : 
   52492             : 
   52493         308 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52494         308 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52495         308 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52496         308 :   void *argp1 = 0 ;
   52497         308 :   int res1 = 0 ;
   52498         308 :   PyObject *swig_obj[1] ;
   52499         308 :   char *result = 0 ;
   52500             :   
   52501         308 :   if (!args) SWIG_fail;
   52502         308 :   swig_obj[0] = args;
   52503         308 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52504         308 :   if (!SWIG_IsOK(res1)) {
   52505           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52506             :   }
   52507         308 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52508         308 :   {
   52509         308 :     const int bLocalUseExceptions = GetUseExceptions();
   52510         308 :     if ( bLocalUseExceptions ) {
   52511         308 :       pushErrorHandler();
   52512             :     }
   52513         308 :     {
   52514         308 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52515         308 :       result = (char *)GDALAlgorithmArgHS_GetName(arg1);
   52516         308 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52517             :     }
   52518         308 :     if ( bLocalUseExceptions ) {
   52519         308 :       popErrorHandler();
   52520             :     }
   52521             : #ifndef SED_HACKS
   52522             :     if ( bLocalUseExceptions ) {
   52523             :       CPLErr eclass = CPLGetLastErrorType();
   52524             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52525             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52526             :       }
   52527             :     }
   52528             : #endif
   52529             :   }
   52530         308 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52531         308 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52532             :   return resultobj;
   52533             : fail:
   52534             :   return NULL;
   52535             : }
   52536             : 
   52537             : 
   52538        6951 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52539        6951 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52540        6951 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52541        6951 :   void *argp1 = 0 ;
   52542        6951 :   int res1 = 0 ;
   52543        6951 :   PyObject *swig_obj[1] ;
   52544        6951 :   GDALAlgorithmArgType result;
   52545             :   
   52546        6951 :   if (!args) SWIG_fail;
   52547        6951 :   swig_obj[0] = args;
   52548        6951 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52549        6951 :   if (!SWIG_IsOK(res1)) {
   52550           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52551             :   }
   52552        6951 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52553        6951 :   {
   52554        6951 :     const int bLocalUseExceptions = GetUseExceptions();
   52555        6951 :     if ( bLocalUseExceptions ) {
   52556        6948 :       pushErrorHandler();
   52557             :     }
   52558        6951 :     {
   52559        6951 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52560        6951 :       result = (GDALAlgorithmArgType)GDALAlgorithmArgHS_GetType(arg1);
   52561        6951 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52562             :     }
   52563        6951 :     if ( bLocalUseExceptions ) {
   52564        6948 :       popErrorHandler();
   52565             :     }
   52566             : #ifndef SED_HACKS
   52567             :     if ( bLocalUseExceptions ) {
   52568             :       CPLErr eclass = CPLGetLastErrorType();
   52569             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52570             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52571             :       }
   52572             :     }
   52573             : #endif
   52574             :   }
   52575        6951 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52576        6951 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52577             :   return resultobj;
   52578             : fail:
   52579             :   return NULL;
   52580             : }
   52581             : 
   52582             : 
   52583           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52584           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52585           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52586           1 :   void *argp1 = 0 ;
   52587           1 :   int res1 = 0 ;
   52588           1 :   PyObject *swig_obj[1] ;
   52589           1 :   char *result = 0 ;
   52590             :   
   52591           1 :   if (!args) SWIG_fail;
   52592           1 :   swig_obj[0] = args;
   52593           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52594           1 :   if (!SWIG_IsOK(res1)) {
   52595           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52596             :   }
   52597           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52598           1 :   {
   52599           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52600           1 :     if ( bLocalUseExceptions ) {
   52601           1 :       pushErrorHandler();
   52602             :     }
   52603           1 :     {
   52604           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52605           1 :       result = (char *)GDALAlgorithmArgHS_GetDescription(arg1);
   52606           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52607             :     }
   52608           1 :     if ( bLocalUseExceptions ) {
   52609           1 :       popErrorHandler();
   52610             :     }
   52611             : #ifndef SED_HACKS
   52612             :     if ( bLocalUseExceptions ) {
   52613             :       CPLErr eclass = CPLGetLastErrorType();
   52614             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52615             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52616             :       }
   52617             :     }
   52618             : #endif
   52619             :   }
   52620           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52621           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; } }
   52622             :   return resultobj;
   52623             : fail:
   52624             :   return NULL;
   52625             : }
   52626             : 
   52627             : 
   52628           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetShortName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52629           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52630           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52631           1 :   void *argp1 = 0 ;
   52632           1 :   int res1 = 0 ;
   52633           1 :   PyObject *swig_obj[1] ;
   52634           1 :   char *result = 0 ;
   52635             :   
   52636           1 :   if (!args) SWIG_fail;
   52637           1 :   swig_obj[0] = args;
   52638           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52639           1 :   if (!SWIG_IsOK(res1)) {
   52640           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetShortName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52641             :   }
   52642           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52643           1 :   {
   52644           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52645           1 :     if ( bLocalUseExceptions ) {
   52646           1 :       pushErrorHandler();
   52647             :     }
   52648           1 :     {
   52649           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52650           1 :       result = (char *)GDALAlgorithmArgHS_GetShortName(arg1);
   52651           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52652             :     }
   52653           1 :     if ( bLocalUseExceptions ) {
   52654           1 :       popErrorHandler();
   52655             :     }
   52656             : #ifndef SED_HACKS
   52657             :     if ( bLocalUseExceptions ) {
   52658             :       CPLErr eclass = CPLGetLastErrorType();
   52659             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52660             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52661             :       }
   52662             :     }
   52663             : #endif
   52664             :   }
   52665           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52666           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; } }
   52667             :   return resultobj;
   52668             : fail:
   52669             :   return NULL;
   52670             : }
   52671             : 
   52672             : 
   52673           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAliases(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52674           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52675           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52676           1 :   void *argp1 = 0 ;
   52677           1 :   int res1 = 0 ;
   52678           1 :   PyObject *swig_obj[1] ;
   52679           1 :   char **result = 0 ;
   52680             :   
   52681           1 :   if (!args) SWIG_fail;
   52682           1 :   swig_obj[0] = args;
   52683           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52684           1 :   if (!SWIG_IsOK(res1)) {
   52685           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAliases" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52686             :   }
   52687           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52688           1 :   {
   52689           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52690           1 :     if ( bLocalUseExceptions ) {
   52691           1 :       pushErrorHandler();
   52692             :     }
   52693           1 :     {
   52694           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52695           1 :       result = (char **)GDALAlgorithmArgHS_GetAliases(arg1);
   52696           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52697             :     }
   52698           1 :     if ( bLocalUseExceptions ) {
   52699           1 :       popErrorHandler();
   52700             :     }
   52701             : #ifndef SED_HACKS
   52702             :     if ( bLocalUseExceptions ) {
   52703             :       CPLErr eclass = CPLGetLastErrorType();
   52704             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52705             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52706             :       }
   52707             :     }
   52708             : #endif
   52709             :   }
   52710           1 :   {
   52711             :     /* %typemap(out) char **CSL -> ( string ) */
   52712           1 :     bool bErr = false;
   52713           1 :     resultobj = CSLToList(result, &bErr);
   52714           1 :     CSLDestroy(result);
   52715           1 :     if( bErr ) {
   52716           0 :       SWIG_fail;
   52717             :     }
   52718             :   }
   52719           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; } }
   52720             :   return resultobj;
   52721             : fail:
   52722             :   return NULL;
   52723             : }
   52724             : 
   52725             : 
   52726           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetaVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52727           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52728           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52729           1 :   void *argp1 = 0 ;
   52730           1 :   int res1 = 0 ;
   52731           1 :   PyObject *swig_obj[1] ;
   52732           1 :   char *result = 0 ;
   52733             :   
   52734           1 :   if (!args) SWIG_fail;
   52735           1 :   swig_obj[0] = args;
   52736           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52737           1 :   if (!SWIG_IsOK(res1)) {
   52738           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetaVar" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52739             :   }
   52740           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52741           1 :   {
   52742           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52743           1 :     if ( bLocalUseExceptions ) {
   52744           1 :       pushErrorHandler();
   52745             :     }
   52746           1 :     {
   52747           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52748           1 :       result = (char *)GDALAlgorithmArgHS_GetMetaVar(arg1);
   52749           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52750             :     }
   52751           1 :     if ( bLocalUseExceptions ) {
   52752           1 :       popErrorHandler();
   52753             :     }
   52754             : #ifndef SED_HACKS
   52755             :     if ( bLocalUseExceptions ) {
   52756             :       CPLErr eclass = CPLGetLastErrorType();
   52757             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52758             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52759             :       }
   52760             :     }
   52761             : #endif
   52762             :   }
   52763           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52764           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; } }
   52765             :   return resultobj;
   52766             : fail:
   52767             :   return NULL;
   52768             : }
   52769             : 
   52770             : 
   52771           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetCategory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52772           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52773           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52774           1 :   void *argp1 = 0 ;
   52775           1 :   int res1 = 0 ;
   52776           1 :   PyObject *swig_obj[1] ;
   52777           1 :   char *result = 0 ;
   52778             :   
   52779           1 :   if (!args) SWIG_fail;
   52780           1 :   swig_obj[0] = args;
   52781           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52782           1 :   if (!SWIG_IsOK(res1)) {
   52783           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetCategory" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52784             :   }
   52785           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52786           1 :   {
   52787           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52788           1 :     if ( bLocalUseExceptions ) {
   52789           1 :       pushErrorHandler();
   52790             :     }
   52791           1 :     {
   52792           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52793           1 :       result = (char *)GDALAlgorithmArgHS_GetCategory(arg1);
   52794           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52795             :     }
   52796           1 :     if ( bLocalUseExceptions ) {
   52797           1 :       popErrorHandler();
   52798             :     }
   52799             : #ifndef SED_HACKS
   52800             :     if ( bLocalUseExceptions ) {
   52801             :       CPLErr eclass = CPLGetLastErrorType();
   52802             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52803             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52804             :       }
   52805             :     }
   52806             : #endif
   52807             :   }
   52808           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52809           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; } }
   52810             :   return resultobj;
   52811             : fail:
   52812             :   return NULL;
   52813             : }
   52814             : 
   52815             : 
   52816           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsPositional(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52817           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52818           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52819           1 :   void *argp1 = 0 ;
   52820           1 :   int res1 = 0 ;
   52821           1 :   PyObject *swig_obj[1] ;
   52822           1 :   bool result;
   52823             :   
   52824           1 :   if (!args) SWIG_fail;
   52825           1 :   swig_obj[0] = args;
   52826           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52827           1 :   if (!SWIG_IsOK(res1)) {
   52828           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsPositional" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52829             :   }
   52830           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52831           1 :   {
   52832           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52833           1 :     if ( bLocalUseExceptions ) {
   52834           1 :       pushErrorHandler();
   52835             :     }
   52836           1 :     {
   52837           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52838           1 :       result = (bool)GDALAlgorithmArgHS_IsPositional(arg1);
   52839           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52840             :     }
   52841           1 :     if ( bLocalUseExceptions ) {
   52842           1 :       popErrorHandler();
   52843             :     }
   52844             : #ifndef SED_HACKS
   52845             :     if ( bLocalUseExceptions ) {
   52846             :       CPLErr eclass = CPLGetLastErrorType();
   52847             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52848             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52849             :       }
   52850             :     }
   52851             : #endif
   52852             :   }
   52853           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52854           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; } }
   52855             :   return resultobj;
   52856             : fail:
   52857             :   return NULL;
   52858             : }
   52859             : 
   52860             : 
   52861           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsRequired(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52862           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52863           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52864           1 :   void *argp1 = 0 ;
   52865           1 :   int res1 = 0 ;
   52866           1 :   PyObject *swig_obj[1] ;
   52867           1 :   bool result;
   52868             :   
   52869           1 :   if (!args) SWIG_fail;
   52870           1 :   swig_obj[0] = args;
   52871           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52872           1 :   if (!SWIG_IsOK(res1)) {
   52873           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsRequired" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52874             :   }
   52875           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52876           1 :   {
   52877           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52878           1 :     if ( bLocalUseExceptions ) {
   52879           1 :       pushErrorHandler();
   52880             :     }
   52881           1 :     {
   52882           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52883           1 :       result = (bool)GDALAlgorithmArgHS_IsRequired(arg1);
   52884           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52885             :     }
   52886           1 :     if ( bLocalUseExceptions ) {
   52887           1 :       popErrorHandler();
   52888             :     }
   52889             : #ifndef SED_HACKS
   52890             :     if ( bLocalUseExceptions ) {
   52891             :       CPLErr eclass = CPLGetLastErrorType();
   52892             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52893             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52894             :       }
   52895             :     }
   52896             : #endif
   52897             :   }
   52898           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52899           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; } }
   52900             :   return resultobj;
   52901             : fail:
   52902             :   return NULL;
   52903             : }
   52904             : 
   52905             : 
   52906           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMinCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52907           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52908           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52909           1 :   void *argp1 = 0 ;
   52910           1 :   int res1 = 0 ;
   52911           1 :   PyObject *swig_obj[1] ;
   52912           1 :   int result;
   52913             :   
   52914           1 :   if (!args) SWIG_fail;
   52915           1 :   swig_obj[0] = args;
   52916           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52917           1 :   if (!SWIG_IsOK(res1)) {
   52918           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMinCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52919             :   }
   52920           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52921           1 :   {
   52922           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52923           1 :     if ( bLocalUseExceptions ) {
   52924           1 :       pushErrorHandler();
   52925             :     }
   52926           1 :     {
   52927           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52928           1 :       result = (int)GDALAlgorithmArgHS_GetMinCount(arg1);
   52929           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52930             :     }
   52931           1 :     if ( bLocalUseExceptions ) {
   52932           1 :       popErrorHandler();
   52933             :     }
   52934             : #ifndef SED_HACKS
   52935             :     if ( bLocalUseExceptions ) {
   52936             :       CPLErr eclass = CPLGetLastErrorType();
   52937             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52938             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52939             :       }
   52940             :     }
   52941             : #endif
   52942             :   }
   52943           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52944           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; } }
   52945             :   return resultobj;
   52946             : fail:
   52947             :   return NULL;
   52948             : }
   52949             : 
   52950             : 
   52951           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMaxCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52952           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52953           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52954           1 :   void *argp1 = 0 ;
   52955           1 :   int res1 = 0 ;
   52956           1 :   PyObject *swig_obj[1] ;
   52957           1 :   int result;
   52958             :   
   52959           1 :   if (!args) SWIG_fail;
   52960           1 :   swig_obj[0] = args;
   52961           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52962           1 :   if (!SWIG_IsOK(res1)) {
   52963           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMaxCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52964             :   }
   52965           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52966           1 :   {
   52967           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52968           1 :     if ( bLocalUseExceptions ) {
   52969           1 :       pushErrorHandler();
   52970             :     }
   52971           1 :     {
   52972           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52973           1 :       result = (int)GDALAlgorithmArgHS_GetMaxCount(arg1);
   52974           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52975             :     }
   52976           1 :     if ( bLocalUseExceptions ) {
   52977           1 :       popErrorHandler();
   52978             :     }
   52979             : #ifndef SED_HACKS
   52980             :     if ( bLocalUseExceptions ) {
   52981             :       CPLErr eclass = CPLGetLastErrorType();
   52982             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52983             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52984             :       }
   52985             :     }
   52986             : #endif
   52987             :   }
   52988           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52989           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; } }
   52990             :   return resultobj;
   52991             : fail:
   52992             :   return NULL;
   52993             : }
   52994             : 
   52995             : 
   52996           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetPackedValuesAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52997           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52998           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52999           1 :   void *argp1 = 0 ;
   53000           1 :   int res1 = 0 ;
   53001           1 :   PyObject *swig_obj[1] ;
   53002           1 :   bool result;
   53003             :   
   53004           1 :   if (!args) SWIG_fail;
   53005           1 :   swig_obj[0] = args;
   53006           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53007           1 :   if (!SWIG_IsOK(res1)) {
   53008           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetPackedValuesAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53009             :   }
   53010           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53011           1 :   {
   53012           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53013           1 :     if ( bLocalUseExceptions ) {
   53014           1 :       pushErrorHandler();
   53015             :     }
   53016           1 :     {
   53017           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53018           1 :       result = (bool)GDALAlgorithmArgHS_GetPackedValuesAllowed(arg1);
   53019           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53020             :     }
   53021           1 :     if ( bLocalUseExceptions ) {
   53022           1 :       popErrorHandler();
   53023             :     }
   53024             : #ifndef SED_HACKS
   53025             :     if ( bLocalUseExceptions ) {
   53026             :       CPLErr eclass = CPLGetLastErrorType();
   53027             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53028             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53029             :       }
   53030             :     }
   53031             : #endif
   53032             :   }
   53033           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53034           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; } }
   53035             :   return resultobj;
   53036             : fail:
   53037             :   return NULL;
   53038             : }
   53039             : 
   53040             : 
   53041           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetRepeatedArgAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53042           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53043           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53044           1 :   void *argp1 = 0 ;
   53045           1 :   int res1 = 0 ;
   53046           1 :   PyObject *swig_obj[1] ;
   53047           1 :   bool result;
   53048             :   
   53049           1 :   if (!args) SWIG_fail;
   53050           1 :   swig_obj[0] = args;
   53051           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53052           1 :   if (!SWIG_IsOK(res1)) {
   53053           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetRepeatedArgAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53054             :   }
   53055           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53056           1 :   {
   53057           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53058           1 :     if ( bLocalUseExceptions ) {
   53059           1 :       pushErrorHandler();
   53060             :     }
   53061           1 :     {
   53062           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53063           1 :       result = (bool)GDALAlgorithmArgHS_GetRepeatedArgAllowed(arg1);
   53064           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53065             :     }
   53066           1 :     if ( bLocalUseExceptions ) {
   53067           1 :       popErrorHandler();
   53068             :     }
   53069             : #ifndef SED_HACKS
   53070             :     if ( bLocalUseExceptions ) {
   53071             :       CPLErr eclass = CPLGetLastErrorType();
   53072             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53073             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53074             :       }
   53075             :     }
   53076             : #endif
   53077             :   }
   53078           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53079           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; } }
   53080             :   return resultobj;
   53081             : fail:
   53082             :   return NULL;
   53083             : }
   53084             : 
   53085             : 
   53086           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetChoices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53087           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53088           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53089           1 :   void *argp1 = 0 ;
   53090           1 :   int res1 = 0 ;
   53091           1 :   PyObject *swig_obj[1] ;
   53092           1 :   char **result = 0 ;
   53093             :   
   53094           1 :   if (!args) SWIG_fail;
   53095           1 :   swig_obj[0] = args;
   53096           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53097           1 :   if (!SWIG_IsOK(res1)) {
   53098           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetChoices" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53099             :   }
   53100           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53101           1 :   {
   53102           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53103           1 :     if ( bLocalUseExceptions ) {
   53104           1 :       pushErrorHandler();
   53105             :     }
   53106           1 :     {
   53107           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53108           1 :       result = (char **)GDALAlgorithmArgHS_GetChoices(arg1);
   53109           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53110             :     }
   53111           1 :     if ( bLocalUseExceptions ) {
   53112           1 :       popErrorHandler();
   53113             :     }
   53114             : #ifndef SED_HACKS
   53115             :     if ( bLocalUseExceptions ) {
   53116             :       CPLErr eclass = CPLGetLastErrorType();
   53117             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53118             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53119             :       }
   53120             :     }
   53121             : #endif
   53122             :   }
   53123           1 :   {
   53124             :     /* %typemap(out) char **CSL -> ( string ) */
   53125           1 :     bool bErr = false;
   53126           1 :     resultobj = CSLToList(result, &bErr);
   53127           1 :     CSLDestroy(result);
   53128           1 :     if( bErr ) {
   53129           0 :       SWIG_fail;
   53130             :     }
   53131             :   }
   53132           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; } }
   53133             :   return resultobj;
   53134             : fail:
   53135             :   return NULL;
   53136             : }
   53137             : 
   53138             : 
   53139          28 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53140          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53141          28 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53142          28 :   char *arg2 = (char *) 0 ;
   53143          28 :   void *argp1 = 0 ;
   53144          28 :   int res1 = 0 ;
   53145          28 :   int res2 ;
   53146          28 :   char *buf2 = 0 ;
   53147          28 :   int alloc2 = 0 ;
   53148          28 :   PyObject *swig_obj[2] ;
   53149          28 :   char **result = 0 ;
   53150             :   
   53151          28 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_GetMetadataItem", 2, 2, swig_obj)) SWIG_fail;
   53152          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53153          28 :   if (!SWIG_IsOK(res1)) {
   53154           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53155             :   }
   53156          28 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53157          28 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   53158          28 :   if (!SWIG_IsOK(res2)) {
   53159           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   53160             :   }
   53161          28 :   arg2 = reinterpret_cast< char * >(buf2);
   53162          28 :   {
   53163          28 :     const int bLocalUseExceptions = GetUseExceptions();
   53164          28 :     if ( bLocalUseExceptions ) {
   53165          28 :       pushErrorHandler();
   53166             :     }
   53167          28 :     {
   53168          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53169          28 :       result = (char **)GDALAlgorithmArgHS_GetMetadataItem(arg1,(char const *)arg2);
   53170          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53171             :     }
   53172          28 :     if ( bLocalUseExceptions ) {
   53173          28 :       popErrorHandler();
   53174             :     }
   53175             : #ifndef SED_HACKS
   53176             :     if ( bLocalUseExceptions ) {
   53177             :       CPLErr eclass = CPLGetLastErrorType();
   53178             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53179             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53180             :       }
   53181             :     }
   53182             : #endif
   53183             :   }
   53184          28 :   {
   53185             :     /* %typemap(out) char **CSL -> ( string ) */
   53186          28 :     bool bErr = false;
   53187          28 :     resultobj = CSLToList(result, &bErr);
   53188          28 :     CSLDestroy(result);
   53189          28 :     if( bErr ) {
   53190           0 :       SWIG_fail;
   53191             :     }
   53192             :   }
   53193          28 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53194          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; } }
   53195             :   return resultobj;
   53196           0 : fail:
   53197           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53198             :   return NULL;
   53199             : }
   53200             : 
   53201             : 
   53202         218 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsExplicitlySet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53203         218 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53204         218 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53205         218 :   void *argp1 = 0 ;
   53206         218 :   int res1 = 0 ;
   53207         218 :   PyObject *swig_obj[1] ;
   53208         218 :   bool result;
   53209             :   
   53210         218 :   if (!args) SWIG_fail;
   53211         218 :   swig_obj[0] = args;
   53212         218 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53213         218 :   if (!SWIG_IsOK(res1)) {
   53214           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsExplicitlySet" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53215             :   }
   53216         218 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53217         218 :   {
   53218         218 :     const int bLocalUseExceptions = GetUseExceptions();
   53219         218 :     if ( bLocalUseExceptions ) {
   53220         218 :       pushErrorHandler();
   53221             :     }
   53222         218 :     {
   53223         218 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53224         218 :       result = (bool)GDALAlgorithmArgHS_IsExplicitlySet(arg1);
   53225         218 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53226             :     }
   53227         218 :     if ( bLocalUseExceptions ) {
   53228         218 :       popErrorHandler();
   53229             :     }
   53230             : #ifndef SED_HACKS
   53231             :     if ( bLocalUseExceptions ) {
   53232             :       CPLErr eclass = CPLGetLastErrorType();
   53233             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53234             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53235             :       }
   53236             :     }
   53237             : #endif
   53238             :   }
   53239         218 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53240         218 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53241             :   return resultobj;
   53242             : fail:
   53243             :   return NULL;
   53244             : }
   53245             : 
   53246             : 
   53247           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_HasDefaultValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53248           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53249           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53250           1 :   void *argp1 = 0 ;
   53251           1 :   int res1 = 0 ;
   53252           1 :   PyObject *swig_obj[1] ;
   53253           1 :   bool result;
   53254             :   
   53255           1 :   if (!args) SWIG_fail;
   53256           1 :   swig_obj[0] = args;
   53257           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53258           1 :   if (!SWIG_IsOK(res1)) {
   53259           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_HasDefaultValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53260             :   }
   53261           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53262           1 :   {
   53263           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53264           1 :     if ( bLocalUseExceptions ) {
   53265           1 :       pushErrorHandler();
   53266             :     }
   53267           1 :     {
   53268           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53269           1 :       result = (bool)GDALAlgorithmArgHS_HasDefaultValue(arg1);
   53270           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53271             :     }
   53272           1 :     if ( bLocalUseExceptions ) {
   53273           1 :       popErrorHandler();
   53274             :     }
   53275             : #ifndef SED_HACKS
   53276             :     if ( bLocalUseExceptions ) {
   53277             :       CPLErr eclass = CPLGetLastErrorType();
   53278             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53279             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53280             :       }
   53281             :     }
   53282             : #endif
   53283             :   }
   53284           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53285           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; } }
   53286             :   return resultobj;
   53287             : fail:
   53288             :   return NULL;
   53289             : }
   53290             : 
   53291             : 
   53292           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53293           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53294           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53295           1 :   void *argp1 = 0 ;
   53296           1 :   int res1 = 0 ;
   53297           1 :   PyObject *swig_obj[1] ;
   53298           1 :   bool result;
   53299             :   
   53300           1 :   if (!args) SWIG_fail;
   53301           1 :   swig_obj[0] = args;
   53302           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53303           1 :   if (!SWIG_IsOK(res1)) {
   53304           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53305             :   }
   53306           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53307           1 :   {
   53308           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53309           1 :     if ( bLocalUseExceptions ) {
   53310           1 :       pushErrorHandler();
   53311             :     }
   53312           1 :     {
   53313           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53314           1 :       result = (bool)GDALAlgorithmArgHS_GetDefaultAsBoolean(arg1);
   53315           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53316             :     }
   53317           1 :     if ( bLocalUseExceptions ) {
   53318           1 :       popErrorHandler();
   53319             :     }
   53320             : #ifndef SED_HACKS
   53321             :     if ( bLocalUseExceptions ) {
   53322             :       CPLErr eclass = CPLGetLastErrorType();
   53323             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53324             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53325             :       }
   53326             :     }
   53327             : #endif
   53328             :   }
   53329           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53330           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; } }
   53331             :   return resultobj;
   53332             : fail:
   53333             :   return NULL;
   53334             : }
   53335             : 
   53336             : 
   53337           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53338           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53339           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53340           1 :   void *argp1 = 0 ;
   53341           1 :   int res1 = 0 ;
   53342           1 :   PyObject *swig_obj[1] ;
   53343           1 :   char *result = 0 ;
   53344             :   
   53345           1 :   if (!args) SWIG_fail;
   53346           1 :   swig_obj[0] = args;
   53347           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53348           1 :   if (!SWIG_IsOK(res1)) {
   53349           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53350             :   }
   53351           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53352           1 :   {
   53353           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53354           1 :     if ( bLocalUseExceptions ) {
   53355           1 :       pushErrorHandler();
   53356             :     }
   53357           1 :     {
   53358           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53359           1 :       result = (char *)GDALAlgorithmArgHS_GetDefaultAsString(arg1);
   53360           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53361             :     }
   53362           1 :     if ( bLocalUseExceptions ) {
   53363           1 :       popErrorHandler();
   53364             :     }
   53365             : #ifndef SED_HACKS
   53366             :     if ( bLocalUseExceptions ) {
   53367             :       CPLErr eclass = CPLGetLastErrorType();
   53368             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53369             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53370             :       }
   53371             :     }
   53372             : #endif
   53373             :   }
   53374           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53375           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; } }
   53376             :   return resultobj;
   53377             : fail:
   53378             :   return NULL;
   53379             : }
   53380             : 
   53381             : 
   53382           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53383           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53384           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53385           1 :   void *argp1 = 0 ;
   53386           1 :   int res1 = 0 ;
   53387           1 :   PyObject *swig_obj[1] ;
   53388           1 :   int result;
   53389             :   
   53390           1 :   if (!args) SWIG_fail;
   53391           1 :   swig_obj[0] = args;
   53392           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53393           1 :   if (!SWIG_IsOK(res1)) {
   53394           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53395             :   }
   53396           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53397           1 :   {
   53398           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53399           1 :     if ( bLocalUseExceptions ) {
   53400           1 :       pushErrorHandler();
   53401             :     }
   53402           1 :     {
   53403           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53404           1 :       result = (int)GDALAlgorithmArgHS_GetDefaultAsInteger(arg1);
   53405           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53406             :     }
   53407           1 :     if ( bLocalUseExceptions ) {
   53408           1 :       popErrorHandler();
   53409             :     }
   53410             : #ifndef SED_HACKS
   53411             :     if ( bLocalUseExceptions ) {
   53412             :       CPLErr eclass = CPLGetLastErrorType();
   53413             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53414             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53415             :       }
   53416             :     }
   53417             : #endif
   53418             :   }
   53419           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53420           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; } }
   53421             :   return resultobj;
   53422             : fail:
   53423             :   return NULL;
   53424             : }
   53425             : 
   53426             : 
   53427           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53428           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53429           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53430           1 :   void *argp1 = 0 ;
   53431           1 :   int res1 = 0 ;
   53432           1 :   PyObject *swig_obj[1] ;
   53433           1 :   double result;
   53434             :   
   53435           1 :   if (!args) SWIG_fail;
   53436           1 :   swig_obj[0] = args;
   53437           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53438           1 :   if (!SWIG_IsOK(res1)) {
   53439           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53440             :   }
   53441           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53442           1 :   {
   53443           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53444           1 :     if ( bLocalUseExceptions ) {
   53445           1 :       pushErrorHandler();
   53446             :     }
   53447           1 :     {
   53448           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53449           1 :       result = (double)GDALAlgorithmArgHS_GetDefaultAsDouble(arg1);
   53450           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53451             :     }
   53452           1 :     if ( bLocalUseExceptions ) {
   53453           1 :       popErrorHandler();
   53454             :     }
   53455             : #ifndef SED_HACKS
   53456             :     if ( bLocalUseExceptions ) {
   53457             :       CPLErr eclass = CPLGetLastErrorType();
   53458             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53459             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53460             :       }
   53461             :     }
   53462             : #endif
   53463             :   }
   53464           1 :   resultobj = SWIG_From_double(static_cast< double >(result));
   53465           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; } }
   53466             :   return resultobj;
   53467             : fail:
   53468             :   return NULL;
   53469             : }
   53470             : 
   53471             : 
   53472           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53473           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53474           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53475           1 :   void *argp1 = 0 ;
   53476           1 :   int res1 = 0 ;
   53477           1 :   PyObject *swig_obj[1] ;
   53478           1 :   char **result = 0 ;
   53479             :   
   53480           1 :   if (!args) SWIG_fail;
   53481           1 :   swig_obj[0] = args;
   53482           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53483           1 :   if (!SWIG_IsOK(res1)) {
   53484           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53485             :   }
   53486           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53487           1 :   {
   53488           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53489           1 :     if ( bLocalUseExceptions ) {
   53490           1 :       pushErrorHandler();
   53491             :     }
   53492           1 :     {
   53493           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53494           1 :       result = (char **)GDALAlgorithmArgHS_GetDefaultAsStringList(arg1);
   53495           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53496             :     }
   53497           1 :     if ( bLocalUseExceptions ) {
   53498           1 :       popErrorHandler();
   53499             :     }
   53500             : #ifndef SED_HACKS
   53501             :     if ( bLocalUseExceptions ) {
   53502             :       CPLErr eclass = CPLGetLastErrorType();
   53503             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53504             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53505             :       }
   53506             :     }
   53507             : #endif
   53508             :   }
   53509           1 :   {
   53510             :     /* %typemap(out) char **CSL -> ( string ) */
   53511           1 :     bool bErr = false;
   53512           1 :     resultobj = CSLToList(result, &bErr);
   53513           1 :     CSLDestroy(result);
   53514           1 :     if( bErr ) {
   53515           0 :       SWIG_fail;
   53516             :     }
   53517             :   }
   53518           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; } }
   53519             :   return resultobj;
   53520             : fail:
   53521             :   return NULL;
   53522             : }
   53523             : 
   53524             : 
   53525           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53526           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53527           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53528           1 :   int *arg2 = (int *) 0 ;
   53529           1 :   int **arg3 = (int **) 0 ;
   53530           1 :   void *argp1 = 0 ;
   53531           1 :   int res1 = 0 ;
   53532           1 :   int nLen2 = 0 ;
   53533           1 :   int *pList2 = NULL ;
   53534           1 :   PyObject *swig_obj[1] ;
   53535             :   
   53536           1 :   {
   53537             :     /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
   53538           1 :     arg2 = &nLen2;
   53539           1 :     arg3 = &pList2;
   53540             :   }
   53541           1 :   if (!args) SWIG_fail;
   53542           1 :   swig_obj[0] = args;
   53543           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53544           1 :   if (!SWIG_IsOK(res1)) {
   53545           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53546             :   }
   53547           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53548           1 :   {
   53549           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53550           1 :     if ( bLocalUseExceptions ) {
   53551           1 :       pushErrorHandler();
   53552             :     }
   53553           1 :     {
   53554           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53555           1 :       GDALAlgorithmArgHS_GetDefaultAsIntegerList(arg1,arg2,(int const **)arg3);
   53556           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53557             :     }
   53558           1 :     if ( bLocalUseExceptions ) {
   53559           1 :       popErrorHandler();
   53560             :     }
   53561             : #ifndef SED_HACKS
   53562             :     if ( bLocalUseExceptions ) {
   53563             :       CPLErr eclass = CPLGetLastErrorType();
   53564             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53565             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53566             :       }
   53567             :     }
   53568             : #endif
   53569             :   }
   53570           1 :   resultobj = SWIG_Py_Void();
   53571           1 :   {
   53572             :     /* %typemap(argout) (int *nLen, const int **pList ) */
   53573           1 :     Py_DECREF(resultobj);
   53574           1 :     PyObject *out = PyList_New( *arg2 );
   53575           1 :     if( !out ) {
   53576           0 :       SWIG_fail;
   53577             :     }
   53578           1 :     for( int i=0; i<*arg2; i++ ) {
   53579           0 :       PyObject *val = PyInt_FromLong( (*arg3)[i] );
   53580           0 :       PyList_SetItem( out, i, val );
   53581             :     }
   53582           1 :     resultobj = out;
   53583             :   }
   53584           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; } }
   53585             :   return resultobj;
   53586             : fail:
   53587             :   return NULL;
   53588             : }
   53589             : 
   53590             : 
   53591           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53592           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53593           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53594           1 :   int *arg2 = (int *) 0 ;
   53595           1 :   double **arg3 = (double **) 0 ;
   53596           1 :   void *argp1 = 0 ;
   53597           1 :   int res1 = 0 ;
   53598           1 :   int nLen2 = 0 ;
   53599           1 :   double *pList2 = NULL ;
   53600           1 :   PyObject *swig_obj[1] ;
   53601             :   
   53602           1 :   {
   53603             :     /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
   53604           1 :     arg2 = &nLen2;
   53605           1 :     arg3 = &pList2;
   53606             :   }
   53607           1 :   if (!args) SWIG_fail;
   53608           1 :   swig_obj[0] = args;
   53609           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53610           1 :   if (!SWIG_IsOK(res1)) {
   53611           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53612             :   }
   53613           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53614           1 :   {
   53615           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53616           1 :     if ( bLocalUseExceptions ) {
   53617           1 :       pushErrorHandler();
   53618             :     }
   53619           1 :     {
   53620           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53621           1 :       GDALAlgorithmArgHS_GetDefaultAsDoubleList(arg1,arg2,(double const **)arg3);
   53622           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53623             :     }
   53624           1 :     if ( bLocalUseExceptions ) {
   53625           1 :       popErrorHandler();
   53626             :     }
   53627             : #ifndef SED_HACKS
   53628             :     if ( bLocalUseExceptions ) {
   53629             :       CPLErr eclass = CPLGetLastErrorType();
   53630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53632             :       }
   53633             :     }
   53634             : #endif
   53635             :   }
   53636           1 :   resultobj = SWIG_Py_Void();
   53637           1 :   {
   53638             :     /* %typemap(argout) (int *nLen, const double **pList ) */
   53639           1 :     Py_DECREF(resultobj);
   53640           1 :     PyObject *out = PyList_New( *arg2 );
   53641           1 :     if( !out ) {
   53642           0 :       SWIG_fail;
   53643             :     }
   53644           1 :     for( int i=0; i<*arg2; i++ ) {
   53645           0 :       PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
   53646           0 :       PyList_SetItem( out, i, val );
   53647             :     }
   53648           1 :     resultobj = out;
   53649             :   }
   53650           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; } }
   53651             :   return resultobj;
   53652             : fail:
   53653             :   return NULL;
   53654             : }
   53655             : 
   53656             : 
   53657           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHidden(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53658           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53659           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53660           1 :   void *argp1 = 0 ;
   53661           1 :   int res1 = 0 ;
   53662           1 :   PyObject *swig_obj[1] ;
   53663           1 :   bool result;
   53664             :   
   53665           1 :   if (!args) SWIG_fail;
   53666           1 :   swig_obj[0] = args;
   53667           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53668           1 :   if (!SWIG_IsOK(res1)) {
   53669           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHidden" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53670             :   }
   53671           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53672           1 :   {
   53673           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53674           1 :     if ( bLocalUseExceptions ) {
   53675           1 :       pushErrorHandler();
   53676             :     }
   53677           1 :     {
   53678           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53679           1 :       result = (bool)GDALAlgorithmArgHS_IsHidden(arg1);
   53680           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53681             :     }
   53682           1 :     if ( bLocalUseExceptions ) {
   53683           1 :       popErrorHandler();
   53684             :     }
   53685             : #ifndef SED_HACKS
   53686             :     if ( bLocalUseExceptions ) {
   53687             :       CPLErr eclass = CPLGetLastErrorType();
   53688             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53689             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53690             :       }
   53691             :     }
   53692             : #endif
   53693             :   }
   53694           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53695           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; } }
   53696             :   return resultobj;
   53697             : fail:
   53698             :   return NULL;
   53699             : }
   53700             : 
   53701             : 
   53702           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForCLI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53703           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53704           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53705           1 :   void *argp1 = 0 ;
   53706           1 :   int res1 = 0 ;
   53707           1 :   PyObject *swig_obj[1] ;
   53708           1 :   bool result;
   53709             :   
   53710           1 :   if (!args) SWIG_fail;
   53711           1 :   swig_obj[0] = args;
   53712           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53713           1 :   if (!SWIG_IsOK(res1)) {
   53714           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForCLI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53715             :   }
   53716           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53717           1 :   {
   53718           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53719           1 :     if ( bLocalUseExceptions ) {
   53720           1 :       pushErrorHandler();
   53721             :     }
   53722           1 :     {
   53723           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53724           1 :       result = (bool)GDALAlgorithmArgHS_IsHiddenForCLI(arg1);
   53725           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53726             :     }
   53727           1 :     if ( bLocalUseExceptions ) {
   53728           1 :       popErrorHandler();
   53729             :     }
   53730             : #ifndef SED_HACKS
   53731             :     if ( bLocalUseExceptions ) {
   53732             :       CPLErr eclass = CPLGetLastErrorType();
   53733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53735             :       }
   53736             :     }
   53737             : #endif
   53738             :   }
   53739           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53740           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; } }
   53741             :   return resultobj;
   53742             : fail:
   53743             :   return NULL;
   53744             : }
   53745             : 
   53746             : 
   53747           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForAPI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53748           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53749           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53750           1 :   void *argp1 = 0 ;
   53751           1 :   int res1 = 0 ;
   53752           1 :   PyObject *swig_obj[1] ;
   53753           1 :   bool result;
   53754             :   
   53755           1 :   if (!args) SWIG_fail;
   53756           1 :   swig_obj[0] = args;
   53757           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53758           1 :   if (!SWIG_IsOK(res1)) {
   53759           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForAPI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53760             :   }
   53761           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53762           1 :   {
   53763           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53764           1 :     if ( bLocalUseExceptions ) {
   53765           1 :       pushErrorHandler();
   53766             :     }
   53767           1 :     {
   53768           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53769           1 :       result = (bool)GDALAlgorithmArgHS_IsHiddenForAPI(arg1);
   53770           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53771             :     }
   53772           1 :     if ( bLocalUseExceptions ) {
   53773           1 :       popErrorHandler();
   53774             :     }
   53775             : #ifndef SED_HACKS
   53776             :     if ( bLocalUseExceptions ) {
   53777             :       CPLErr eclass = CPLGetLastErrorType();
   53778             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53779             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53780             :       }
   53781             :     }
   53782             : #endif
   53783             :   }
   53784           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53785           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; } }
   53786             :   return resultobj;
   53787             : fail:
   53788             :   return NULL;
   53789             : }
   53790             : 
   53791             : 
   53792           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53793           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53794           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53795           1 :   void *argp1 = 0 ;
   53796           1 :   int res1 = 0 ;
   53797           1 :   PyObject *swig_obj[1] ;
   53798           1 :   bool result;
   53799             :   
   53800           1 :   if (!args) SWIG_fail;
   53801           1 :   swig_obj[0] = args;
   53802           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53803           1 :   if (!SWIG_IsOK(res1)) {
   53804           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsInput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53805             :   }
   53806           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53807           1 :   {
   53808           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53809           1 :     if ( bLocalUseExceptions ) {
   53810           1 :       pushErrorHandler();
   53811             :     }
   53812           1 :     {
   53813           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53814           1 :       result = (bool)GDALAlgorithmArgHS_IsInput(arg1);
   53815           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53816             :     }
   53817           1 :     if ( bLocalUseExceptions ) {
   53818           1 :       popErrorHandler();
   53819             :     }
   53820             : #ifndef SED_HACKS
   53821             :     if ( bLocalUseExceptions ) {
   53822             :       CPLErr eclass = CPLGetLastErrorType();
   53823             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53824             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53825             :       }
   53826             :     }
   53827             : #endif
   53828             :   }
   53829           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53830           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; } }
   53831             :   return resultobj;
   53832             : fail:
   53833             :   return NULL;
   53834             : }
   53835             : 
   53836             : 
   53837        3580 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53838        3580 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53839        3580 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53840        3580 :   void *argp1 = 0 ;
   53841        3580 :   int res1 = 0 ;
   53842        3580 :   PyObject *swig_obj[1] ;
   53843        3580 :   bool result;
   53844             :   
   53845        3580 :   if (!args) SWIG_fail;
   53846        3580 :   swig_obj[0] = args;
   53847        3580 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53848        3580 :   if (!SWIG_IsOK(res1)) {
   53849           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsOutput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53850             :   }
   53851        3580 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53852        3580 :   {
   53853        3580 :     const int bLocalUseExceptions = GetUseExceptions();
   53854        3580 :     if ( bLocalUseExceptions ) {
   53855        3580 :       pushErrorHandler();
   53856             :     }
   53857        3580 :     {
   53858        3580 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53859        3580 :       result = (bool)GDALAlgorithmArgHS_IsOutput(arg1);
   53860        3580 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53861             :     }
   53862        3580 :     if ( bLocalUseExceptions ) {
   53863        3580 :       popErrorHandler();
   53864             :     }
   53865             : #ifndef SED_HACKS
   53866             :     if ( bLocalUseExceptions ) {
   53867             :       CPLErr eclass = CPLGetLastErrorType();
   53868             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53869             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53870             :       }
   53871             :     }
   53872             : #endif
   53873             :   }
   53874        3580 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53875        3580 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53876             :   return resultobj;
   53877             : fail:
   53878             :   return NULL;
   53879             : }
   53880             : 
   53881             : 
   53882           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53883           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53884           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53885           1 :   void *argp1 = 0 ;
   53886           1 :   int res1 = 0 ;
   53887           1 :   PyObject *swig_obj[1] ;
   53888           1 :   int result;
   53889             :   
   53890           1 :   if (!args) SWIG_fail;
   53891           1 :   swig_obj[0] = args;
   53892           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53893           1 :   if (!SWIG_IsOK(res1)) {
   53894           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53895             :   }
   53896           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53897           1 :   {
   53898           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53899           1 :     if ( bLocalUseExceptions ) {
   53900           1 :       pushErrorHandler();
   53901             :     }
   53902           1 :     {
   53903           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53904           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetType(arg1);
   53905           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53906             :     }
   53907           1 :     if ( bLocalUseExceptions ) {
   53908           1 :       popErrorHandler();
   53909             :     }
   53910             : #ifndef SED_HACKS
   53911             :     if ( bLocalUseExceptions ) {
   53912             :       CPLErr eclass = CPLGetLastErrorType();
   53913             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53914             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53915             :       }
   53916             :     }
   53917             : #endif
   53918             :   }
   53919           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53920           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; } }
   53921             :   return resultobj;
   53922             : fail:
   53923             :   return NULL;
   53924             : }
   53925             : 
   53926             : 
   53927           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetInputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53928           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53929           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53930           1 :   void *argp1 = 0 ;
   53931           1 :   int res1 = 0 ;
   53932           1 :   PyObject *swig_obj[1] ;
   53933           1 :   int result;
   53934             :   
   53935           1 :   if (!args) SWIG_fail;
   53936           1 :   swig_obj[0] = args;
   53937           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53938           1 :   if (!SWIG_IsOK(res1)) {
   53939           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetInputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53940             :   }
   53941           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53942           1 :   {
   53943           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53944           1 :     if ( bLocalUseExceptions ) {
   53945           1 :       pushErrorHandler();
   53946             :     }
   53947           1 :     {
   53948           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53949           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetInputFlags(arg1);
   53950           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53951             :     }
   53952           1 :     if ( bLocalUseExceptions ) {
   53953           1 :       popErrorHandler();
   53954             :     }
   53955             : #ifndef SED_HACKS
   53956             :     if ( bLocalUseExceptions ) {
   53957             :       CPLErr eclass = CPLGetLastErrorType();
   53958             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53959             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53960             :       }
   53961             :     }
   53962             : #endif
   53963             :   }
   53964           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53965           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; } }
   53966             :   return resultobj;
   53967             : fail:
   53968             :   return NULL;
   53969             : }
   53970             : 
   53971             : 
   53972           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetOutputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53973           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53974           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53975           1 :   void *argp1 = 0 ;
   53976           1 :   int res1 = 0 ;
   53977           1 :   PyObject *swig_obj[1] ;
   53978           1 :   int result;
   53979             :   
   53980           1 :   if (!args) SWIG_fail;
   53981           1 :   swig_obj[0] = args;
   53982           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53983           1 :   if (!SWIG_IsOK(res1)) {
   53984           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetOutputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53985             :   }
   53986           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53987           1 :   {
   53988           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53989           1 :     if ( bLocalUseExceptions ) {
   53990           1 :       pushErrorHandler();
   53991             :     }
   53992           1 :     {
   53993           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53994           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetOutputFlags(arg1);
   53995           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53996             :     }
   53997           1 :     if ( bLocalUseExceptions ) {
   53998           1 :       popErrorHandler();
   53999             :     }
   54000             : #ifndef SED_HACKS
   54001             :     if ( bLocalUseExceptions ) {
   54002             :       CPLErr eclass = CPLGetLastErrorType();
   54003             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54004             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54005             :       }
   54006             :     }
   54007             : #endif
   54008             :   }
   54009           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   54010           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; } }
   54011             :   return resultobj;
   54012             : fail:
   54013             :   return NULL;
   54014             : }
   54015             : 
   54016             : 
   54017           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMutualExclusionGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54018           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54019           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54020           1 :   void *argp1 = 0 ;
   54021           1 :   int res1 = 0 ;
   54022           1 :   PyObject *swig_obj[1] ;
   54023           1 :   char *result = 0 ;
   54024             :   
   54025           1 :   if (!args) SWIG_fail;
   54026           1 :   swig_obj[0] = args;
   54027           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54028           1 :   if (!SWIG_IsOK(res1)) {
   54029           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMutualExclusionGroup" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54030             :   }
   54031           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54032           1 :   {
   54033           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54034           1 :     if ( bLocalUseExceptions ) {
   54035           1 :       pushErrorHandler();
   54036             :     }
   54037           1 :     {
   54038           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54039           1 :       result = (char *)GDALAlgorithmArgHS_GetMutualExclusionGroup(arg1);
   54040           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54041             :     }
   54042           1 :     if ( bLocalUseExceptions ) {
   54043           1 :       popErrorHandler();
   54044             :     }
   54045             : #ifndef SED_HACKS
   54046             :     if ( bLocalUseExceptions ) {
   54047             :       CPLErr eclass = CPLGetLastErrorType();
   54048             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54049             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54050             :       }
   54051             :     }
   54052             : #endif
   54053             :   }
   54054           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54055           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; } }
   54056             :   return resultobj;
   54057             : fail:
   54058             :   return NULL;
   54059             : }
   54060             : 
   54061             : 
   54062           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54063           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54064           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54065           7 :   void *argp1 = 0 ;
   54066           7 :   int res1 = 0 ;
   54067           7 :   PyObject *swig_obj[1] ;
   54068           7 :   bool result;
   54069             :   
   54070           7 :   if (!args) SWIG_fail;
   54071           7 :   swig_obj[0] = args;
   54072           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54073           7 :   if (!SWIG_IsOK(res1)) {
   54074           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54075             :   }
   54076           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54077           7 :   {
   54078           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54079           7 :     if ( bLocalUseExceptions ) {
   54080           7 :       pushErrorHandler();
   54081             :     }
   54082           7 :     {
   54083           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54084           7 :       result = (bool)GDALAlgorithmArgHS_GetAsBoolean(arg1);
   54085           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54086             :     }
   54087           7 :     if ( bLocalUseExceptions ) {
   54088           7 :       popErrorHandler();
   54089             :     }
   54090             : #ifndef SED_HACKS
   54091             :     if ( bLocalUseExceptions ) {
   54092             :       CPLErr eclass = CPLGetLastErrorType();
   54093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54095             :       }
   54096             :     }
   54097             : #endif
   54098             :   }
   54099           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54100           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; } }
   54101             :   return resultobj;
   54102             : fail:
   54103             :   return NULL;
   54104             : }
   54105             : 
   54106             : 
   54107         292 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54108         292 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54109         292 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54110         292 :   void *argp1 = 0 ;
   54111         292 :   int res1 = 0 ;
   54112         292 :   PyObject *swig_obj[1] ;
   54113         292 :   char *result = 0 ;
   54114             :   
   54115         292 :   if (!args) SWIG_fail;
   54116         292 :   swig_obj[0] = args;
   54117         292 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54118         292 :   if (!SWIG_IsOK(res1)) {
   54119           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54120             :   }
   54121         292 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54122         292 :   {
   54123         292 :     const int bLocalUseExceptions = GetUseExceptions();
   54124         292 :     if ( bLocalUseExceptions ) {
   54125         292 :       pushErrorHandler();
   54126             :     }
   54127         292 :     {
   54128         292 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54129         292 :       result = (char *)GDALAlgorithmArgHS_GetAsString(arg1);
   54130         292 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54131             :     }
   54132         292 :     if ( bLocalUseExceptions ) {
   54133         292 :       popErrorHandler();
   54134             :     }
   54135             : #ifndef SED_HACKS
   54136             :     if ( bLocalUseExceptions ) {
   54137             :       CPLErr eclass = CPLGetLastErrorType();
   54138             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54139             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54140             :       }
   54141             :     }
   54142             : #endif
   54143             :   }
   54144         292 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54145         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; } }
   54146             :   return resultobj;
   54147             : fail:
   54148             :   return NULL;
   54149             : }
   54150             : 
   54151             : 
   54152           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54153           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54154           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54155           7 :   void *argp1 = 0 ;
   54156           7 :   int res1 = 0 ;
   54157           7 :   PyObject *swig_obj[1] ;
   54158           7 :   int result;
   54159             :   
   54160           7 :   if (!args) SWIG_fail;
   54161           7 :   swig_obj[0] = args;
   54162           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54163           7 :   if (!SWIG_IsOK(res1)) {
   54164           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54165             :   }
   54166           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54167           7 :   {
   54168           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54169           7 :     if ( bLocalUseExceptions ) {
   54170           7 :       pushErrorHandler();
   54171             :     }
   54172           7 :     {
   54173           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54174           7 :       result = (int)GDALAlgorithmArgHS_GetAsInteger(arg1);
   54175           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54176             :     }
   54177           7 :     if ( bLocalUseExceptions ) {
   54178           7 :       popErrorHandler();
   54179             :     }
   54180             : #ifndef SED_HACKS
   54181             :     if ( bLocalUseExceptions ) {
   54182             :       CPLErr eclass = CPLGetLastErrorType();
   54183             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54184             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54185             :       }
   54186             :     }
   54187             : #endif
   54188             :   }
   54189           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   54190           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; } }
   54191             :   return resultobj;
   54192             : fail:
   54193             :   return NULL;
   54194             : }
   54195             : 
   54196             : 
   54197           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54198           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54199           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54200           7 :   void *argp1 = 0 ;
   54201           7 :   int res1 = 0 ;
   54202           7 :   PyObject *swig_obj[1] ;
   54203           7 :   double result;
   54204             :   
   54205           7 :   if (!args) SWIG_fail;
   54206           7 :   swig_obj[0] = args;
   54207           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54208           7 :   if (!SWIG_IsOK(res1)) {
   54209           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54210             :   }
   54211           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54212           7 :   {
   54213           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54214           7 :     if ( bLocalUseExceptions ) {
   54215           7 :       pushErrorHandler();
   54216             :     }
   54217           7 :     {
   54218           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54219           7 :       result = (double)GDALAlgorithmArgHS_GetAsDouble(arg1);
   54220           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54221             :     }
   54222           7 :     if ( bLocalUseExceptions ) {
   54223           7 :       popErrorHandler();
   54224             :     }
   54225             : #ifndef SED_HACKS
   54226             :     if ( bLocalUseExceptions ) {
   54227             :       CPLErr eclass = CPLGetLastErrorType();
   54228             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54229             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54230             :       }
   54231             :     }
   54232             : #endif
   54233             :   }
   54234           7 :   resultobj = SWIG_From_double(static_cast< double >(result));
   54235           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; } }
   54236             :   return resultobj;
   54237             : fail:
   54238             :   return NULL;
   54239             : }
   54240             : 
   54241             : 
   54242        1819 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54243        1819 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54244        1819 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54245        1819 :   void *argp1 = 0 ;
   54246        1819 :   int res1 = 0 ;
   54247        1819 :   PyObject *swig_obj[1] ;
   54248        1819 :   GDALArgDatasetValueHS *result = 0 ;
   54249             :   
   54250        1819 :   if (!args) SWIG_fail;
   54251        1819 :   swig_obj[0] = args;
   54252        1819 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54253        1819 :   if (!SWIG_IsOK(res1)) {
   54254           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54255             :   }
   54256        1819 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54257        1819 :   {
   54258        1819 :     const int bLocalUseExceptions = GetUseExceptions();
   54259        1819 :     if ( bLocalUseExceptions ) {
   54260        1817 :       pushErrorHandler();
   54261             :     }
   54262        1819 :     {
   54263        1819 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54264        1819 :       result = (GDALArgDatasetValueHS *)GDALAlgorithmArgHS_GetAsDatasetValue(arg1);
   54265        1819 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54266             :     }
   54267        1819 :     if ( bLocalUseExceptions ) {
   54268        1817 :       popErrorHandler();
   54269             :     }
   54270             : #ifndef SED_HACKS
   54271             :     if ( bLocalUseExceptions ) {
   54272             :       CPLErr eclass = CPLGetLastErrorType();
   54273             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54274             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54275             :       }
   54276             :     }
   54277             : #endif
   54278             :   }
   54279        1819 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_OWN |  0 );
   54280        1821 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54281             :   return resultobj;
   54282             : fail:
   54283             :   return NULL;
   54284             : }
   54285             : 
   54286             : 
   54287           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54288           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54289           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54290           1 :   void *argp1 = 0 ;
   54291           1 :   int res1 = 0 ;
   54292           1 :   PyObject *swig_obj[1] ;
   54293           1 :   char **result = 0 ;
   54294             :   
   54295           1 :   if (!args) SWIG_fail;
   54296           1 :   swig_obj[0] = args;
   54297           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54298           1 :   if (!SWIG_IsOK(res1)) {
   54299           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54300             :   }
   54301           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54302           1 :   {
   54303           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54304           1 :     if ( bLocalUseExceptions ) {
   54305           1 :       pushErrorHandler();
   54306             :     }
   54307           1 :     {
   54308           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54309           1 :       result = (char **)GDALAlgorithmArgHS_GetAsStringList(arg1);
   54310           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54311             :     }
   54312           1 :     if ( bLocalUseExceptions ) {
   54313           1 :       popErrorHandler();
   54314             :     }
   54315             : #ifndef SED_HACKS
   54316             :     if ( bLocalUseExceptions ) {
   54317             :       CPLErr eclass = CPLGetLastErrorType();
   54318             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54319             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54320             :       }
   54321             :     }
   54322             : #endif
   54323             :   }
   54324           1 :   {
   54325             :     /* %typemap(out) char **CSL -> ( string ) */
   54326           1 :     bool bErr = false;
   54327           1 :     resultobj = CSLToList(result, &bErr);
   54328           1 :     CSLDestroy(result);
   54329           1 :     if( bErr ) {
   54330           0 :       SWIG_fail;
   54331             :     }
   54332             :   }
   54333           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; } }
   54334             :   return resultobj;
   54335             : fail:
   54336             :   return NULL;
   54337             : }
   54338             : 
   54339             : 
   54340           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54341           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54342           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54343           7 :   int *arg2 = (int *) 0 ;
   54344           7 :   int **arg3 = (int **) 0 ;
   54345           7 :   void *argp1 = 0 ;
   54346           7 :   int res1 = 0 ;
   54347           7 :   int nLen2 = 0 ;
   54348           7 :   int *pList2 = NULL ;
   54349           7 :   PyObject *swig_obj[1] ;
   54350             :   
   54351           7 :   {
   54352             :     /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
   54353           7 :     arg2 = &nLen2;
   54354           7 :     arg3 = &pList2;
   54355             :   }
   54356           7 :   if (!args) SWIG_fail;
   54357           7 :   swig_obj[0] = args;
   54358           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54359           7 :   if (!SWIG_IsOK(res1)) {
   54360           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54361             :   }
   54362           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54363           7 :   {
   54364           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54365           7 :     if ( bLocalUseExceptions ) {
   54366           7 :       pushErrorHandler();
   54367             :     }
   54368           7 :     {
   54369           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54370           7 :       GDALAlgorithmArgHS_GetAsIntegerList(arg1,arg2,(int const **)arg3);
   54371           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54372             :     }
   54373           7 :     if ( bLocalUseExceptions ) {
   54374           7 :       popErrorHandler();
   54375             :     }
   54376             : #ifndef SED_HACKS
   54377             :     if ( bLocalUseExceptions ) {
   54378             :       CPLErr eclass = CPLGetLastErrorType();
   54379             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54380             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54381             :       }
   54382             :     }
   54383             : #endif
   54384             :   }
   54385           7 :   resultobj = SWIG_Py_Void();
   54386           7 :   {
   54387             :     /* %typemap(argout) (int *nLen, const int **pList ) */
   54388           7 :     Py_DECREF(resultobj);
   54389           7 :     PyObject *out = PyList_New( *arg2 );
   54390           7 :     if( !out ) {
   54391           0 :       SWIG_fail;
   54392             :     }
   54393          16 :     for( int i=0; i<*arg2; i++ ) {
   54394           9 :       PyObject *val = PyInt_FromLong( (*arg3)[i] );
   54395           9 :       PyList_SetItem( out, i, val );
   54396             :     }
   54397           7 :     resultobj = out;
   54398             :   }
   54399           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; } }
   54400             :   return resultobj;
   54401             : fail:
   54402             :   return NULL;
   54403             : }
   54404             : 
   54405             : 
   54406           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54407           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54408           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54409           7 :   int *arg2 = (int *) 0 ;
   54410           7 :   double **arg3 = (double **) 0 ;
   54411           7 :   void *argp1 = 0 ;
   54412           7 :   int res1 = 0 ;
   54413           7 :   int nLen2 = 0 ;
   54414           7 :   double *pList2 = NULL ;
   54415           7 :   PyObject *swig_obj[1] ;
   54416             :   
   54417           7 :   {
   54418             :     /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
   54419           7 :     arg2 = &nLen2;
   54420           7 :     arg3 = &pList2;
   54421             :   }
   54422           7 :   if (!args) SWIG_fail;
   54423           7 :   swig_obj[0] = args;
   54424           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54425           7 :   if (!SWIG_IsOK(res1)) {
   54426           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54427             :   }
   54428           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54429           7 :   {
   54430           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54431           7 :     if ( bLocalUseExceptions ) {
   54432           7 :       pushErrorHandler();
   54433             :     }
   54434           7 :     {
   54435           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54436           7 :       GDALAlgorithmArgHS_GetAsDoubleList(arg1,arg2,(double const **)arg3);
   54437           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54438             :     }
   54439           7 :     if ( bLocalUseExceptions ) {
   54440           7 :       popErrorHandler();
   54441             :     }
   54442             : #ifndef SED_HACKS
   54443             :     if ( bLocalUseExceptions ) {
   54444             :       CPLErr eclass = CPLGetLastErrorType();
   54445             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54446             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54447             :       }
   54448             :     }
   54449             : #endif
   54450             :   }
   54451           7 :   resultobj = SWIG_Py_Void();
   54452           7 :   {
   54453             :     /* %typemap(argout) (int *nLen, const double **pList ) */
   54454           7 :     Py_DECREF(resultobj);
   54455           7 :     PyObject *out = PyList_New( *arg2 );
   54456           7 :     if( !out ) {
   54457           0 :       SWIG_fail;
   54458             :     }
   54459          16 :     for( int i=0; i<*arg2; i++ ) {
   54460           9 :       PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
   54461           9 :       PyList_SetItem( out, i, val );
   54462             :     }
   54463           7 :     resultobj = out;
   54464             :   }
   54465           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; } }
   54466             :   return resultobj;
   54467             : fail:
   54468             :   return NULL;
   54469             : }
   54470             : 
   54471             : 
   54472         513 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54473         513 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54474         513 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54475         513 :   bool arg2 ;
   54476         513 :   void *argp1 = 0 ;
   54477         513 :   int res1 = 0 ;
   54478         513 :   bool val2 ;
   54479         513 :   int ecode2 = 0 ;
   54480         513 :   PyObject *swig_obj[2] ;
   54481         513 :   bool result;
   54482             :   
   54483         513 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsBoolean", 2, 2, swig_obj)) SWIG_fail;
   54484         513 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54485         513 :   if (!SWIG_IsOK(res1)) {
   54486           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54487             :   }
   54488         513 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54489         513 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   54490         512 :   if (!SWIG_IsOK(ecode2)) {
   54491           1 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "2"" of type '" "bool""'");
   54492             :   } 
   54493         512 :   arg2 = static_cast< bool >(val2);
   54494         512 :   {
   54495         512 :     const int bLocalUseExceptions = GetUseExceptions();
   54496         512 :     if ( bLocalUseExceptions ) {
   54497         512 :       pushErrorHandler();
   54498             :     }
   54499         512 :     {
   54500         512 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54501         512 :       result = (bool)GDALAlgorithmArgHS_SetAsBoolean(arg1,arg2);
   54502         512 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54503             :     }
   54504         512 :     if ( bLocalUseExceptions ) {
   54505         512 :       popErrorHandler();
   54506             :     }
   54507             : #ifndef SED_HACKS
   54508             :     if ( bLocalUseExceptions ) {
   54509             :       CPLErr eclass = CPLGetLastErrorType();
   54510             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54511             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54512             :       }
   54513             :     }
   54514             : #endif
   54515             :   }
   54516         512 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54517         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; } }
   54518             :   return resultobj;
   54519             : fail:
   54520             :   return NULL;
   54521             : }
   54522             : 
   54523             : 
   54524        1634 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54525        1634 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54526        1634 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54527        1634 :   char *arg2 = (char *) 0 ;
   54528        1634 :   void *argp1 = 0 ;
   54529        1634 :   int res1 = 0 ;
   54530        1634 :   int res2 ;
   54531        1634 :   char *buf2 = 0 ;
   54532        1634 :   int alloc2 = 0 ;
   54533        1634 :   PyObject *swig_obj[2] ;
   54534        1634 :   bool result;
   54535             :   
   54536        1634 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsString", 2, 2, swig_obj)) SWIG_fail;
   54537        1634 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54538        1634 :   if (!SWIG_IsOK(res1)) {
   54539           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54540             :   }
   54541        1634 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54542        1634 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   54543        1634 :   if (!SWIG_IsOK(res2)) {
   54544           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsString" "', argument " "2"" of type '" "char const *""'");
   54545             :   }
   54546        1634 :   arg2 = reinterpret_cast< char * >(buf2);
   54547        1634 :   {
   54548        1634 :     const int bLocalUseExceptions = GetUseExceptions();
   54549        1634 :     if ( bLocalUseExceptions ) {
   54550        1634 :       pushErrorHandler();
   54551             :     }
   54552        1634 :     {
   54553        1634 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54554        1634 :       result = (bool)GDALAlgorithmArgHS_SetAsString(arg1,(char const *)arg2);
   54555        1634 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54556             :     }
   54557        1634 :     if ( bLocalUseExceptions ) {
   54558        1634 :       popErrorHandler();
   54559             :     }
   54560             : #ifndef SED_HACKS
   54561             :     if ( bLocalUseExceptions ) {
   54562             :       CPLErr eclass = CPLGetLastErrorType();
   54563             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54564             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54565             :       }
   54566             :     }
   54567             : #endif
   54568             :   }
   54569        1634 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54570        1634 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54571        1692 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54572             :   return resultobj;
   54573           0 : fail:
   54574           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54575             :   return NULL;
   54576             : }
   54577             : 
   54578             : 
   54579         255 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54580         255 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54581         255 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54582         255 :   int arg2 ;
   54583         255 :   void *argp1 = 0 ;
   54584         255 :   int res1 = 0 ;
   54585         255 :   int val2 ;
   54586         255 :   int ecode2 = 0 ;
   54587         255 :   PyObject *swig_obj[2] ;
   54588         255 :   bool result;
   54589             :   
   54590         255 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsInteger", 2, 2, swig_obj)) SWIG_fail;
   54591         255 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54592         255 :   if (!SWIG_IsOK(res1)) {
   54593           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54594             :   }
   54595         255 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54596         255 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   54597         255 :   if (!SWIG_IsOK(ecode2)) {
   54598           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "2"" of type '" "int""'");
   54599             :   } 
   54600         255 :   arg2 = static_cast< int >(val2);
   54601         255 :   {
   54602         255 :     const int bLocalUseExceptions = GetUseExceptions();
   54603         255 :     if ( bLocalUseExceptions ) {
   54604         255 :       pushErrorHandler();
   54605             :     }
   54606         255 :     {
   54607         255 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54608         255 :       result = (bool)GDALAlgorithmArgHS_SetAsInteger(arg1,arg2);
   54609         255 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54610             :     }
   54611         255 :     if ( bLocalUseExceptions ) {
   54612         255 :       popErrorHandler();
   54613             :     }
   54614             : #ifndef SED_HACKS
   54615             :     if ( bLocalUseExceptions ) {
   54616             :       CPLErr eclass = CPLGetLastErrorType();
   54617             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54618             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54619             :       }
   54620             :     }
   54621             : #endif
   54622             :   }
   54623         255 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54624         259 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54625             :   return resultobj;
   54626             : fail:
   54627             :   return NULL;
   54628             : }
   54629             : 
   54630             : 
   54631         215 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54632         215 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54633         215 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54634         215 :   double arg2 ;
   54635         215 :   void *argp1 = 0 ;
   54636         215 :   int res1 = 0 ;
   54637         215 :   double val2 ;
   54638         215 :   int ecode2 = 0 ;
   54639         215 :   PyObject *swig_obj[2] ;
   54640         215 :   bool result;
   54641             :   
   54642         215 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDouble", 2, 2, swig_obj)) SWIG_fail;
   54643         215 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54644         215 :   if (!SWIG_IsOK(res1)) {
   54645           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54646             :   }
   54647         215 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54648         215 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   54649         215 :   if (!SWIG_IsOK(ecode2)) {
   54650           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "2"" of type '" "double""'");
   54651             :   } 
   54652         215 :   arg2 = static_cast< double >(val2);
   54653         215 :   {
   54654         215 :     const int bLocalUseExceptions = GetUseExceptions();
   54655         215 :     if ( bLocalUseExceptions ) {
   54656         215 :       pushErrorHandler();
   54657             :     }
   54658         215 :     {
   54659         215 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54660         215 :       result = (bool)GDALAlgorithmArgHS_SetAsDouble(arg1,arg2);
   54661         215 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54662             :     }
   54663         215 :     if ( bLocalUseExceptions ) {
   54664         215 :       popErrorHandler();
   54665             :     }
   54666             : #ifndef SED_HACKS
   54667             :     if ( bLocalUseExceptions ) {
   54668             :       CPLErr eclass = CPLGetLastErrorType();
   54669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54671             :       }
   54672             :     }
   54673             : #endif
   54674             :   }
   54675         215 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54676         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; } }
   54677             :   return resultobj;
   54678             : fail:
   54679             :   return NULL;
   54680             : }
   54681             : 
   54682             : 
   54683           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54684           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54685           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54686           1 :   GDALArgDatasetValueHS *arg2 = (GDALArgDatasetValueHS *) 0 ;
   54687           1 :   void *argp1 = 0 ;
   54688           1 :   int res1 = 0 ;
   54689           1 :   void *argp2 = 0 ;
   54690           1 :   int res2 = 0 ;
   54691           1 :   PyObject *swig_obj[2] ;
   54692           1 :   bool result;
   54693             :   
   54694           1 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDatasetValue", 2, 2, swig_obj)) SWIG_fail;
   54695           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54696           1 :   if (!SWIG_IsOK(res1)) {
   54697           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54698             :   }
   54699           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54700           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   54701           1 :   if (!SWIG_IsOK(res2)) {
   54702           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "2"" of type '" "GDALArgDatasetValueHS *""'"); 
   54703             :   }
   54704           1 :   arg2 = reinterpret_cast< GDALArgDatasetValueHS * >(argp2);
   54705           1 :   {
   54706           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54707           1 :     if ( bLocalUseExceptions ) {
   54708           1 :       pushErrorHandler();
   54709             :     }
   54710           1 :     {
   54711           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54712           1 :       result = (bool)GDALAlgorithmArgHS_SetAsDatasetValue(arg1,arg2);
   54713           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54714             :     }
   54715           1 :     if ( bLocalUseExceptions ) {
   54716           1 :       popErrorHandler();
   54717             :     }
   54718             : #ifndef SED_HACKS
   54719             :     if ( bLocalUseExceptions ) {
   54720             :       CPLErr eclass = CPLGetLastErrorType();
   54721             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54722             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54723             :       }
   54724             :     }
   54725             : #endif
   54726             :   }
   54727           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54728           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; } }
   54729             :   return resultobj;
   54730             : fail:
   54731             :   return NULL;
   54732             : }
   54733             : 
   54734             : 
   54735         357 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54736         357 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54737         357 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54738         357 :   char **arg2 = (char **) 0 ;
   54739         357 :   void *argp1 = 0 ;
   54740         357 :   int res1 = 0 ;
   54741         357 :   PyObject *swig_obj[2] ;
   54742         357 :   bool result;
   54743             :   
   54744         357 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsStringList", 2, 2, swig_obj)) SWIG_fail;
   54745         357 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54746         357 :   if (!SWIG_IsOK(res1)) {
   54747           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54748             :   }
   54749         357 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54750         357 :   {
   54751             :     /* %typemap(in) char **dict */
   54752         357 :     arg2 = NULL;
   54753         357 :     if ( PySequence_Check( swig_obj[1] ) ) {
   54754         357 :       int bErr = FALSE;
   54755         357 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   54756         357 :       if ( bErr )
   54757             :       {
   54758           0 :         SWIG_fail;
   54759             :       }
   54760             :     }
   54761           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   54762           0 :       int bErr = FALSE;
   54763           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   54764           0 :       if ( bErr )
   54765             :       {
   54766           0 :         SWIG_fail;
   54767             :       }
   54768             :     }
   54769             :     else {
   54770           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   54771           0 :       SWIG_fail;
   54772             :     }
   54773             :   }
   54774         357 :   {
   54775         357 :     const int bLocalUseExceptions = GetUseExceptions();
   54776         357 :     if ( bLocalUseExceptions ) {
   54777         356 :       pushErrorHandler();
   54778             :     }
   54779         357 :     {
   54780         357 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54781         357 :       result = (bool)GDALAlgorithmArgHS_SetAsStringList(arg1,arg2);
   54782         357 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54783             :     }
   54784         357 :     if ( bLocalUseExceptions ) {
   54785         356 :       popErrorHandler();
   54786             :     }
   54787             : #ifndef SED_HACKS
   54788             :     if ( bLocalUseExceptions ) {
   54789             :       CPLErr eclass = CPLGetLastErrorType();
   54790             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54791             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54792             :       }
   54793             :     }
   54794             : #endif
   54795             :   }
   54796         357 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54797         357 :   {
   54798             :     /* %typemap(freearg) char **dict */
   54799         357 :     CSLDestroy( arg2 );
   54800             :   }
   54801         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; } }
   54802             :   return resultobj;
   54803           0 : fail:
   54804           0 :   {
   54805             :     /* %typemap(freearg) char **dict */
   54806           0 :     CSLDestroy( arg2 );
   54807             :   }
   54808             :   return NULL;
   54809             : }
   54810             : 
   54811             : 
   54812          62 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54813          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54814          62 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54815          62 :   int arg2 ;
   54816          62 :   int *arg3 = (int *) 0 ;
   54817          62 :   void *argp1 = 0 ;
   54818          62 :   int res1 = 0 ;
   54819          62 :   PyObject *swig_obj[2] ;
   54820          62 :   bool result;
   54821             :   
   54822          62 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsIntegerList", 2, 2, swig_obj)) SWIG_fail;
   54823          62 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54824          62 :   if (!SWIG_IsOK(res1)) {
   54825           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54826             :   }
   54827          62 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54828          62 :   {
   54829             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   54830          62 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   54831          62 :     if( arg2 < 0 ) {
   54832           2 :       SWIG_fail;
   54833             :     }
   54834             :   }
   54835          60 :   {
   54836          60 :     const int bLocalUseExceptions = GetUseExceptions();
   54837          60 :     if ( bLocalUseExceptions ) {
   54838          60 :       pushErrorHandler();
   54839             :     }
   54840          60 :     {
   54841          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54842          60 :       result = (bool)GDALAlgorithmArgHS_SetAsIntegerList(arg1,arg2,arg3);
   54843          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54844             :     }
   54845          60 :     if ( bLocalUseExceptions ) {
   54846          60 :       popErrorHandler();
   54847             :     }
   54848             : #ifndef SED_HACKS
   54849             :     if ( bLocalUseExceptions ) {
   54850             :       CPLErr eclass = CPLGetLastErrorType();
   54851             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54852             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54853             :       }
   54854             :     }
   54855             : #endif
   54856             :   }
   54857          60 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54858          60 :   {
   54859             :     /* %typemap(freearg) (int nList, int* pList) */
   54860          60 :     free(arg3);
   54861             :   }
   54862          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; } }
   54863             :   return resultobj;
   54864           2 : fail:
   54865           2 :   {
   54866             :     /* %typemap(freearg) (int nList, int* pList) */
   54867           2 :     free(arg3);
   54868             :   }
   54869           2 :   return NULL;
   54870             : }
   54871             : 
   54872             : 
   54873         127 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54874         127 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54875         127 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54876         127 :   int arg2 ;
   54877         127 :   double *arg3 = (double *) 0 ;
   54878         127 :   void *argp1 = 0 ;
   54879         127 :   int res1 = 0 ;
   54880         127 :   PyObject *swig_obj[2] ;
   54881         127 :   bool result;
   54882             :   
   54883         127 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDoubleList", 2, 2, swig_obj)) SWIG_fail;
   54884         127 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54885         127 :   if (!SWIG_IsOK(res1)) {
   54886           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54887             :   }
   54888         127 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54889         127 :   {
   54890             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   54891         127 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   54892         127 :     if( arg2 < 0 ) {
   54893           2 :       SWIG_fail;
   54894             :     }
   54895             :   }
   54896         125 :   {
   54897         125 :     const int bLocalUseExceptions = GetUseExceptions();
   54898         125 :     if ( bLocalUseExceptions ) {
   54899         125 :       pushErrorHandler();
   54900             :     }
   54901         125 :     {
   54902         125 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54903         125 :       result = (bool)GDALAlgorithmArgHS_SetAsDoubleList(arg1,arg2,arg3);
   54904         125 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54905             :     }
   54906         125 :     if ( bLocalUseExceptions ) {
   54907         125 :       popErrorHandler();
   54908             :     }
   54909             : #ifndef SED_HACKS
   54910             :     if ( bLocalUseExceptions ) {
   54911             :       CPLErr eclass = CPLGetLastErrorType();
   54912             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54913             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54914             :       }
   54915             :     }
   54916             : #endif
   54917             :   }
   54918         125 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54919         125 :   {
   54920             :     /* %typemap(freearg) (int nList, double* pList) */
   54921         125 :     free(arg3);
   54922             :   }
   54923         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; } }
   54924             :   return resultobj;
   54925           2 : fail:
   54926           2 :   {
   54927             :     /* %typemap(freearg) (int nList, double* pList) */
   54928           2 :     free(arg3);
   54929             :   }
   54930           2 :   return NULL;
   54931             : }
   54932             : 
   54933             : 
   54934           0 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54935           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54936           0 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54937           0 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   54938           0 :   void *argp1 = 0 ;
   54939           0 :   int res1 = 0 ;
   54940           0 :   void *argp2 = 0 ;
   54941           0 :   int res2 = 0 ;
   54942           0 :   PyObject *swig_obj[2] ;
   54943           0 :   bool result;
   54944             :   
   54945           0 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   54946           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54947           0 :   if (!SWIG_IsOK(res1)) {
   54948           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDataset" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54949             :   }
   54950           0 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54951           0 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   54952           0 :   if (!SWIG_IsOK(res2)) {
   54953           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   54954             :   }
   54955           0 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   54956           0 :   {
   54957           0 :     const int bLocalUseExceptions = GetUseExceptions();
   54958           0 :     if ( bLocalUseExceptions ) {
   54959           0 :       pushErrorHandler();
   54960             :     }
   54961           0 :     {
   54962           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54963           0 :       result = (bool)GDALAlgorithmArgHS_SetDataset(arg1,arg2);
   54964           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54965             :     }
   54966           0 :     if ( bLocalUseExceptions ) {
   54967           0 :       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           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54979           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; } }
   54980             :   return resultobj;
   54981             : fail:
   54982             :   return NULL;
   54983             : }
   54984             : 
   54985             : 
   54986         793 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54987         793 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54988         793 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54989         793 :   int arg2 ;
   54990         793 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   54991         793 :   void *argp1 = 0 ;
   54992         793 :   int res1 = 0 ;
   54993         793 :   PyObject *swig_obj[2] ;
   54994         793 :   bool result;
   54995             :   
   54996         793 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasets", 2, 2, swig_obj)) SWIG_fail;
   54997         793 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54998         793 :   if (!SWIG_IsOK(res1)) {
   54999           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasets" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   55000             :   }
   55001         793 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   55002         793 :   {
   55003             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   55004         793 :     if ( !PySequence_Check(swig_obj[1]) ) {
   55005           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   55006           0 :       SWIG_fail;
   55007             :     }
   55008         793 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   55009         793 :     if( size > (Py_ssize_t)INT_MAX ) {
   55010           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   55011           0 :       SWIG_fail;
   55012             :     }
   55013         793 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   55014           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   55015           0 :       SWIG_fail;
   55016             :     }
   55017         793 :     arg2 = (int)size;
   55018         793 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   55019         793 :     if( !arg3) {
   55020           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   55021           0 :       SWIG_fail;
   55022             :     }
   55023             :     
   55024        1611 :     for( int i = 0; i<arg2; i++ ) {
   55025         818 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   55026         818 :       GDALDatasetShadow* rawobjectpointer = NULL;
   55027         818 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   55028         818 :       if (!rawobjectpointer) {
   55029           0 :         Py_DECREF(o);
   55030           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   55031           0 :         SWIG_fail;
   55032             :       }
   55033         818 :       arg3[i] = rawobjectpointer;
   55034         818 :       Py_DECREF(o);
   55035             :       
   55036             :     }
   55037             :   }
   55038         793 :   {
   55039         793 :     const int bLocalUseExceptions = GetUseExceptions();
   55040         793 :     if ( bLocalUseExceptions ) {
   55041         793 :       pushErrorHandler();
   55042             :     }
   55043         793 :     {
   55044         793 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55045         793 :       result = (bool)GDALAlgorithmArgHS_SetDatasets(arg1,arg2,arg3);
   55046         793 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55047             :     }
   55048         793 :     if ( bLocalUseExceptions ) {
   55049         793 :       popErrorHandler();
   55050             :     }
   55051             : #ifndef SED_HACKS
   55052             :     if ( bLocalUseExceptions ) {
   55053             :       CPLErr eclass = CPLGetLastErrorType();
   55054             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55055             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55056             :       }
   55057             :     }
   55058             : #endif
   55059             :   }
   55060         793 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55061         793 :   {
   55062             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   55063         793 :     CPLFree( arg3 );
   55064             :   }
   55065         795 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55066             :   return resultobj;
   55067           0 : fail:
   55068           0 :   {
   55069             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   55070           0 :     CPLFree( arg3 );
   55071             :   }
   55072             :   return NULL;
   55073             : }
   55074             : 
   55075             : 
   55076         485 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasetNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55077         485 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55078         485 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   55079         485 :   char **arg2 = (char **) 0 ;
   55080         485 :   void *argp1 = 0 ;
   55081         485 :   int res1 = 0 ;
   55082         485 :   PyObject *swig_obj[2] ;
   55083         485 :   bool result;
   55084             :   
   55085         485 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasetNames", 2, 2, swig_obj)) SWIG_fail;
   55086         485 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   55087         485 :   if (!SWIG_IsOK(res1)) {
   55088           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasetNames" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   55089             :   }
   55090         485 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   55091         485 :   {
   55092             :     /* %typemap(in) char **dict */
   55093         485 :     arg2 = NULL;
   55094         485 :     if ( PySequence_Check( swig_obj[1] ) ) {
   55095         485 :       int bErr = FALSE;
   55096         485 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   55097         485 :       if ( bErr )
   55098             :       {
   55099           0 :         SWIG_fail;
   55100             :       }
   55101             :     }
   55102           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   55103           0 :       int bErr = FALSE;
   55104           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   55105           0 :       if ( bErr )
   55106             :       {
   55107           0 :         SWIG_fail;
   55108             :       }
   55109             :     }
   55110             :     else {
   55111           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   55112           0 :       SWIG_fail;
   55113             :     }
   55114             :   }
   55115         485 :   {
   55116         485 :     const int bLocalUseExceptions = GetUseExceptions();
   55117         485 :     if ( bLocalUseExceptions ) {
   55118         485 :       pushErrorHandler();
   55119             :     }
   55120         485 :     {
   55121         485 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55122         485 :       result = (bool)GDALAlgorithmArgHS_SetDatasetNames(arg1,arg2);
   55123         485 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55124             :     }
   55125         485 :     if ( bLocalUseExceptions ) {
   55126         485 :       popErrorHandler();
   55127             :     }
   55128             : #ifndef SED_HACKS
   55129             :     if ( bLocalUseExceptions ) {
   55130             :       CPLErr eclass = CPLGetLastErrorType();
   55131             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55132             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55133             :       }
   55134             :     }
   55135             : #endif
   55136             :   }
   55137         485 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55138         485 :   {
   55139             :     /* %typemap(freearg) char **dict */
   55140         485 :     CSLDestroy( arg2 );
   55141             :   }
   55142         485 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55143             :   return resultobj;
   55144           0 : fail:
   55145           0 :   {
   55146             :     /* %typemap(freearg) char **dict */
   55147           0 :     CSLDestroy( arg2 );
   55148             :   }
   55149             :   return NULL;
   55150             : }
   55151             : 
   55152             : 
   55153         277 : SWIGINTERN PyObject *AlgorithmArg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55154         277 :   PyObject *obj;
   55155         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   55156         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_NewClientData(obj));
   55157         277 :   return SWIG_Py_Void();
   55158             : }
   55159             : 
   55160        4733 : SWIGINTERN PyObject *_wrap_delete_Algorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55161        4733 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55162        4733 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55163        4733 :   void *argp1 = 0 ;
   55164        4733 :   int res1 = 0 ;
   55165        4733 :   PyObject *swig_obj[1] ;
   55166             :   
   55167        4733 :   if (!args) SWIG_fail;
   55168        4733 :   swig_obj[0] = args;
   55169        4733 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_DISOWN |  0 );
   55170        4733 :   if (!SWIG_IsOK(res1)) {
   55171           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Algorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55172             :   }
   55173        4733 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55174        4733 :   {
   55175        4733 :     const int bLocalUseExceptions = GetUseExceptions();
   55176        4733 :     if ( bLocalUseExceptions ) {
   55177        4731 :       pushErrorHandler();
   55178             :     }
   55179        4733 :     {
   55180        4733 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55181        4733 :       delete_GDALAlgorithmHS(arg1);
   55182        4733 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55183             :     }
   55184        4733 :     if ( bLocalUseExceptions ) {
   55185        4731 :       popErrorHandler();
   55186             :     }
   55187             : #ifndef SED_HACKS
   55188             :     if ( bLocalUseExceptions ) {
   55189             :       CPLErr eclass = CPLGetLastErrorType();
   55190             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55191             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55192             :       }
   55193             :     }
   55194             : #endif
   55195             :   }
   55196        4733 :   resultobj = SWIG_Py_Void();
   55197        4733 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55198             :   return resultobj;
   55199             : fail:
   55200             :   return NULL;
   55201             : }
   55202             : 
   55203             : 
   55204          32 : SWIGINTERN PyObject *_wrap_Algorithm_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55205          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55206          32 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55207          32 :   void *argp1 = 0 ;
   55208          32 :   int res1 = 0 ;
   55209          32 :   PyObject *swig_obj[1] ;
   55210          32 :   char *result = 0 ;
   55211             :   
   55212          32 :   if (!args) SWIG_fail;
   55213          32 :   swig_obj[0] = args;
   55214          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55215          32 :   if (!SWIG_IsOK(res1)) {
   55216           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetName" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55217             :   }
   55218          32 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55219          32 :   {
   55220          32 :     const int bLocalUseExceptions = GetUseExceptions();
   55221          32 :     if ( bLocalUseExceptions ) {
   55222          32 :       pushErrorHandler();
   55223             :     }
   55224          32 :     {
   55225          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55226          32 :       result = (char *)GDALAlgorithmHS_GetName(arg1);
   55227          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55228             :     }
   55229          32 :     if ( bLocalUseExceptions ) {
   55230          32 :       popErrorHandler();
   55231             :     }
   55232             : #ifndef SED_HACKS
   55233             :     if ( bLocalUseExceptions ) {
   55234             :       CPLErr eclass = CPLGetLastErrorType();
   55235             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55236             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55237             :       }
   55238             :     }
   55239             : #endif
   55240             :   }
   55241          32 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55242          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; } }
   55243             :   return resultobj;
   55244             : fail:
   55245             :   return NULL;
   55246             : }
   55247             : 
   55248             : 
   55249           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55250           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55251           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55252           1 :   void *argp1 = 0 ;
   55253           1 :   int res1 = 0 ;
   55254           1 :   PyObject *swig_obj[1] ;
   55255           1 :   char *result = 0 ;
   55256             :   
   55257           1 :   if (!args) SWIG_fail;
   55258           1 :   swig_obj[0] = args;
   55259           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55260           1 :   if (!SWIG_IsOK(res1)) {
   55261           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55262             :   }
   55263           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55264           1 :   {
   55265           1 :     const int bLocalUseExceptions = GetUseExceptions();
   55266           1 :     if ( bLocalUseExceptions ) {
   55267           1 :       pushErrorHandler();
   55268             :     }
   55269           1 :     {
   55270           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55271           1 :       result = (char *)GDALAlgorithmHS_GetDescription(arg1);
   55272           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55273             :     }
   55274           1 :     if ( bLocalUseExceptions ) {
   55275           1 :       popErrorHandler();
   55276             :     }
   55277             : #ifndef SED_HACKS
   55278             :     if ( bLocalUseExceptions ) {
   55279             :       CPLErr eclass = CPLGetLastErrorType();
   55280             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55281             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55282             :       }
   55283             :     }
   55284             : #endif
   55285             :   }
   55286           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55287           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; } }
   55288             :   return resultobj;
   55289             : fail:
   55290             :   return NULL;
   55291             : }
   55292             : 
   55293             : 
   55294           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetLongDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55295           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55296           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55297           1 :   void *argp1 = 0 ;
   55298           1 :   int res1 = 0 ;
   55299           1 :   PyObject *swig_obj[1] ;
   55300           1 :   char *result = 0 ;
   55301             :   
   55302           1 :   if (!args) SWIG_fail;
   55303           1 :   swig_obj[0] = args;
   55304           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55305           1 :   if (!SWIG_IsOK(res1)) {
   55306           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetLongDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55307             :   }
   55308           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55309           1 :   {
   55310           1 :     const int bLocalUseExceptions = GetUseExceptions();
   55311           1 :     if ( bLocalUseExceptions ) {
   55312           1 :       pushErrorHandler();
   55313             :     }
   55314           1 :     {
   55315           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55316           1 :       result = (char *)GDALAlgorithmHS_GetLongDescription(arg1);
   55317           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55318             :     }
   55319           1 :     if ( bLocalUseExceptions ) {
   55320           1 :       popErrorHandler();
   55321             :     }
   55322             : #ifndef SED_HACKS
   55323             :     if ( bLocalUseExceptions ) {
   55324             :       CPLErr eclass = CPLGetLastErrorType();
   55325             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55326             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55327             :       }
   55328             :     }
   55329             : #endif
   55330             :   }
   55331           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55332           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; } }
   55333             :   return resultobj;
   55334             : fail:
   55335             :   return NULL;
   55336             : }
   55337             : 
   55338             : 
   55339           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetHelpFullURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55340           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55341           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55342           1 :   void *argp1 = 0 ;
   55343           1 :   int res1 = 0 ;
   55344           1 :   PyObject *swig_obj[1] ;
   55345           1 :   char *result = 0 ;
   55346             :   
   55347           1 :   if (!args) SWIG_fail;
   55348           1 :   swig_obj[0] = args;
   55349           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55350           1 :   if (!SWIG_IsOK(res1)) {
   55351           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetHelpFullURL" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55352             :   }
   55353           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55354           1 :   {
   55355           1 :     const int bLocalUseExceptions = GetUseExceptions();
   55356           1 :     if ( bLocalUseExceptions ) {
   55357           1 :       pushErrorHandler();
   55358             :     }
   55359           1 :     {
   55360           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55361           1 :       result = (char *)GDALAlgorithmHS_GetHelpFullURL(arg1);
   55362           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55363             :     }
   55364           1 :     if ( bLocalUseExceptions ) {
   55365           1 :       popErrorHandler();
   55366             :     }
   55367             : #ifndef SED_HACKS
   55368             :     if ( bLocalUseExceptions ) {
   55369             :       CPLErr eclass = CPLGetLastErrorType();
   55370             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55371             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55372             :       }
   55373             :     }
   55374             : #endif
   55375             :   }
   55376           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55377           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; } }
   55378             :   return resultobj;
   55379             : fail:
   55380             :   return NULL;
   55381             : }
   55382             : 
   55383             : 
   55384        2586 : SWIGINTERN PyObject *_wrap_Algorithm_HasSubAlgorithms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55385        2586 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55386        2586 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55387        2586 :   void *argp1 = 0 ;
   55388        2586 :   int res1 = 0 ;
   55389        2586 :   PyObject *swig_obj[1] ;
   55390        2586 :   bool result;
   55391             :   
   55392        2586 :   if (!args) SWIG_fail;
   55393        2586 :   swig_obj[0] = args;
   55394        2586 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55395        2586 :   if (!SWIG_IsOK(res1)) {
   55396           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_HasSubAlgorithms" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55397             :   }
   55398        2586 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55399        2586 :   {
   55400        2586 :     const int bLocalUseExceptions = GetUseExceptions();
   55401        2586 :     if ( bLocalUseExceptions ) {
   55402        2585 :       pushErrorHandler();
   55403             :     }
   55404        2586 :     {
   55405        2586 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55406        2586 :       result = (bool)GDALAlgorithmHS_HasSubAlgorithms(arg1);
   55407        2586 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55408             :     }
   55409        2586 :     if ( bLocalUseExceptions ) {
   55410        2585 :       popErrorHandler();
   55411             :     }
   55412             : #ifndef SED_HACKS
   55413             :     if ( bLocalUseExceptions ) {
   55414             :       CPLErr eclass = CPLGetLastErrorType();
   55415             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55416             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55417             :       }
   55418             :     }
   55419             : #endif
   55420             :   }
   55421        2586 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55422        2586 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55423             :   return resultobj;
   55424             : fail:
   55425             :   return NULL;
   55426             : }
   55427             : 
   55428             : 
   55429           6 : SWIGINTERN PyObject *_wrap_Algorithm_GetSubAlgorithmNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55430           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55431           6 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55432           6 :   void *argp1 = 0 ;
   55433           6 :   int res1 = 0 ;
   55434           6 :   PyObject *swig_obj[1] ;
   55435           6 :   char **result = 0 ;
   55436             :   
   55437           6 :   if (!args) SWIG_fail;
   55438           6 :   swig_obj[0] = args;
   55439           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55440           6 :   if (!SWIG_IsOK(res1)) {
   55441           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetSubAlgorithmNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55442             :   }
   55443           6 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55444           6 :   {
   55445           6 :     const int bLocalUseExceptions = GetUseExceptions();
   55446           6 :     if ( bLocalUseExceptions ) {
   55447           6 :       pushErrorHandler();
   55448             :     }
   55449           6 :     {
   55450           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55451           6 :       result = (char **)GDALAlgorithmHS_GetSubAlgorithmNames(arg1);
   55452           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55453             :     }
   55454           6 :     if ( bLocalUseExceptions ) {
   55455           6 :       popErrorHandler();
   55456             :     }
   55457             : #ifndef SED_HACKS
   55458             :     if ( bLocalUseExceptions ) {
   55459             :       CPLErr eclass = CPLGetLastErrorType();
   55460             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55461             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55462             :       }
   55463             :     }
   55464             : #endif
   55465             :   }
   55466           6 :   {
   55467             :     /* %typemap(out) char **CSL -> ( string ) */
   55468           6 :     bool bErr = false;
   55469           6 :     resultobj = CSLToList(result, &bErr);
   55470           6 :     CSLDestroy(result);
   55471           6 :     if( bErr ) {
   55472           0 :       SWIG_fail;
   55473             :     }
   55474             :   }
   55475           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; } }
   55476             :   return resultobj;
   55477             : fail:
   55478             :   return NULL;
   55479             : }
   55480             : 
   55481             : 
   55482        2030 : SWIGINTERN PyObject *_wrap_Algorithm_InstantiateSubAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55483        2030 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55484        2030 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55485        2030 :   char *arg2 = (char *) 0 ;
   55486        2030 :   void *argp1 = 0 ;
   55487        2030 :   int res1 = 0 ;
   55488        2030 :   int res2 ;
   55489        2030 :   char *buf2 = 0 ;
   55490        2030 :   int alloc2 = 0 ;
   55491        2030 :   PyObject *swig_obj[2] ;
   55492        2030 :   GDALAlgorithmHS *result = 0 ;
   55493             :   
   55494        2030 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_InstantiateSubAlgorithm", 2, 2, swig_obj)) SWIG_fail;
   55495        2030 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55496        2030 :   if (!SWIG_IsOK(res1)) {
   55497           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55498             :   }
   55499        2030 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55500        2030 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   55501        2030 :   if (!SWIG_IsOK(res2)) {
   55502           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "2"" of type '" "char const *""'");
   55503             :   }
   55504        2030 :   arg2 = reinterpret_cast< char * >(buf2);
   55505        2030 :   {
   55506        2030 :     if (!arg2) {
   55507           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   55508             :     }
   55509             :   }
   55510        2029 :   {
   55511        2029 :     const int bLocalUseExceptions = GetUseExceptions();
   55512        2029 :     if ( bLocalUseExceptions ) {
   55513        2028 :       pushErrorHandler();
   55514             :     }
   55515        2029 :     {
   55516        2029 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55517        2029 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_InstantiateSubAlgorithm(arg1,(char const *)arg2);
   55518        2029 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55519             :     }
   55520        2029 :     if ( bLocalUseExceptions ) {
   55521        2028 :       popErrorHandler();
   55522             :     }
   55523             : #ifndef SED_HACKS
   55524             :     if ( bLocalUseExceptions ) {
   55525             :       CPLErr eclass = CPLGetLastErrorType();
   55526             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55527             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55528             :       }
   55529             :     }
   55530             : #endif
   55531             :   }
   55532        2029 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   55533        2029 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55534        2030 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55535             :   return resultobj;
   55536           1 : fail:
   55537           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55538             :   return NULL;
   55539             : }
   55540             : 
   55541             : 
   55542          85 : SWIGINTERN PyObject *_wrap_Algorithm_ParseCommandLineArguments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55543          85 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55544          85 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55545          85 :   char **arg2 = (char **) 0 ;
   55546          85 :   void *argp1 = 0 ;
   55547          85 :   int res1 = 0 ;
   55548          85 :   PyObject *swig_obj[2] ;
   55549          85 :   bool result;
   55550             :   
   55551          85 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseCommandLineArguments", 2, 2, swig_obj)) SWIG_fail;
   55552          85 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55553          85 :   if (!SWIG_IsOK(res1)) {
   55554           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseCommandLineArguments" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55555             :   }
   55556          85 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55557          85 :   {
   55558             :     /* %typemap(in) char **dict */
   55559          85 :     arg2 = NULL;
   55560          85 :     if ( PySequence_Check( swig_obj[1] ) ) {
   55561          85 :       int bErr = FALSE;
   55562          85 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   55563          85 :       if ( bErr )
   55564             :       {
   55565           0 :         SWIG_fail;
   55566             :       }
   55567             :     }
   55568           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   55569           0 :       int bErr = FALSE;
   55570           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   55571           0 :       if ( bErr )
   55572             :       {
   55573           0 :         SWIG_fail;
   55574             :       }
   55575             :     }
   55576             :     else {
   55577           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   55578           0 :       SWIG_fail;
   55579             :     }
   55580             :   }
   55581          85 :   {
   55582          85 :     const int bLocalUseExceptions = GetUseExceptions();
   55583          85 :     if ( bLocalUseExceptions ) {
   55584          85 :       pushErrorHandler();
   55585             :     }
   55586          85 :     {
   55587          85 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55588          85 :       result = (bool)GDALAlgorithmHS_ParseCommandLineArguments(arg1,arg2);
   55589          85 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55590             :     }
   55591          85 :     if ( bLocalUseExceptions ) {
   55592          85 :       popErrorHandler();
   55593             :     }
   55594             : #ifndef SED_HACKS
   55595             :     if ( bLocalUseExceptions ) {
   55596             :       CPLErr eclass = CPLGetLastErrorType();
   55597             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55598             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55599             :       }
   55600             :     }
   55601             : #endif
   55602             :   }
   55603          85 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55604          85 :   {
   55605             :     /* %typemap(freearg) char **dict */
   55606          85 :     CSLDestroy( arg2 );
   55607             :   }
   55608          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; } }
   55609             :   return resultobj;
   55610           0 : fail:
   55611           0 :   {
   55612             :     /* %typemap(freearg) char **dict */
   55613           0 :     CSLDestroy( arg2 );
   55614             :   }
   55615             :   return NULL;
   55616             : }
   55617             : 
   55618             : 
   55619         790 : SWIGINTERN PyObject *_wrap_Algorithm_GetActualAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55620         790 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55621         790 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55622         790 :   void *argp1 = 0 ;
   55623         790 :   int res1 = 0 ;
   55624         790 :   PyObject *swig_obj[1] ;
   55625         790 :   GDALAlgorithmHS *result = 0 ;
   55626             :   
   55627         790 :   if (!args) SWIG_fail;
   55628         790 :   swig_obj[0] = args;
   55629         790 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55630         790 :   if (!SWIG_IsOK(res1)) {
   55631           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetActualAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55632             :   }
   55633         790 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55634         790 :   {
   55635         790 :     const int bLocalUseExceptions = GetUseExceptions();
   55636         790 :     if ( bLocalUseExceptions ) {
   55637         790 :       pushErrorHandler();
   55638             :     }
   55639         790 :     {
   55640         790 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55641         790 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_GetActualAlgorithm(arg1);
   55642         790 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55643             :     }
   55644         790 :     if ( bLocalUseExceptions ) {
   55645         790 :       popErrorHandler();
   55646             :     }
   55647             : #ifndef SED_HACKS
   55648             :     if ( bLocalUseExceptions ) {
   55649             :       CPLErr eclass = CPLGetLastErrorType();
   55650             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55651             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55652             :       }
   55653             :     }
   55654             : #endif
   55655             :   }
   55656         790 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   55657         790 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55658             :   return resultobj;
   55659             : fail:
   55660             :   return NULL;
   55661             : }
   55662             : 
   55663             : 
   55664        1616 : SWIGINTERN PyObject *_wrap_Algorithm_Run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55665        1616 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55666        1616 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55667        1616 :   GDALProgressFunc arg2 = (GDALProgressFunc) NULL ;
   55668        1616 :   void *arg3 = (void *) NULL ;
   55669        1616 :   void *argp1 = 0 ;
   55670        1616 :   int res1 = 0 ;
   55671        1616 :   PyObject *swig_obj[3] ;
   55672        1616 :   bool result;
   55673             :   
   55674             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   55675        1616 :   PyProgressData *psProgressInfo;
   55676        1616 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   55677        1616 :   psProgressInfo->nLastReported = -1;
   55678        1616 :   psProgressInfo->psPyCallback = NULL;
   55679        1616 :   psProgressInfo->psPyCallbackData = NULL;
   55680        1616 :   arg3 = psProgressInfo;
   55681        1616 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_Run", 1, 3, swig_obj)) SWIG_fail;
   55682        1616 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55683        1616 :   if (!SWIG_IsOK(res1)) {
   55684           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Run" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55685             :   }
   55686        1616 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55687        1616 :   if (swig_obj[1]) {
   55688         577 :     {
   55689             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   55690             :       /* callback_func typemap */
   55691             :       
   55692             :       /* In some cases 0 is passed instead of None. */
   55693             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   55694         577 :       if ( PyLong_Check(swig_obj[1]) || PyInt_Check(swig_obj[1]) )
   55695             :       {
   55696           0 :         if( PyLong_AsLong(swig_obj[1]) == 0 )
   55697             :         {
   55698           0 :           swig_obj[1] = Py_None;
   55699             :         }
   55700             :       }
   55701             :       
   55702         577 :       if (swig_obj[1] && swig_obj[1] != Py_None ) {
   55703          65 :         void* cbfunction = NULL;
   55704          65 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[1],
   55705             :             (void**)&cbfunction,
   55706             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   55707             :             SWIG_POINTER_EXCEPTION | 0 ));
   55708             :         
   55709          65 :         if ( cbfunction == GDALTermProgress ) {
   55710             :           arg2 = GDALTermProgress;
   55711             :         } else {
   55712          65 :           if (!PyCallable_Check(swig_obj[1])) {
   55713           0 :             PyErr_SetString( PyExc_RuntimeError,
   55714             :               "Object given is not a Python function" );
   55715           0 :             SWIG_fail;
   55716             :           }
   55717          65 :           psProgressInfo->psPyCallback = swig_obj[1];
   55718          65 :           arg2 = PyProgressProxy;
   55719             :         }
   55720             :         
   55721             :       }
   55722             :       
   55723             :     }
   55724             :   }
   55725        1616 :   if (swig_obj[2]) {
   55726           0 :     {
   55727             :       /* %typemap(in) ( void* callback_data=NULL)  */
   55728           0 :       psProgressInfo->psPyCallbackData = swig_obj[2] ;
   55729             :     }
   55730             :   }
   55731        1616 :   {
   55732        1616 :     const int bLocalUseExceptions = GetUseExceptions();
   55733        1616 :     if ( bLocalUseExceptions ) {
   55734        1613 :       pushErrorHandler();
   55735             :     }
   55736        1616 :     {
   55737        1616 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55738        1616 :       result = (bool)GDALAlgorithmHS_Run(arg1,arg2,arg3);
   55739        1616 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55740             :     }
   55741        1616 :     if ( bLocalUseExceptions ) {
   55742        1613 :       popErrorHandler();
   55743             :     }
   55744             : #ifndef SED_HACKS
   55745             :     if ( bLocalUseExceptions ) {
   55746             :       CPLErr eclass = CPLGetLastErrorType();
   55747             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55748             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55749             :       }
   55750             :     }
   55751             : #endif
   55752             :   }
   55753        1616 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55754        1616 :   {
   55755             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55756             :     
   55757        1616 :     CPLFree(psProgressInfo);
   55758             :     
   55759             :   }
   55760        2424 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55761             :   return resultobj;
   55762           0 : fail:
   55763           0 :   {
   55764             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55765             :     
   55766           0 :     CPLFree(psProgressInfo);
   55767             :     
   55768             :   }
   55769             :   return NULL;
   55770             : }
   55771             : 
   55772             : 
   55773         466 : SWIGINTERN PyObject *_wrap_Algorithm_Finalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55774         466 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55775         466 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55776         466 :   void *argp1 = 0 ;
   55777         466 :   int res1 = 0 ;
   55778         466 :   PyObject *swig_obj[1] ;
   55779         466 :   bool result;
   55780             :   
   55781         466 :   if (!args) SWIG_fail;
   55782         466 :   swig_obj[0] = args;
   55783         466 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55784         466 :   if (!SWIG_IsOK(res1)) {
   55785           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Finalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55786             :   }
   55787         466 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55788         466 :   {
   55789         466 :     const int bLocalUseExceptions = GetUseExceptions();
   55790         466 :     if ( bLocalUseExceptions ) {
   55791         466 :       pushErrorHandler();
   55792             :     }
   55793         466 :     {
   55794         466 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55795         466 :       result = (bool)GDALAlgorithmHS_Finalize(arg1);
   55796         466 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55797             :     }
   55798         466 :     if ( bLocalUseExceptions ) {
   55799         466 :       popErrorHandler();
   55800             :     }
   55801             : #ifndef SED_HACKS
   55802             :     if ( bLocalUseExceptions ) {
   55803             :       CPLErr eclass = CPLGetLastErrorType();
   55804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55806             :       }
   55807             :     }
   55808             : #endif
   55809             :   }
   55810         466 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55811         466 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55812             :   return resultobj;
   55813             : fail:
   55814             :   return NULL;
   55815             : }
   55816             : 
   55817             : 
   55818         249 : SWIGINTERN PyObject *_wrap_Algorithm_ParseRunAndFinalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55819         249 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55820         249 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55821         249 :   char **arg2 = (char **) 0 ;
   55822         249 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   55823         249 :   void *arg4 = (void *) NULL ;
   55824         249 :   void *argp1 = 0 ;
   55825         249 :   int res1 = 0 ;
   55826         249 :   PyObject *swig_obj[4] ;
   55827         249 :   bool result;
   55828             :   
   55829             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   55830         249 :   PyProgressData *psProgressInfo;
   55831         249 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   55832         249 :   psProgressInfo->nLastReported = -1;
   55833         249 :   psProgressInfo->psPyCallback = NULL;
   55834         249 :   psProgressInfo->psPyCallbackData = NULL;
   55835         249 :   arg4 = psProgressInfo;
   55836         249 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseRunAndFinalize", 2, 4, swig_obj)) SWIG_fail;
   55837         249 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55838         249 :   if (!SWIG_IsOK(res1)) {
   55839           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseRunAndFinalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55840             :   }
   55841         249 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55842         249 :   {
   55843             :     /* %typemap(in) char **dict */
   55844         249 :     arg2 = NULL;
   55845         249 :     if ( PySequence_Check( swig_obj[1] ) ) {
   55846         249 :       int bErr = FALSE;
   55847         249 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   55848         249 :       if ( bErr )
   55849             :       {
   55850           0 :         SWIG_fail;
   55851             :       }
   55852             :     }
   55853           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   55854           0 :       int bErr = FALSE;
   55855           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   55856           0 :       if ( bErr )
   55857             :       {
   55858           0 :         SWIG_fail;
   55859             :       }
   55860             :     }
   55861             :     else {
   55862           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   55863           0 :       SWIG_fail;
   55864             :     }
   55865             :   }
   55866         249 :   if (swig_obj[2]) {
   55867          12 :     {
   55868             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   55869             :       /* callback_func typemap */
   55870             :       
   55871             :       /* In some cases 0 is passed instead of None. */
   55872             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   55873          12 :       if ( PyLong_Check(swig_obj[2]) || PyInt_Check(swig_obj[2]) )
   55874             :       {
   55875           0 :         if( PyLong_AsLong(swig_obj[2]) == 0 )
   55876             :         {
   55877           0 :           swig_obj[2] = Py_None;
   55878             :         }
   55879             :       }
   55880             :       
   55881          12 :       if (swig_obj[2] && swig_obj[2] != Py_None ) {
   55882          12 :         void* cbfunction = NULL;
   55883          12 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[2],
   55884             :             (void**)&cbfunction,
   55885             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   55886             :             SWIG_POINTER_EXCEPTION | 0 ));
   55887             :         
   55888          12 :         if ( cbfunction == GDALTermProgress ) {
   55889             :           arg3 = GDALTermProgress;
   55890             :         } else {
   55891          12 :           if (!PyCallable_Check(swig_obj[2])) {
   55892           0 :             PyErr_SetString( PyExc_RuntimeError,
   55893             :               "Object given is not a Python function" );
   55894           0 :             SWIG_fail;
   55895             :           }
   55896          12 :           psProgressInfo->psPyCallback = swig_obj[2];
   55897          12 :           arg3 = PyProgressProxy;
   55898             :         }
   55899             :         
   55900             :       }
   55901             :       
   55902             :     }
   55903             :   }
   55904         249 :   if (swig_obj[3]) {
   55905           0 :     {
   55906             :       /* %typemap(in) ( void* callback_data=NULL)  */
   55907           0 :       psProgressInfo->psPyCallbackData = swig_obj[3] ;
   55908             :     }
   55909             :   }
   55910         249 :   {
   55911         249 :     const int bLocalUseExceptions = GetUseExceptions();
   55912         249 :     if ( bLocalUseExceptions ) {
   55913         249 :       pushErrorHandler();
   55914             :     }
   55915         249 :     {
   55916         249 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55917         249 :       result = (bool)GDALAlgorithmHS_ParseRunAndFinalize(arg1,arg2,arg3,arg4);
   55918         249 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55919             :     }
   55920         249 :     if ( bLocalUseExceptions ) {
   55921         249 :       popErrorHandler();
   55922             :     }
   55923             : #ifndef SED_HACKS
   55924             :     if ( bLocalUseExceptions ) {
   55925             :       CPLErr eclass = CPLGetLastErrorType();
   55926             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55927             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55928             :       }
   55929             :     }
   55930             : #endif
   55931             :   }
   55932         249 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55933         249 :   {
   55934             :     /* %typemap(freearg) char **dict */
   55935         249 :     CSLDestroy( arg2 );
   55936             :   }
   55937         249 :   {
   55938             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55939             :     
   55940         249 :     CPLFree(psProgressInfo);
   55941             :     
   55942             :   }
   55943         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; } }
   55944             :   return resultobj;
   55945           0 : fail:
   55946           0 :   {
   55947             :     /* %typemap(freearg) char **dict */
   55948           0 :     CSLDestroy( arg2 );
   55949             :   }
   55950           0 :   {
   55951             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55952             :     
   55953           0 :     CPLFree(psProgressInfo);
   55954             :     
   55955             :   }
   55956             :   return NULL;
   55957             : }
   55958             : 
   55959             : 
   55960           3 : SWIGINTERN PyObject *_wrap_Algorithm_GetUsageAsJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55961           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55962           3 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55963           3 :   void *argp1 = 0 ;
   55964           3 :   int res1 = 0 ;
   55965           3 :   PyObject *swig_obj[1] ;
   55966           3 :   retStringAndCPLFree *result = 0 ;
   55967             :   
   55968           3 :   if (!args) SWIG_fail;
   55969           3 :   swig_obj[0] = args;
   55970           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55971           3 :   if (!SWIG_IsOK(res1)) {
   55972           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetUsageAsJSON" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55973             :   }
   55974           3 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55975           3 :   {
   55976           3 :     const int bLocalUseExceptions = GetUseExceptions();
   55977           3 :     if ( bLocalUseExceptions ) {
   55978           3 :       pushErrorHandler();
   55979             :     }
   55980           3 :     {
   55981           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55982           3 :       result = (retStringAndCPLFree *)GDALAlgorithmHS_GetUsageAsJSON(arg1);
   55983           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55984             :     }
   55985           3 :     if ( bLocalUseExceptions ) {
   55986           3 :       popErrorHandler();
   55987             :     }
   55988             : #ifndef SED_HACKS
   55989             :     if ( bLocalUseExceptions ) {
   55990             :       CPLErr eclass = CPLGetLastErrorType();
   55991             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55992             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55993             :       }
   55994             :     }
   55995             : #endif
   55996             :   }
   55997           3 :   {
   55998             :     /* %typemap(out) (retStringAndCPLFree*) */
   55999           3 :     Py_XDECREF(resultobj);
   56000           3 :     if(result)
   56001             :     {
   56002           3 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   56003           3 :       CPLFree(result);
   56004             :     }
   56005             :     else
   56006             :     {
   56007           0 :       resultobj = Py_None;
   56008           0 :       Py_INCREF(resultobj);
   56009             :     }
   56010             :   }
   56011           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; } }
   56012             :   return resultobj;
   56013             : fail:
   56014             :   return NULL;
   56015             : }
   56016             : 
   56017             : 
   56018         178 : SWIGINTERN PyObject *_wrap_Algorithm_GetArgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56019         178 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56020         178 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   56021         178 :   void *argp1 = 0 ;
   56022         178 :   int res1 = 0 ;
   56023         178 :   PyObject *swig_obj[1] ;
   56024         178 :   char **result = 0 ;
   56025             :   
   56026         178 :   if (!args) SWIG_fail;
   56027         178 :   swig_obj[0] = args;
   56028         178 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   56029         178 :   if (!SWIG_IsOK(res1)) {
   56030           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   56031             :   }
   56032         178 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   56033         178 :   {
   56034         178 :     const int bLocalUseExceptions = GetUseExceptions();
   56035         178 :     if ( bLocalUseExceptions ) {
   56036         178 :       pushErrorHandler();
   56037             :     }
   56038         178 :     {
   56039         178 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56040         178 :       result = (char **)GDALAlgorithmHS_GetArgNames(arg1);
   56041         178 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56042             :     }
   56043         178 :     if ( bLocalUseExceptions ) {
   56044         178 :       popErrorHandler();
   56045             :     }
   56046             : #ifndef SED_HACKS
   56047             :     if ( bLocalUseExceptions ) {
   56048             :       CPLErr eclass = CPLGetLastErrorType();
   56049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56051             :       }
   56052             :     }
   56053             : #endif
   56054             :   }
   56055         178 :   {
   56056             :     /* %typemap(out) char **CSL -> ( string ) */
   56057         178 :     bool bErr = false;
   56058         178 :     resultobj = CSLToList(result, &bErr);
   56059         178 :     CSLDestroy(result);
   56060         178 :     if( bErr ) {
   56061           0 :       SWIG_fail;
   56062             :     }
   56063             :   }
   56064         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; } }
   56065             :   return resultobj;
   56066             : fail:
   56067             :   return NULL;
   56068             : }
   56069             : 
   56070             : 
   56071        4376 : SWIGINTERN PyObject *_wrap_Algorithm_GetArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56072        4376 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56073        4376 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   56074        4376 :   char *arg2 = (char *) 0 ;
   56075        4376 :   void *argp1 = 0 ;
   56076        4376 :   int res1 = 0 ;
   56077        4376 :   int res2 ;
   56078        4376 :   char *buf2 = 0 ;
   56079        4376 :   int alloc2 = 0 ;
   56080        4376 :   PyObject *swig_obj[2] ;
   56081        4376 :   GDALAlgorithmArgHS *result = 0 ;
   56082             :   
   56083        4376 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArg", 2, 2, swig_obj)) SWIG_fail;
   56084        4376 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   56085        4376 :   if (!SWIG_IsOK(res1)) {
   56086           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArg" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   56087             :   }
   56088        4376 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   56089        4376 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56090        4376 :   if (!SWIG_IsOK(res2)) {
   56091           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArg" "', argument " "2"" of type '" "char const *""'");
   56092             :   }
   56093        4376 :   arg2 = reinterpret_cast< char * >(buf2);
   56094        4376 :   {
   56095        4376 :     if (!arg2) {
   56096           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56097             :     }
   56098             :   }
   56099        4375 :   {
   56100        4375 :     const int bLocalUseExceptions = GetUseExceptions();
   56101        4375 :     if ( bLocalUseExceptions ) {
   56102        4375 :       pushErrorHandler();
   56103             :     }
   56104        4375 :     {
   56105        4375 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56106        4375 :       result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArg(arg1,(char const *)arg2);
   56107        4375 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56108             :     }
   56109        4375 :     if ( bLocalUseExceptions ) {
   56110        4375 :       popErrorHandler();
   56111             :     }
   56112             : #ifndef SED_HACKS
   56113             :     if ( bLocalUseExceptions ) {
   56114             :       CPLErr eclass = CPLGetLastErrorType();
   56115             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56116             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56117             :       }
   56118             :     }
   56119             : #endif
   56120             :   }
   56121        4375 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
   56122        4375 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56123        4376 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56124             :   return resultobj;
   56125           1 : fail:
   56126           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56127             :   return NULL;
   56128             : }
   56129             : 
   56130             : 
   56131        5632 : SWIGINTERN PyObject *_wrap_Algorithm_GetArgNonConst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56132        5632 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56133        5632 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   56134        5632 :   char *arg2 = (char *) 0 ;
   56135        5632 :   void *argp1 = 0 ;
   56136        5632 :   int res1 = 0 ;
   56137        5632 :   int res2 ;
   56138        5632 :   char *buf2 = 0 ;
   56139        5632 :   int alloc2 = 0 ;
   56140        5632 :   PyObject *swig_obj[2] ;
   56141        5632 :   GDALAlgorithmArgHS *result = 0 ;
   56142             :   
   56143        5632 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArgNonConst", 2, 2, swig_obj)) SWIG_fail;
   56144        5632 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   56145        5632 :   if (!SWIG_IsOK(res1)) {
   56146           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNonConst" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   56147             :   }
   56148        5632 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   56149        5632 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56150        5632 :   if (!SWIG_IsOK(res2)) {
   56151           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArgNonConst" "', argument " "2"" of type '" "char const *""'");
   56152             :   }
   56153        5632 :   arg2 = reinterpret_cast< char * >(buf2);
   56154        5632 :   {
   56155        5632 :     if (!arg2) {
   56156           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56157             :     }
   56158             :   }
   56159        5632 :   {
   56160        5632 :     const int bLocalUseExceptions = GetUseExceptions();
   56161        5632 :     if ( bLocalUseExceptions ) {
   56162        5629 :       pushErrorHandler();
   56163             :     }
   56164        5632 :     {
   56165        5632 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56166        5632 :       result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArgNonConst(arg1,(char const *)arg2);
   56167        5632 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56168             :     }
   56169        5632 :     if ( bLocalUseExceptions ) {
   56170        5629 :       popErrorHandler();
   56171             :     }
   56172             : #ifndef SED_HACKS
   56173             :     if ( bLocalUseExceptions ) {
   56174             :       CPLErr eclass = CPLGetLastErrorType();
   56175             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56176             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56177             :       }
   56178             :     }
   56179             : #endif
   56180             :   }
   56181        5632 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
   56182        5632 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56183        5632 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56184             :   return resultobj;
   56185           0 : fail:
   56186           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56187             :   return NULL;
   56188             : }
   56189             : 
   56190             : 
   56191         277 : SWIGINTERN PyObject *Algorithm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56192         277 :   PyObject *obj;
   56193         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   56194         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmHS, SWIG_NewClientData(obj));
   56195         277 :   return SWIG_Py_Void();
   56196             : }
   56197             : 
   56198        1930 : SWIGINTERN PyObject *_wrap_delete_AlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56199        1930 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56200        1930 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   56201        1930 :   void *argp1 = 0 ;
   56202        1930 :   int res1 = 0 ;
   56203        1930 :   PyObject *swig_obj[1] ;
   56204             :   
   56205        1930 :   if (!args) SWIG_fail;
   56206        1930 :   swig_obj[0] = args;
   56207        1930 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_DISOWN |  0 );
   56208        1930 :   if (!SWIG_IsOK(res1)) {
   56209           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmRegistry" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   56210             :   }
   56211        1930 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   56212        1930 :   {
   56213        1930 :     const int bLocalUseExceptions = GetUseExceptions();
   56214        1930 :     if ( bLocalUseExceptions ) {
   56215        1929 :       pushErrorHandler();
   56216             :     }
   56217        1930 :     {
   56218        1930 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56219        1930 :       delete_GDALAlgorithmRegistryHS(arg1);
   56220        1930 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56221             :     }
   56222        1930 :     if ( bLocalUseExceptions ) {
   56223        1929 :       popErrorHandler();
   56224             :     }
   56225             : #ifndef SED_HACKS
   56226             :     if ( bLocalUseExceptions ) {
   56227             :       CPLErr eclass = CPLGetLastErrorType();
   56228             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56229             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56230             :       }
   56231             :     }
   56232             : #endif
   56233             :   }
   56234        1930 :   resultobj = SWIG_Py_Void();
   56235        1930 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56236             :   return resultobj;
   56237             : fail:
   56238             :   return NULL;
   56239             : }
   56240             : 
   56241             : 
   56242           1 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_GetAlgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56243           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56244           1 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   56245           1 :   void *argp1 = 0 ;
   56246           1 :   int res1 = 0 ;
   56247           1 :   PyObject *swig_obj[1] ;
   56248           1 :   char **result = 0 ;
   56249             :   
   56250           1 :   if (!args) SWIG_fail;
   56251           1 :   swig_obj[0] = args;
   56252           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   56253           1 :   if (!SWIG_IsOK(res1)) {
   56254           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_GetAlgNames" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   56255             :   }
   56256           1 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   56257           1 :   {
   56258           1 :     const int bLocalUseExceptions = GetUseExceptions();
   56259           1 :     if ( bLocalUseExceptions ) {
   56260           1 :       pushErrorHandler();
   56261             :     }
   56262           1 :     {
   56263           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56264           1 :       result = (char **)GDALAlgorithmRegistryHS_GetAlgNames(arg1);
   56265           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56266             :     }
   56267           1 :     if ( bLocalUseExceptions ) {
   56268           1 :       popErrorHandler();
   56269             :     }
   56270             : #ifndef SED_HACKS
   56271             :     if ( bLocalUseExceptions ) {
   56272             :       CPLErr eclass = CPLGetLastErrorType();
   56273             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56274             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56275             :       }
   56276             :     }
   56277             : #endif
   56278             :   }
   56279           1 :   {
   56280             :     /* %typemap(out) char **CSL -> ( string ) */
   56281           1 :     bool bErr = false;
   56282           1 :     resultobj = CSLToList(result, &bErr);
   56283           1 :     CSLDestroy(result);
   56284           1 :     if( bErr ) {
   56285           0 :       SWIG_fail;
   56286             :     }
   56287             :   }
   56288           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; } }
   56289             :   return resultobj;
   56290             : fail:
   56291             :   return NULL;
   56292             : }
   56293             : 
   56294             : 
   56295        1932 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_InstantiateAlg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56296        1932 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56297        1932 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   56298        1932 :   char *arg2 = (char *) 0 ;
   56299        1932 :   void *argp1 = 0 ;
   56300        1932 :   int res1 = 0 ;
   56301        1932 :   int res2 ;
   56302        1932 :   char *buf2 = 0 ;
   56303        1932 :   int alloc2 = 0 ;
   56304        1932 :   PyObject *swig_obj[2] ;
   56305        1932 :   GDALAlgorithmHS *result = 0 ;
   56306             :   
   56307        1932 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmRegistry_InstantiateAlg", 2, 2, swig_obj)) SWIG_fail;
   56308        1932 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   56309        1932 :   if (!SWIG_IsOK(res1)) {
   56310           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   56311             :   }
   56312        1932 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   56313        1932 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56314        1932 :   if (!SWIG_IsOK(res2)) {
   56315           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "2"" of type '" "char const *""'");
   56316             :   }
   56317        1932 :   arg2 = reinterpret_cast< char * >(buf2);
   56318        1932 :   {
   56319        1932 :     if (!arg2) {
   56320           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56321             :     }
   56322             :   }
   56323        1931 :   {
   56324        1931 :     const int bLocalUseExceptions = GetUseExceptions();
   56325        1931 :     if ( bLocalUseExceptions ) {
   56326        1930 :       pushErrorHandler();
   56327             :     }
   56328        1931 :     {
   56329        1931 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56330        1931 :       result = (GDALAlgorithmHS *)GDALAlgorithmRegistryHS_InstantiateAlg(arg1,(char const *)arg2);
   56331        1931 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56332             :     }
   56333        1931 :     if ( bLocalUseExceptions ) {
   56334        1930 :       popErrorHandler();
   56335             :     }
   56336             : #ifndef SED_HACKS
   56337             :     if ( bLocalUseExceptions ) {
   56338             :       CPLErr eclass = CPLGetLastErrorType();
   56339             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56340             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56341             :       }
   56342             :     }
   56343             : #endif
   56344             :   }
   56345        1931 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   56346        1931 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56347        1932 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56348             :   return resultobj;
   56349           1 : fail:
   56350           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56351             :   return NULL;
   56352             : }
   56353             : 
   56354             : 
   56355         277 : SWIGINTERN PyObject *AlgorithmRegistry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56356         277 :   PyObject *obj;
   56357         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   56358         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_NewClientData(obj));
   56359         277 :   return SWIG_Py_Void();
   56360             : }
   56361             : 
   56362        1818 : SWIGINTERN PyObject *_wrap_delete_ArgDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56363        1818 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56364        1818 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56365        1818 :   void *argp1 = 0 ;
   56366        1818 :   int res1 = 0 ;
   56367        1818 :   PyObject *swig_obj[1] ;
   56368             :   
   56369        1818 :   if (!args) SWIG_fail;
   56370        1818 :   swig_obj[0] = args;
   56371        1818 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_DISOWN |  0 );
   56372        1818 :   if (!SWIG_IsOK(res1)) {
   56373           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArgDatasetValue" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56374             :   }
   56375        1818 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56376        1818 :   {
   56377        1818 :     const int bLocalUseExceptions = GetUseExceptions();
   56378        1818 :     if ( bLocalUseExceptions ) {
   56379        1816 :       pushErrorHandler();
   56380             :     }
   56381        1818 :     {
   56382        1818 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56383        1818 :       delete_GDALArgDatasetValueHS(arg1);
   56384        1818 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56385             :     }
   56386        1818 :     if ( bLocalUseExceptions ) {
   56387        1816 :       popErrorHandler();
   56388             :     }
   56389             : #ifndef SED_HACKS
   56390             :     if ( bLocalUseExceptions ) {
   56391             :       CPLErr eclass = CPLGetLastErrorType();
   56392             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56393             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56394             :       }
   56395             :     }
   56396             : #endif
   56397             :   }
   56398        1818 :   resultobj = SWIG_Py_Void();
   56399        1818 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56400             :   return resultobj;
   56401             : fail:
   56402             :   return NULL;
   56403             : }
   56404             : 
   56405             : 
   56406           2 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56407           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56408           2 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56409           2 :   void *argp1 = 0 ;
   56410           2 :   int res1 = 0 ;
   56411           2 :   PyObject *swig_obj[1] ;
   56412           2 :   char *result = 0 ;
   56413             :   
   56414           2 :   if (!args) SWIG_fail;
   56415           2 :   swig_obj[0] = args;
   56416           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56417           2 :   if (!SWIG_IsOK(res1)) {
   56418           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56419             :   }
   56420           2 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56421           2 :   {
   56422           2 :     const int bLocalUseExceptions = GetUseExceptions();
   56423           2 :     if ( bLocalUseExceptions ) {
   56424           2 :       pushErrorHandler();
   56425             :     }
   56426           2 :     {
   56427           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56428           2 :       result = (char *)GDALArgDatasetValueHS_GetName(arg1);
   56429           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56430             :     }
   56431           2 :     if ( bLocalUseExceptions ) {
   56432           2 :       popErrorHandler();
   56433             :     }
   56434             : #ifndef SED_HACKS
   56435             :     if ( bLocalUseExceptions ) {
   56436             :       CPLErr eclass = CPLGetLastErrorType();
   56437             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56438             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56439             :       }
   56440             :     }
   56441             : #endif
   56442             :   }
   56443           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   56444           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; } }
   56445             :   return resultobj;
   56446             : fail:
   56447             :   return NULL;
   56448             : }
   56449             : 
   56450             : 
   56451         641 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56452         641 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56453         641 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56454         641 :   void *argp1 = 0 ;
   56455         641 :   int res1 = 0 ;
   56456         641 :   PyObject *swig_obj[1] ;
   56457         641 :   GDALDatasetShadow *result = 0 ;
   56458             :   
   56459         641 :   if (!args) SWIG_fail;
   56460         641 :   swig_obj[0] = args;
   56461         641 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56462         641 :   if (!SWIG_IsOK(res1)) {
   56463           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56464             :   }
   56465         641 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56466         641 :   {
   56467         641 :     const int bLocalUseExceptions = GetUseExceptions();
   56468         641 :     if ( bLocalUseExceptions ) {
   56469         641 :       pushErrorHandler();
   56470             :     }
   56471         641 :     {
   56472         641 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56473         641 :       result = (GDALDatasetShadow *)GDALArgDatasetValueHS_GetDataset(arg1);
   56474         641 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56475             :     }
   56476         641 :     if ( bLocalUseExceptions ) {
   56477         641 :       popErrorHandler();
   56478             :     }
   56479             : #ifndef SED_HACKS
   56480             :     if ( bLocalUseExceptions ) {
   56481             :       CPLErr eclass = CPLGetLastErrorType();
   56482             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56483             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56484             :       }
   56485             :     }
   56486             : #endif
   56487             :   }
   56488         641 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   56489         641 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56490             :   return resultobj;
   56491             : fail:
   56492             :   return NULL;
   56493             : }
   56494             : 
   56495             : 
   56496         835 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56497         835 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56498         835 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56499         835 :   char *arg2 = (char *) 0 ;
   56500         835 :   void *argp1 = 0 ;
   56501         835 :   int res1 = 0 ;
   56502         835 :   int res2 ;
   56503         835 :   char *buf2 = 0 ;
   56504         835 :   int alloc2 = 0 ;
   56505         835 :   PyObject *swig_obj[2] ;
   56506             :   
   56507         835 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetName", 2, 2, swig_obj)) SWIG_fail;
   56508         835 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56509         835 :   if (!SWIG_IsOK(res1)) {
   56510           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56511             :   }
   56512         835 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56513         835 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56514         835 :   if (!SWIG_IsOK(res2)) {
   56515           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetName" "', argument " "2"" of type '" "char const *""'");
   56516             :   }
   56517         835 :   arg2 = reinterpret_cast< char * >(buf2);
   56518         835 :   {
   56519         835 :     if (!arg2) {
   56520           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56521             :     }
   56522             :   }
   56523         835 :   {
   56524         835 :     const int bLocalUseExceptions = GetUseExceptions();
   56525         835 :     if ( bLocalUseExceptions ) {
   56526         833 :       pushErrorHandler();
   56527             :     }
   56528         835 :     {
   56529         835 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56530         835 :       GDALArgDatasetValueHS_SetName(arg1,(char const *)arg2);
   56531         835 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56532             :     }
   56533         835 :     if ( bLocalUseExceptions ) {
   56534         833 :       popErrorHandler();
   56535             :     }
   56536             : #ifndef SED_HACKS
   56537             :     if ( bLocalUseExceptions ) {
   56538             :       CPLErr eclass = CPLGetLastErrorType();
   56539             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56540             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56541             :       }
   56542             :     }
   56543             : #endif
   56544             :   }
   56545         835 :   resultobj = SWIG_Py_Void();
   56546         835 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56547         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; } }
   56548             :   return resultobj;
   56549           0 : fail:
   56550           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56551             :   return NULL;
   56552             : }
   56553             : 
   56554             : 
   56555         335 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56556         335 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56557         335 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56558         335 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   56559         335 :   void *argp1 = 0 ;
   56560         335 :   int res1 = 0 ;
   56561         335 :   void *argp2 = 0 ;
   56562         335 :   int res2 = 0 ;
   56563         335 :   PyObject *swig_obj[2] ;
   56564             :   
   56565         335 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   56566         335 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56567         335 :   if (!SWIG_IsOK(res1)) {
   56568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56569             :   }
   56570         335 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56571         335 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   56572         335 :   if (!SWIG_IsOK(res2)) {
   56573           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   56574             :   }
   56575         335 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   56576         335 :   {
   56577         335 :     const int bLocalUseExceptions = GetUseExceptions();
   56578         335 :     if ( bLocalUseExceptions ) {
   56579         335 :       pushErrorHandler();
   56580             :     }
   56581         335 :     {
   56582         335 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56583         335 :       GDALArgDatasetValueHS_SetDataset(arg1,arg2);
   56584         335 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56585             :     }
   56586         335 :     if ( bLocalUseExceptions ) {
   56587         335 :       popErrorHandler();
   56588             :     }
   56589             : #ifndef SED_HACKS
   56590             :     if ( bLocalUseExceptions ) {
   56591             :       CPLErr eclass = CPLGetLastErrorType();
   56592             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56593             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56594             :       }
   56595             :     }
   56596             : #endif
   56597             :   }
   56598         335 :   resultobj = SWIG_Py_Void();
   56599         335 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56600             :   return resultobj;
   56601             : fail:
   56602             :   return NULL;
   56603             : }
   56604             : 
   56605             : 
   56606         277 : SWIGINTERN PyObject *ArgDatasetValue_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56607         277 :   PyObject *obj;
   56608         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   56609         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_NewClientData(obj));
   56610         277 :   return SWIG_Py_Void();
   56611             : }
   56612             : 
   56613         401 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56614         401 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56615         401 :   double *arg1 ;
   56616         401 :   double arg2 ;
   56617         401 :   double arg3 ;
   56618         401 :   double *arg4 = (double *) 0 ;
   56619         401 :   double *arg5 = (double *) 0 ;
   56620         401 :   double argin1[6] ;
   56621         401 :   double val2 ;
   56622         401 :   int ecode2 = 0 ;
   56623         401 :   double val3 ;
   56624         401 :   int ecode3 = 0 ;
   56625         401 :   double temp4 ;
   56626         401 :   int res4 = SWIG_TMPOBJ ;
   56627         401 :   double temp5 ;
   56628         401 :   int res5 = SWIG_TMPOBJ ;
   56629         401 :   PyObject *swig_obj[3] ;
   56630             :   
   56631         401 :   arg4 = &temp4;
   56632         401 :   arg5 = &temp5;
   56633         401 :   if (!SWIG_Python_UnpackTuple(args, "ApplyGeoTransform", 3, 3, swig_obj)) SWIG_fail;
   56634         401 :   {
   56635             :     /* %typemap(in) (double argin1[ANY]) */
   56636         401 :     arg1 = argin1;
   56637         401 :     if (! PySequence_Check(swig_obj[0]) ) {
   56638           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56639           0 :       SWIG_fail;
   56640             :     }
   56641         401 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56642         401 :     if ( seq_size != 6 ) {
   56643           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56644           0 :       SWIG_fail;
   56645             :     }
   56646        2807 :     for (unsigned int i=0; i<6; i++) {
   56647        2406 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56648        2406 :       double val;
   56649        2406 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56650           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56651           0 :         Py_DECREF(o);
   56652           0 :         SWIG_fail;
   56653             :       }
   56654        2406 :       arg1[i] =  val;
   56655        2406 :       Py_DECREF(o);
   56656             :     }
   56657             :   }
   56658         401 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   56659         401 :   if (!SWIG_IsOK(ecode2)) {
   56660           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   56661             :   } 
   56662         401 :   arg2 = static_cast< double >(val2);
   56663         401 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   56664         401 :   if (!SWIG_IsOK(ecode3)) {
   56665           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   56666             :   } 
   56667         401 :   arg3 = static_cast< double >(val3);
   56668         401 :   {
   56669         401 :     const int bLocalUseExceptions = GetUseExceptions();
   56670         401 :     if ( bLocalUseExceptions ) {
   56671           0 :       pushErrorHandler();
   56672             :     }
   56673         401 :     {
   56674         401 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56675         401 :       GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   56676         401 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56677             :     }
   56678         401 :     if ( bLocalUseExceptions ) {
   56679           0 :       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         401 :   resultobj = SWIG_Py_Void();
   56691         401 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   56692         401 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   56693             :   } else {
   56694           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56695           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   56696             :   }
   56697         401 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   56698         401 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   56699             :   } else {
   56700           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56701           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   56702             :   }
   56703         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; } }
   56704             :   return resultobj;
   56705             : fail:
   56706             :   return NULL;
   56707             : }
   56708             : 
   56709             : 
   56710          17 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56711          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56712          17 :   double *arg1 ;
   56713          17 :   double *arg2 ;
   56714          17 :   double argin1[6] ;
   56715          17 :   double argout2[6] ;
   56716          17 :   PyObject *swig_obj[1] ;
   56717          17 :   RETURN_NONE result;
   56718             :   
   56719          17 :   {
   56720             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   56721          17 :     memset(argout2, 0, sizeof(argout2));
   56722          17 :     arg2 = argout2;
   56723             :   }
   56724          17 :   if (!args) SWIG_fail;
   56725          17 :   swig_obj[0] = args;
   56726          17 :   {
   56727             :     /* %typemap(in) (double argin1[ANY]) */
   56728          17 :     arg1 = argin1;
   56729          17 :     if (! PySequence_Check(swig_obj[0]) ) {
   56730           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56731           0 :       SWIG_fail;
   56732             :     }
   56733          17 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56734          17 :     if ( seq_size != 6 ) {
   56735           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56736           0 :       SWIG_fail;
   56737             :     }
   56738         119 :     for (unsigned int i=0; i<6; i++) {
   56739         102 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56740         102 :       double val;
   56741         102 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56742           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56743           0 :         Py_DECREF(o);
   56744           0 :         SWIG_fail;
   56745             :       }
   56746         102 :       arg1[i] =  val;
   56747         102 :       Py_DECREF(o);
   56748             :     }
   56749             :   }
   56750          17 :   {
   56751          17 :     const int bLocalUseExceptions = GetUseExceptions();
   56752          17 :     if ( bLocalUseExceptions ) {
   56753           9 :       pushErrorHandler();
   56754             :     }
   56755          17 :     {
   56756          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56757          17 :       result = (RETURN_NONE)GDALInvGeoTransform(arg1,arg2);
   56758          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56759             :     }
   56760          17 :     if ( bLocalUseExceptions ) {
   56761           9 :       popErrorHandler();
   56762             :     }
   56763             : #ifndef SED_HACKS
   56764             :     if ( bLocalUseExceptions ) {
   56765             :       CPLErr eclass = CPLGetLastErrorType();
   56766             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56767             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56768             :       }
   56769             :     }
   56770             : #endif
   56771             :   }
   56772             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   56773          17 :   {
   56774             :     /* %typemap(argout) (double argout[ANY]) */
   56775          17 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   56776             : #if SWIG_VERSION >= 0x040300
   56777             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   56778             : #else
   56779          17 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   56780             : #endif
   56781             :   }
   56782          17 :   {
   56783             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   56784          17 :     if (result == 0 ) {
   56785           3 :       Py_XDECREF( resultobj );
   56786           3 :       resultobj = Py_None;
   56787           3 :       Py_INCREF(resultobj);
   56788             :     }
   56789          17 :     if (resultobj == 0) {
   56790           0 :       resultobj = Py_None;
   56791           0 :       Py_INCREF(resultobj);
   56792             :     }
   56793             :   }
   56794          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; } }
   56795             :   return resultobj;
   56796             : fail:
   56797             :   return NULL;
   56798             : }
   56799             : 
   56800             : 
   56801          10 : SWIGINTERN PyObject *_wrap_ApplyHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56802          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56803          10 :   double *arg1 ;
   56804          10 :   double arg2 ;
   56805          10 :   double arg3 ;
   56806          10 :   double *arg4 = (double *) 0 ;
   56807          10 :   double *arg5 = (double *) 0 ;
   56808          10 :   double argin1[9] ;
   56809          10 :   double val2 ;
   56810          10 :   int ecode2 = 0 ;
   56811          10 :   double val3 ;
   56812          10 :   int ecode3 = 0 ;
   56813          10 :   double temp4 ;
   56814          10 :   int res4 = SWIG_TMPOBJ ;
   56815          10 :   double temp5 ;
   56816          10 :   int res5 = SWIG_TMPOBJ ;
   56817          10 :   PyObject *swig_obj[3] ;
   56818          10 :   int result;
   56819             :   
   56820          10 :   arg4 = &temp4;
   56821          10 :   arg5 = &temp5;
   56822          10 :   if (!SWIG_Python_UnpackTuple(args, "ApplyHomography", 3, 3, swig_obj)) SWIG_fail;
   56823          10 :   {
   56824             :     /* %typemap(in) (double argin1[ANY]) */
   56825          10 :     arg1 = argin1;
   56826          10 :     if (! PySequence_Check(swig_obj[0]) ) {
   56827           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56828           0 :       SWIG_fail;
   56829             :     }
   56830          10 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56831          10 :     if ( seq_size != 9 ) {
   56832           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56833           0 :       SWIG_fail;
   56834             :     }
   56835         100 :     for (unsigned int i=0; i<9; i++) {
   56836          90 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56837          90 :       double val;
   56838          90 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56839           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56840           0 :         Py_DECREF(o);
   56841           0 :         SWIG_fail;
   56842             :       }
   56843          90 :       arg1[i] =  val;
   56844          90 :       Py_DECREF(o);
   56845             :     }
   56846             :   }
   56847          10 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   56848          10 :   if (!SWIG_IsOK(ecode2)) {
   56849           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyHomography" "', argument " "2"" of type '" "double""'");
   56850             :   } 
   56851          10 :   arg2 = static_cast< double >(val2);
   56852          10 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   56853          10 :   if (!SWIG_IsOK(ecode3)) {
   56854           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyHomography" "', argument " "3"" of type '" "double""'");
   56855             :   } 
   56856          10 :   arg3 = static_cast< double >(val3);
   56857          10 :   {
   56858          10 :     const int bLocalUseExceptions = GetUseExceptions();
   56859          10 :     if ( bLocalUseExceptions ) {
   56860          10 :       pushErrorHandler();
   56861             :     }
   56862          10 :     {
   56863          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56864          10 :       result = (int)GDALApplyHomography(arg1,arg2,arg3,arg4,arg5);
   56865          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56866             :     }
   56867          10 :     if ( bLocalUseExceptions ) {
   56868          10 :       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          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56880          10 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   56881          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   56882             :   } else {
   56883           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56884           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   56885             :   }
   56886          10 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   56887          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   56888             :   } else {
   56889           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56890           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   56891             :   }
   56892          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; } }
   56893             :   return resultobj;
   56894             : fail:
   56895             :   return NULL;
   56896             : }
   56897             : 
   56898             : 
   56899           7 : SWIGINTERN PyObject *_wrap_InvHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56900           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56901           7 :   double *arg1 ;
   56902           7 :   double *arg2 ;
   56903           7 :   double argin1[9] ;
   56904           7 :   double argout2[9] ;
   56905           7 :   PyObject *swig_obj[1] ;
   56906           7 :   RETURN_NONE result;
   56907             :   
   56908           7 :   {
   56909             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   56910           7 :     memset(argout2, 0, sizeof(argout2));
   56911           7 :     arg2 = argout2;
   56912             :   }
   56913           7 :   if (!args) SWIG_fail;
   56914           7 :   swig_obj[0] = args;
   56915           7 :   {
   56916             :     /* %typemap(in) (double argin1[ANY]) */
   56917           7 :     arg1 = argin1;
   56918           7 :     if (! PySequence_Check(swig_obj[0]) ) {
   56919           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56920           0 :       SWIG_fail;
   56921             :     }
   56922           7 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56923           7 :     if ( seq_size != 9 ) {
   56924           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56925           0 :       SWIG_fail;
   56926             :     }
   56927          70 :     for (unsigned int i=0; i<9; i++) {
   56928          63 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56929          63 :       double val;
   56930          63 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56931           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56932           0 :         Py_DECREF(o);
   56933           0 :         SWIG_fail;
   56934             :       }
   56935          63 :       arg1[i] =  val;
   56936          63 :       Py_DECREF(o);
   56937             :     }
   56938             :   }
   56939           7 :   {
   56940           7 :     const int bLocalUseExceptions = GetUseExceptions();
   56941           7 :     if ( bLocalUseExceptions ) {
   56942           7 :       pushErrorHandler();
   56943             :     }
   56944           7 :     {
   56945           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56946           7 :       result = (RETURN_NONE)GDALInvHomography(arg1,arg2);
   56947           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56948             :     }
   56949           7 :     if ( bLocalUseExceptions ) {
   56950           7 :       popErrorHandler();
   56951             :     }
   56952             : #ifndef SED_HACKS
   56953             :     if ( bLocalUseExceptions ) {
   56954             :       CPLErr eclass = CPLGetLastErrorType();
   56955             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56956             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56957             :       }
   56958             :     }
   56959             : #endif
   56960             :   }
   56961             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   56962           7 :   {
   56963             :     /* %typemap(argout) (double argout[ANY]) */
   56964           7 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 9 );
   56965             : #if SWIG_VERSION >= 0x040300
   56966             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   56967             : #else
   56968           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   56969             : #endif
   56970             :   }
   56971           7 :   {
   56972             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   56973           7 :     if (result == 0 ) {
   56974           3 :       Py_XDECREF( resultobj );
   56975           3 :       resultobj = Py_None;
   56976           3 :       Py_INCREF(resultobj);
   56977             :     }
   56978           7 :     if (resultobj == 0) {
   56979           0 :       resultobj = Py_None;
   56980           0 :       Py_INCREF(resultobj);
   56981             :     }
   56982             :   }
   56983          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; } }
   56984             :   return resultobj;
   56985             : fail:
   56986             :   return NULL;
   56987             : }
   56988             : 
   56989             : 
   56990        3897 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56991        3897 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56992        3897 :   char *arg1 = (char *) "VERSION_NUM" ;
   56993        3897 :   int res1 ;
   56994        3897 :   char *buf1 = 0 ;
   56995        3897 :   int alloc1 = 0 ;
   56996        3897 :   PyObject *swig_obj[1] ;
   56997        3897 :   char *result = 0 ;
   56998             :   
   56999        3897 :   if (!SWIG_Python_UnpackTuple(args, "VersionInfo", 0, 1, swig_obj)) SWIG_fail;
   57000        3897 :   if (swig_obj[0]) {
   57001        3897 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57002        3897 :     if (!SWIG_IsOK(res1)) {
   57003           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   57004             :     }
   57005        3897 :     arg1 = reinterpret_cast< char * >(buf1);
   57006             :   }
   57007        3897 :   {
   57008        3897 :     const int bLocalUseExceptions = GetUseExceptions();
   57009        3897 :     if ( bLocalUseExceptions ) {
   57010        3275 :       pushErrorHandler();
   57011             :     }
   57012        3897 :     {
   57013        3897 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57014        3897 :       result = (char *)GDALVersionInfo((char const *)arg1);
   57015        3897 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57016             :     }
   57017        3897 :     if ( bLocalUseExceptions ) {
   57018        3275 :       popErrorHandler();
   57019             :     }
   57020             : #ifndef SED_HACKS
   57021             :     if ( bLocalUseExceptions ) {
   57022             :       CPLErr eclass = CPLGetLastErrorType();
   57023             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57024             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57025             :       }
   57026             :     }
   57027             : #endif
   57028             :   }
   57029        3897 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57030        3897 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57031        3897 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57032             :   return resultobj;
   57033           0 : fail:
   57034           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57035             :   return NULL;
   57036             : }
   57037             : 
   57038             : 
   57039         274 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57040         274 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57041             :   
   57042         274 :   if (!SWIG_Python_UnpackTuple(args, "AllRegister", 0, 0, 0)) SWIG_fail;
   57043         274 :   {
   57044         274 :     const int bLocalUseExceptions = GetUseExceptions();
   57045         274 :     if ( bLocalUseExceptions ) {
   57046         225 :       pushErrorHandler();
   57047             :     }
   57048         274 :     {
   57049         274 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57050         274 :       GDALAllRegister();
   57051         274 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57052             :     }
   57053         274 :     if ( bLocalUseExceptions ) {
   57054         225 :       popErrorHandler();
   57055             :     }
   57056             : #ifndef SED_HACKS
   57057             :     if ( bLocalUseExceptions ) {
   57058             :       CPLErr eclass = CPLGetLastErrorType();
   57059             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57060             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57061             :       }
   57062             :     }
   57063             : #endif
   57064             :   }
   57065         274 :   resultobj = SWIG_Py_Void();
   57066         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; } }
   57067             :   return resultobj;
   57068           0 : fail:
   57069           0 :   return NULL;
   57070             : }
   57071             : 
   57072             : 
   57073           0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57074           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57075             :   
   57076           0 :   if (!SWIG_Python_UnpackTuple(args, "GDALDestroyDriverManager", 0, 0, 0)) SWIG_fail;
   57077           0 :   {
   57078           0 :     const int bLocalUseExceptions = GetUseExceptions();
   57079           0 :     if ( bLocalUseExceptions ) {
   57080           0 :       pushErrorHandler();
   57081             :     }
   57082           0 :     {
   57083           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57084           0 :       GDALDestroyDriverManager();
   57085           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57086             :     }
   57087           0 :     if ( bLocalUseExceptions ) {
   57088           0 :       popErrorHandler();
   57089             :     }
   57090             : #ifndef SED_HACKS
   57091             :     if ( bLocalUseExceptions ) {
   57092             :       CPLErr eclass = CPLGetLastErrorType();
   57093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57095             :       }
   57096             :     }
   57097             : #endif
   57098             :   }
   57099           0 :   resultobj = SWIG_Py_Void();
   57100           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; } }
   57101             :   return resultobj;
   57102           0 : fail:
   57103           0 :   return NULL;
   57104             : }
   57105             : 
   57106             : 
   57107          56 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57108          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57109          56 :   GIntBig result;
   57110             :   
   57111          56 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheMax", 0, 0, 0)) SWIG_fail;
   57112          56 :   {
   57113          56 :     const int bLocalUseExceptions = GetUseExceptions();
   57114          56 :     if ( bLocalUseExceptions ) {
   57115          26 :       pushErrorHandler();
   57116             :     }
   57117          56 :     {
   57118          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57119          56 :       result = wrapper_GDALGetCacheMax();
   57120          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57121             :     }
   57122          56 :     if ( bLocalUseExceptions ) {
   57123          26 :       popErrorHandler();
   57124             :     }
   57125             : #ifndef SED_HACKS
   57126             :     if ( bLocalUseExceptions ) {
   57127             :       CPLErr eclass = CPLGetLastErrorType();
   57128             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57129             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57130             :       }
   57131             :     }
   57132             : #endif
   57133             :   }
   57134          56 :   {
   57135          56 :     resultobj = PyLong_FromLongLong(result);
   57136             :   }
   57137          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; } }
   57138             :   return resultobj;
   57139           0 : fail:
   57140           0 :   return NULL;
   57141             : }
   57142             : 
   57143             : 
   57144           2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57145           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57146           2 :   GIntBig result;
   57147             :   
   57148           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheUsed", 0, 0, 0)) SWIG_fail;
   57149           2 :   {
   57150           2 :     const int bLocalUseExceptions = GetUseExceptions();
   57151           2 :     if ( bLocalUseExceptions ) {
   57152           0 :       pushErrorHandler();
   57153             :     }
   57154           2 :     {
   57155           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57156           2 :       result = wrapper_GDALGetCacheUsed();
   57157           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57158             :     }
   57159           2 :     if ( bLocalUseExceptions ) {
   57160           0 :       popErrorHandler();
   57161             :     }
   57162             : #ifndef SED_HACKS
   57163             :     if ( bLocalUseExceptions ) {
   57164             :       CPLErr eclass = CPLGetLastErrorType();
   57165             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57166             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57167             :       }
   57168             :     }
   57169             : #endif
   57170             :   }
   57171           2 :   {
   57172           2 :     resultobj = PyLong_FromLongLong(result);
   57173             :   }
   57174           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; } }
   57175             :   return resultobj;
   57176           0 : fail:
   57177           0 :   return NULL;
   57178             : }
   57179             : 
   57180             : 
   57181          76 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57182          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57183          76 :   GIntBig arg1 ;
   57184          76 :   PyObject *swig_obj[1] ;
   57185             :   
   57186          76 :   if (!args) SWIG_fail;
   57187          76 :   swig_obj[0] = args;
   57188          76 :   {
   57189          76 :     arg1 = (GIntBig)PyLong_AsLongLong(swig_obj[0]);
   57190             :   }
   57191          76 :   {
   57192          76 :     const int bLocalUseExceptions = GetUseExceptions();
   57193          76 :     if ( bLocalUseExceptions ) {
   57194          20 :       pushErrorHandler();
   57195             :     }
   57196          76 :     {
   57197          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57198          76 :       wrapper_GDALSetCacheMax(arg1);
   57199          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57200             :     }
   57201          76 :     if ( bLocalUseExceptions ) {
   57202          20 :       popErrorHandler();
   57203             :     }
   57204             : #ifndef SED_HACKS
   57205             :     if ( bLocalUseExceptions ) {
   57206             :       CPLErr eclass = CPLGetLastErrorType();
   57207             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57208             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57209             :       }
   57210             :     }
   57211             : #endif
   57212             :   }
   57213          76 :   resultobj = SWIG_Py_Void();
   57214          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; } }
   57215             :   return resultobj;
   57216           0 : fail:
   57217           0 :   return NULL;
   57218             : }
   57219             : 
   57220             : 
   57221          43 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57222          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57223          43 :   GDALDataType arg1 ;
   57224          43 :   PyObject *swig_obj[1] ;
   57225          43 :   int result;
   57226             :   
   57227          43 :   if (!args) SWIG_fail;
   57228          43 :   swig_obj[0] = args;
   57229          43 :   {
   57230             :     // %typemap(in) GDALDataType
   57231          43 :     int val = 0;
   57232          43 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57233          43 :     if (!SWIG_IsOK(ecode)) {
   57234           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57235             :     }
   57236          43 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57237             :     {
   57238           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57239             :     }
   57240          43 :     arg1 = static_cast<GDALDataType>(val);
   57241             :   }
   57242          43 :   {
   57243          43 :     const int bLocalUseExceptions = GetUseExceptions();
   57244          43 :     if ( bLocalUseExceptions ) {
   57245          21 :       pushErrorHandler();
   57246             :     }
   57247          43 :     {
   57248          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57249          43 :       result = (int)wrapper_GDALGetDataTypeSizeBits(arg1);
   57250          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57251             :     }
   57252          43 :     if ( bLocalUseExceptions ) {
   57253          21 :       popErrorHandler();
   57254             :     }
   57255             : #ifndef SED_HACKS
   57256             :     if ( bLocalUseExceptions ) {
   57257             :       CPLErr eclass = CPLGetLastErrorType();
   57258             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57259             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57260             :       }
   57261             :     }
   57262             : #endif
   57263             :   }
   57264          43 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57265          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; } }
   57266             :   return resultobj;
   57267             : fail:
   57268             :   return NULL;
   57269             : }
   57270             : 
   57271             : 
   57272           0 : SWIGINTERN PyObject *_wrap_GetDataTypeSizeBits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57273           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57274           0 :   GDALDataType arg1 ;
   57275           0 :   PyObject *swig_obj[1] ;
   57276           0 :   int result;
   57277             :   
   57278           0 :   if (!args) SWIG_fail;
   57279           0 :   swig_obj[0] = args;
   57280           0 :   {
   57281             :     // %typemap(in) GDALDataType
   57282           0 :     int val = 0;
   57283           0 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57284           0 :     if (!SWIG_IsOK(ecode)) {
   57285           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57286             :     }
   57287           0 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57288             :     {
   57289           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57290             :     }
   57291           0 :     arg1 = static_cast<GDALDataType>(val);
   57292             :   }
   57293           0 :   {
   57294           0 :     const int bLocalUseExceptions = GetUseExceptions();
   57295           0 :     if ( bLocalUseExceptions ) {
   57296           0 :       pushErrorHandler();
   57297             :     }
   57298           0 :     {
   57299           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57300           0 :       result = (int)GDALGetDataTypeSizeBits(arg1);
   57301           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57302             :     }
   57303           0 :     if ( bLocalUseExceptions ) {
   57304           0 :       popErrorHandler();
   57305             :     }
   57306             : #ifndef SED_HACKS
   57307             :     if ( bLocalUseExceptions ) {
   57308             :       CPLErr eclass = CPLGetLastErrorType();
   57309             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57310             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57311             :       }
   57312             :     }
   57313             : #endif
   57314             :   }
   57315           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57316           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; } }
   57317             :   return resultobj;
   57318             : fail:
   57319             :   return NULL;
   57320             : }
   57321             : 
   57322             : 
   57323          24 : SWIGINTERN PyObject *_wrap_GetDataTypeSizeBytes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57324          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57325          24 :   GDALDataType arg1 ;
   57326          24 :   PyObject *swig_obj[1] ;
   57327          24 :   int result;
   57328             :   
   57329          24 :   if (!args) SWIG_fail;
   57330          24 :   swig_obj[0] = args;
   57331          24 :   {
   57332             :     // %typemap(in) GDALDataType
   57333          24 :     int val = 0;
   57334          24 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57335          24 :     if (!SWIG_IsOK(ecode)) {
   57336           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57337             :     }
   57338          24 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57339             :     {
   57340           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57341             :     }
   57342          24 :     arg1 = static_cast<GDALDataType>(val);
   57343             :   }
   57344          24 :   {
   57345          24 :     const int bLocalUseExceptions = GetUseExceptions();
   57346          24 :     if ( bLocalUseExceptions ) {
   57347          24 :       pushErrorHandler();
   57348             :     }
   57349          24 :     {
   57350          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57351          24 :       result = (int)GDALGetDataTypeSizeBytes(arg1);
   57352          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57353             :     }
   57354          24 :     if ( bLocalUseExceptions ) {
   57355          24 :       popErrorHandler();
   57356             :     }
   57357             : #ifndef SED_HACKS
   57358             :     if ( bLocalUseExceptions ) {
   57359             :       CPLErr eclass = CPLGetLastErrorType();
   57360             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57361             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57362             :       }
   57363             :     }
   57364             : #endif
   57365             :   }
   57366          24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57367          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; } }
   57368             :   return resultobj;
   57369             : fail:
   57370             :   return NULL;
   57371             : }
   57372             : 
   57373             : 
   57374         217 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57375         217 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57376         217 :   GDALDataType arg1 ;
   57377         217 :   PyObject *swig_obj[1] ;
   57378         217 :   int result;
   57379             :   
   57380         217 :   if (!args) SWIG_fail;
   57381         217 :   swig_obj[0] = args;
   57382         217 :   {
   57383             :     // %typemap(in) GDALDataType
   57384         217 :     int val = 0;
   57385         217 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57386         217 :     if (!SWIG_IsOK(ecode)) {
   57387           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57388             :     }
   57389         217 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57390             :     {
   57391           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57392             :     }
   57393         217 :     arg1 = static_cast<GDALDataType>(val);
   57394             :   }
   57395         217 :   {
   57396         217 :     const int bLocalUseExceptions = GetUseExceptions();
   57397         217 :     if ( bLocalUseExceptions ) {
   57398         159 :       pushErrorHandler();
   57399             :     }
   57400         217 :     {
   57401         217 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57402         217 :       result = (int)GDALDataTypeIsComplex(arg1);
   57403         217 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57404             :     }
   57405         217 :     if ( bLocalUseExceptions ) {
   57406         159 :       popErrorHandler();
   57407             :     }
   57408             : #ifndef SED_HACKS
   57409             :     if ( bLocalUseExceptions ) {
   57410             :       CPLErr eclass = CPLGetLastErrorType();
   57411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57413             :       }
   57414             :     }
   57415             : #endif
   57416             :   }
   57417         217 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57418         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; } }
   57419             :   return resultobj;
   57420             : fail:
   57421             :   return NULL;
   57422             : }
   57423             : 
   57424             : 
   57425        3871 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57426        3871 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57427        3871 :   GDALDataType arg1 ;
   57428        3871 :   PyObject *swig_obj[1] ;
   57429        3871 :   char *result = 0 ;
   57430             :   
   57431        3871 :   if (!args) SWIG_fail;
   57432        3871 :   swig_obj[0] = args;
   57433        3871 :   {
   57434             :     // %typemap(in) GDALDataType
   57435        3871 :     int val = 0;
   57436        3871 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57437        3871 :     if (!SWIG_IsOK(ecode)) {
   57438           1 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57439             :     }
   57440        3870 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57441             :     {
   57442           2 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57443             :     }
   57444        3868 :     arg1 = static_cast<GDALDataType>(val);
   57445             :   }
   57446        3868 :   {
   57447        3868 :     const int bLocalUseExceptions = GetUseExceptions();
   57448        3868 :     if ( bLocalUseExceptions ) {
   57449         275 :       pushErrorHandler();
   57450             :     }
   57451        3868 :     {
   57452        3868 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57453        3868 :       result = (char *)GDALGetDataTypeName(arg1);
   57454        3868 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57455             :     }
   57456        3868 :     if ( bLocalUseExceptions ) {
   57457         275 :       popErrorHandler();
   57458             :     }
   57459             : #ifndef SED_HACKS
   57460             :     if ( bLocalUseExceptions ) {
   57461             :       CPLErr eclass = CPLGetLastErrorType();
   57462             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57463             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57464             :       }
   57465             :     }
   57466             : #endif
   57467             :   }
   57468        3868 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57469        3871 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57470             :   return resultobj;
   57471             : fail:
   57472             :   return NULL;
   57473             : }
   57474             : 
   57475             : 
   57476         995 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57477         995 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57478         995 :   char *arg1 = (char *) 0 ;
   57479         995 :   int res1 ;
   57480         995 :   char *buf1 = 0 ;
   57481         995 :   int alloc1 = 0 ;
   57482         995 :   PyObject *swig_obj[1] ;
   57483         995 :   GDALDataType result;
   57484             :   
   57485         995 :   if (!args) SWIG_fail;
   57486         995 :   swig_obj[0] = args;
   57487         995 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57488         995 :   if (!SWIG_IsOK(res1)) {
   57489           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   57490             :   }
   57491         995 :   arg1 = reinterpret_cast< char * >(buf1);
   57492         995 :   {
   57493         995 :     const int bLocalUseExceptions = GetUseExceptions();
   57494         995 :     if ( bLocalUseExceptions ) {
   57495          89 :       pushErrorHandler();
   57496             :     }
   57497         995 :     {
   57498         995 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57499         995 :       result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   57500         995 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57501             :     }
   57502         995 :     if ( bLocalUseExceptions ) {
   57503          89 :       popErrorHandler();
   57504             :     }
   57505             : #ifndef SED_HACKS
   57506             :     if ( bLocalUseExceptions ) {
   57507             :       CPLErr eclass = CPLGetLastErrorType();
   57508             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57509             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57510             :       }
   57511             :     }
   57512             : #endif
   57513             :   }
   57514         995 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57515         995 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57516         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; } }
   57517             :   return resultobj;
   57518           0 : fail:
   57519           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57520             :   return NULL;
   57521             : }
   57522             : 
   57523             : 
   57524          65 : SWIGINTERN PyObject *_wrap_DataTypeUnion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57525          65 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57526          65 :   GDALDataType arg1 ;
   57527          65 :   GDALDataType arg2 ;
   57528          65 :   PyObject *swig_obj[2] ;
   57529          65 :   GDALDataType result;
   57530             :   
   57531          65 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnion", 2, 2, swig_obj)) SWIG_fail;
   57532          65 :   {
   57533             :     // %typemap(in) GDALDataType
   57534          65 :     int val = 0;
   57535          65 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57536          65 :     if (!SWIG_IsOK(ecode)) {
   57537           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57538             :     }
   57539          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57540             :     {
   57541           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57542             :     }
   57543          65 :     arg1 = static_cast<GDALDataType>(val);
   57544             :   }
   57545          65 :   {
   57546             :     // %typemap(in) GDALDataType
   57547          65 :     int val = 0;
   57548          65 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   57549          65 :     if (!SWIG_IsOK(ecode)) {
   57550           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57551             :     }
   57552          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57553             :     {
   57554           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57555             :     }
   57556          65 :     arg2 = static_cast<GDALDataType>(val);
   57557             :   }
   57558          65 :   {
   57559          65 :     const int bLocalUseExceptions = GetUseExceptions();
   57560          65 :     if ( bLocalUseExceptions ) {
   57561          64 :       pushErrorHandler();
   57562             :     }
   57563          65 :     {
   57564          65 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57565          65 :       result = (GDALDataType)GDALDataTypeUnion(arg1,arg2);
   57566          65 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57567             :     }
   57568          65 :     if ( bLocalUseExceptions ) {
   57569          64 :       popErrorHandler();
   57570             :     }
   57571             : #ifndef SED_HACKS
   57572             :     if ( bLocalUseExceptions ) {
   57573             :       CPLErr eclass = CPLGetLastErrorType();
   57574             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57575             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57576             :       }
   57577             :     }
   57578             : #endif
   57579             :   }
   57580          65 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57581          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; } }
   57582             :   return resultobj;
   57583             : fail:
   57584             :   return NULL;
   57585             : }
   57586             : 
   57587             : 
   57588           8 : SWIGINTERN PyObject *_wrap_DataTypeUnionWithValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57589           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57590           8 :   GDALDataType arg1 ;
   57591           8 :   double arg2 ;
   57592           8 :   bool arg3 ;
   57593           8 :   double val2 ;
   57594           8 :   int ecode2 = 0 ;
   57595           8 :   bool val3 ;
   57596           8 :   int ecode3 = 0 ;
   57597           8 :   PyObject *swig_obj[3] ;
   57598           8 :   GDALDataType result;
   57599             :   
   57600           8 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnionWithValue", 3, 3, swig_obj)) SWIG_fail;
   57601           8 :   {
   57602             :     // %typemap(in) GDALDataType
   57603           8 :     int val = 0;
   57604           8 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57605           8 :     if (!SWIG_IsOK(ecode)) {
   57606           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57607             :     }
   57608           8 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57609             :     {
   57610           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57611             :     }
   57612           8 :     arg1 = static_cast<GDALDataType>(val);
   57613             :   }
   57614           8 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   57615           8 :   if (!SWIG_IsOK(ecode2)) {
   57616           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataTypeUnionWithValue" "', argument " "2"" of type '" "double""'");
   57617             :   } 
   57618           8 :   arg2 = static_cast< double >(val2);
   57619           8 :   ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
   57620           8 :   if (!SWIG_IsOK(ecode3)) {
   57621           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DataTypeUnionWithValue" "', argument " "3"" of type '" "bool""'");
   57622             :   } 
   57623           8 :   arg3 = static_cast< bool >(val3);
   57624           8 :   {
   57625           8 :     const int bLocalUseExceptions = GetUseExceptions();
   57626           8 :     if ( bLocalUseExceptions ) {
   57627           8 :       pushErrorHandler();
   57628             :     }
   57629           8 :     {
   57630           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57631           8 :       result = (GDALDataType)GDALDataTypeUnionWithValue(arg1,arg2,arg3);
   57632           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57633             :     }
   57634           8 :     if ( bLocalUseExceptions ) {
   57635           8 :       popErrorHandler();
   57636             :     }
   57637             : #ifndef SED_HACKS
   57638             :     if ( bLocalUseExceptions ) {
   57639             :       CPLErr eclass = CPLGetLastErrorType();
   57640             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57641             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57642             :       }
   57643             :     }
   57644             : #endif
   57645             :   }
   57646           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57647           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; } }
   57648             :   return resultobj;
   57649             : fail:
   57650             :   return NULL;
   57651             : }
   57652             : 
   57653             : 
   57654          61 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57655          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57656          61 :   GDALColorInterp arg1 ;
   57657          61 :   int val1 ;
   57658          61 :   int ecode1 = 0 ;
   57659          61 :   PyObject *swig_obj[1] ;
   57660          61 :   char *result = 0 ;
   57661             :   
   57662          61 :   if (!args) SWIG_fail;
   57663          61 :   swig_obj[0] = args;
   57664          61 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   57665          61 :   if (!SWIG_IsOK(ecode1)) {
   57666           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   57667             :   } 
   57668          61 :   arg1 = static_cast< GDALColorInterp >(val1);
   57669          61 :   {
   57670          61 :     const int bLocalUseExceptions = GetUseExceptions();
   57671          61 :     if ( bLocalUseExceptions ) {
   57672           4 :       pushErrorHandler();
   57673             :     }
   57674          61 :     {
   57675          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57676          61 :       result = (char *)GDALGetColorInterpretationName(arg1);
   57677          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57678             :     }
   57679          61 :     if ( bLocalUseExceptions ) {
   57680           4 :       popErrorHandler();
   57681             :     }
   57682             : #ifndef SED_HACKS
   57683             :     if ( bLocalUseExceptions ) {
   57684             :       CPLErr eclass = CPLGetLastErrorType();
   57685             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57686             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57687             :       }
   57688             :     }
   57689             : #endif
   57690             :   }
   57691          61 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57692          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; } }
   57693             :   return resultobj;
   57694             : fail:
   57695             :   return NULL;
   57696             : }
   57697             : 
   57698             : 
   57699          41 : SWIGINTERN PyObject *_wrap_GetColorInterpretationByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57700          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57701          41 :   char *arg1 = (char *) 0 ;
   57702          41 :   int res1 ;
   57703          41 :   char *buf1 = 0 ;
   57704          41 :   int alloc1 = 0 ;
   57705          41 :   PyObject *swig_obj[1] ;
   57706          41 :   GDALColorInterp result;
   57707             :   
   57708          41 :   if (!args) SWIG_fail;
   57709          41 :   swig_obj[0] = args;
   57710          41 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57711          41 :   if (!SWIG_IsOK(res1)) {
   57712           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetColorInterpretationByName" "', argument " "1"" of type '" "char const *""'");
   57713             :   }
   57714          41 :   arg1 = reinterpret_cast< char * >(buf1);
   57715          41 :   {
   57716          41 :     const int bLocalUseExceptions = GetUseExceptions();
   57717          41 :     if ( bLocalUseExceptions ) {
   57718           1 :       pushErrorHandler();
   57719             :     }
   57720          41 :     {
   57721          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57722          41 :       result = (GDALColorInterp)GDALGetColorInterpretationByName((char const *)arg1);
   57723          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57724             :     }
   57725          41 :     if ( bLocalUseExceptions ) {
   57726           1 :       popErrorHandler();
   57727             :     }
   57728             : #ifndef SED_HACKS
   57729             :     if ( bLocalUseExceptions ) {
   57730             :       CPLErr eclass = CPLGetLastErrorType();
   57731             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57732             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57733             :       }
   57734             :     }
   57735             : #endif
   57736             :   }
   57737          41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57738          41 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57739          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; } }
   57740             :   return resultobj;
   57741           0 : fail:
   57742           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57743             :   return NULL;
   57744             : }
   57745             : 
   57746             : 
   57747           2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57748           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57749           2 :   GDALPaletteInterp arg1 ;
   57750           2 :   int val1 ;
   57751           2 :   int ecode1 = 0 ;
   57752           2 :   PyObject *swig_obj[1] ;
   57753           2 :   char *result = 0 ;
   57754             :   
   57755           2 :   if (!args) SWIG_fail;
   57756           2 :   swig_obj[0] = args;
   57757           2 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   57758           2 :   if (!SWIG_IsOK(ecode1)) {
   57759           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   57760             :   } 
   57761           2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   57762           2 :   {
   57763           2 :     const int bLocalUseExceptions = GetUseExceptions();
   57764           2 :     if ( bLocalUseExceptions ) {
   57765           0 :       pushErrorHandler();
   57766             :     }
   57767           2 :     {
   57768           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57769           2 :       result = (char *)GDALGetPaletteInterpretationName(arg1);
   57770           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57771             :     }
   57772           2 :     if ( bLocalUseExceptions ) {
   57773           0 :       popErrorHandler();
   57774             :     }
   57775             : #ifndef SED_HACKS
   57776             :     if ( bLocalUseExceptions ) {
   57777             :       CPLErr eclass = CPLGetLastErrorType();
   57778             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57779             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57780             :       }
   57781             :     }
   57782             : #endif
   57783             :   }
   57784           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57785           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; } }
   57786             :   return resultobj;
   57787             : fail:
   57788             :   return NULL;
   57789             : }
   57790             : 
   57791             : 
   57792         130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57793         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57794         130 :   double arg1 ;
   57795         130 :   char *arg2 = (char *) 0 ;
   57796         130 :   int arg3 = (int) 2 ;
   57797         130 :   double val1 ;
   57798         130 :   int ecode1 = 0 ;
   57799         130 :   int res2 ;
   57800         130 :   char *buf2 = 0 ;
   57801         130 :   int alloc2 = 0 ;
   57802         130 :   int val3 ;
   57803         130 :   int ecode3 = 0 ;
   57804         130 :   PyObject *swig_obj[3] ;
   57805         130 :   char *result = 0 ;
   57806             :   
   57807         130 :   if (!SWIG_Python_UnpackTuple(args, "DecToDMS", 2, 3, swig_obj)) SWIG_fail;
   57808         130 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57809         130 :   if (!SWIG_IsOK(ecode1)) {
   57810           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   57811             :   } 
   57812         130 :   arg1 = static_cast< double >(val1);
   57813         130 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   57814         130 :   if (!SWIG_IsOK(res2)) {
   57815           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   57816             :   }
   57817         130 :   arg2 = reinterpret_cast< char * >(buf2);
   57818         130 :   if (swig_obj[2]) {
   57819         130 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   57820         130 :     if (!SWIG_IsOK(ecode3)) {
   57821           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   57822             :     } 
   57823             :     arg3 = static_cast< int >(val3);
   57824             :   }
   57825         130 :   {
   57826         130 :     const int bLocalUseExceptions = GetUseExceptions();
   57827         130 :     if ( bLocalUseExceptions ) {
   57828           0 :       pushErrorHandler();
   57829             :     }
   57830         130 :     {
   57831         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57832         130 :       result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   57833         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57834             :     }
   57835         130 :     if ( bLocalUseExceptions ) {
   57836           0 :       popErrorHandler();
   57837             :     }
   57838             : #ifndef SED_HACKS
   57839             :     if ( bLocalUseExceptions ) {
   57840             :       CPLErr eclass = CPLGetLastErrorType();
   57841             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57842             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57843             :       }
   57844             :     }
   57845             : #endif
   57846             :   }
   57847         130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57848         130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   57849         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; } }
   57850             :   return resultobj;
   57851           0 : fail:
   57852           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   57853             :   return NULL;
   57854             : }
   57855             : 
   57856             : 
   57857           4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57858           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57859           4 :   double arg1 ;
   57860           4 :   double val1 ;
   57861           4 :   int ecode1 = 0 ;
   57862           4 :   PyObject *swig_obj[1] ;
   57863           4 :   double result;
   57864             :   
   57865           4 :   if (!args) SWIG_fail;
   57866           4 :   swig_obj[0] = args;
   57867           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57868           4 :   if (!SWIG_IsOK(ecode1)) {
   57869           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   57870             :   } 
   57871           4 :   arg1 = static_cast< double >(val1);
   57872           4 :   {
   57873           4 :     const int bLocalUseExceptions = GetUseExceptions();
   57874           4 :     if ( bLocalUseExceptions ) {
   57875           4 :       pushErrorHandler();
   57876             :     }
   57877           4 :     {
   57878           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57879           4 :       result = (double)GDALPackedDMSToDec(arg1);
   57880           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57881             :     }
   57882           4 :     if ( bLocalUseExceptions ) {
   57883           4 :       popErrorHandler();
   57884             :     }
   57885             : #ifndef SED_HACKS
   57886             :     if ( bLocalUseExceptions ) {
   57887             :       CPLErr eclass = CPLGetLastErrorType();
   57888             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57889             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57890             :       }
   57891             :     }
   57892             : #endif
   57893             :   }
   57894           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   57895           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; } }
   57896             :   return resultobj;
   57897             : fail:
   57898             :   return NULL;
   57899             : }
   57900             : 
   57901             : 
   57902           4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57903           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57904           4 :   double arg1 ;
   57905           4 :   double val1 ;
   57906           4 :   int ecode1 = 0 ;
   57907           4 :   PyObject *swig_obj[1] ;
   57908           4 :   double result;
   57909             :   
   57910           4 :   if (!args) SWIG_fail;
   57911           4 :   swig_obj[0] = args;
   57912           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57913           4 :   if (!SWIG_IsOK(ecode1)) {
   57914           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   57915             :   } 
   57916           4 :   arg1 = static_cast< double >(val1);
   57917           4 :   {
   57918           4 :     const int bLocalUseExceptions = GetUseExceptions();
   57919           4 :     if ( bLocalUseExceptions ) {
   57920           4 :       pushErrorHandler();
   57921             :     }
   57922           4 :     {
   57923           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57924           4 :       result = (double)GDALDecToPackedDMS(arg1);
   57925           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57926             :     }
   57927           4 :     if ( bLocalUseExceptions ) {
   57928           4 :       popErrorHandler();
   57929             :     }
   57930             : #ifndef SED_HACKS
   57931             :     if ( bLocalUseExceptions ) {
   57932             :       CPLErr eclass = CPLGetLastErrorType();
   57933             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57934             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57935             :       }
   57936             :     }
   57937             : #endif
   57938             :   }
   57939           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   57940           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; } }
   57941             :   return resultobj;
   57942             : fail:
   57943             :   return NULL;
   57944             : }
   57945             : 
   57946             : 
   57947          49 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57948          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57949          49 :   char *arg1 = (char *) 0 ;
   57950          49 :   int res1 ;
   57951          49 :   char *buf1 = 0 ;
   57952          49 :   int alloc1 = 0 ;
   57953          49 :   PyObject *swig_obj[1] ;
   57954          49 :   CPLXMLNode *result = 0 ;
   57955             :   
   57956          49 :   if (!args) SWIG_fail;
   57957          49 :   swig_obj[0] = args;
   57958          49 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57959          49 :   if (!SWIG_IsOK(res1)) {
   57960           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   57961             :   }
   57962          49 :   arg1 = reinterpret_cast< char * >(buf1);
   57963          49 :   {
   57964          49 :     const int bLocalUseExceptions = GetUseExceptions();
   57965          49 :     if ( bLocalUseExceptions ) {
   57966          24 :       pushErrorHandler();
   57967             :     }
   57968          49 :     {
   57969          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57970          49 :       result = (CPLXMLNode *)CPLParseXMLString(arg1);
   57971          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57972             :     }
   57973          49 :     if ( bLocalUseExceptions ) {
   57974          24 :       popErrorHandler();
   57975             :     }
   57976             : #ifndef SED_HACKS
   57977             :     if ( bLocalUseExceptions ) {
   57978             :       CPLErr eclass = CPLGetLastErrorType();
   57979             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57980             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57981             :       }
   57982             :     }
   57983             : #endif
   57984             :   }
   57985          49 :   {
   57986             :     /* %typemap(out) (CPLXMLNode*) */
   57987             :     
   57988          49 :     CPLXMLNode *psXMLTree = result;
   57989          49 :     int         bFakeRoot = FALSE;
   57990             :     
   57991          49 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   57992             :     {
   57993           3 :       CPLXMLNode *psFirst = psXMLTree;
   57994             :       
   57995             :       /* create a "pseudo" root if we have multiple elements */
   57996           3 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   57997           3 :       psXMLTree->psChild = psFirst;
   57998           3 :       bFakeRoot = TRUE;
   57999             :     }
   58000             :     
   58001          49 :     resultobj = XMLTreeToPyList( psXMLTree );
   58002             :     
   58003          49 :     if( bFakeRoot )
   58004             :     {
   58005           3 :       psXMLTree->psChild = NULL;
   58006           3 :       CPLDestroyXMLNode( psXMLTree );
   58007             :     }
   58008             :   }
   58009          49 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58010          49 :   {
   58011             :     /* %typemap(ret) (CPLXMLNode*) */
   58012          49 :     if ( result ) CPLDestroyXMLNode( result );
   58013             :   }
   58014          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; } }
   58015             :   return resultobj;
   58016           0 : fail:
   58017           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58018             :   return NULL;
   58019             : }
   58020             : 
   58021             : 
   58022          13 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58023          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58024          13 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   58025          13 :   PyObject *swig_obj[1] ;
   58026          13 :   retStringAndCPLFree *result = 0 ;
   58027             :   
   58028          13 :   if (!args) SWIG_fail;
   58029          13 :   swig_obj[0] = args;
   58030          13 :   {
   58031             :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   58032          13 :     arg1 = PyListToXMLTree( swig_obj[0] );
   58033          13 :     if ( !arg1 ) SWIG_fail;
   58034             :   }
   58035          13 :   {
   58036          13 :     const int bLocalUseExceptions = GetUseExceptions();
   58037          13 :     if ( bLocalUseExceptions ) {
   58038           3 :       pushErrorHandler();
   58039             :     }
   58040          13 :     {
   58041          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58042          13 :       result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   58043          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58044             :     }
   58045          13 :     if ( bLocalUseExceptions ) {
   58046           3 :       popErrorHandler();
   58047             :     }
   58048             : #ifndef SED_HACKS
   58049             :     if ( bLocalUseExceptions ) {
   58050             :       CPLErr eclass = CPLGetLastErrorType();
   58051             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58052             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58053             :       }
   58054             :     }
   58055             : #endif
   58056             :   }
   58057          13 :   {
   58058             :     /* %typemap(out) (retStringAndCPLFree*) */
   58059          13 :     Py_XDECREF(resultobj);
   58060          13 :     if(result)
   58061             :     {
   58062          13 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   58063          13 :       CPLFree(result);
   58064             :     }
   58065             :     else
   58066             :     {
   58067           0 :       resultobj = Py_None;
   58068           0 :       Py_INCREF(resultobj);
   58069             :     }
   58070             :   }
   58071          13 :   {
   58072             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   58073          13 :     CPLDestroyXMLNode( arg1 );
   58074             :   }
   58075          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; } }
   58076             :   return resultobj;
   58077           0 : fail:
   58078           0 :   {
   58079             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   58080           0 :     CPLDestroyXMLNode( arg1 );
   58081             :   }
   58082             :   return NULL;
   58083             : }
   58084             : 
   58085             : 
   58086          30 : SWIGINTERN PyObject *_wrap_GetJPEG2000Structure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58087          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58088          30 :   char *arg1 = (char *) 0 ;
   58089          30 :   char **arg2 = (char **) NULL ;
   58090          30 :   int res1 ;
   58091          30 :   char *buf1 = 0 ;
   58092          30 :   int alloc1 = 0 ;
   58093          30 :   PyObject *swig_obj[2] ;
   58094          30 :   CPLXMLNode *result = 0 ;
   58095             :   
   58096          30 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000Structure", 1, 2, swig_obj)) SWIG_fail;
   58097          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   58098          30 :   if (!SWIG_IsOK(res1)) {
   58099           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000Structure" "', argument " "1"" of type '" "char const *""'");
   58100             :   }
   58101          30 :   arg1 = reinterpret_cast< char * >(buf1);
   58102          30 :   if (swig_obj[1]) {
   58103          30 :     {
   58104             :       /* %typemap(in) char **dict */
   58105          30 :       arg2 = NULL;
   58106          30 :       if ( PySequence_Check( swig_obj[1] ) ) {
   58107          30 :         int bErr = FALSE;
   58108          30 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   58109          30 :         if ( bErr )
   58110             :         {
   58111           0 :           SWIG_fail;
   58112             :         }
   58113             :       }
   58114           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   58115           0 :         int bErr = FALSE;
   58116           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   58117           0 :         if ( bErr )
   58118             :         {
   58119           0 :           SWIG_fail;
   58120             :         }
   58121             :       }
   58122             :       else {
   58123           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58124           0 :         SWIG_fail;
   58125             :       }
   58126             :     }
   58127             :   }
   58128          30 :   {
   58129          30 :     const int bLocalUseExceptions = GetUseExceptions();
   58130          30 :     if ( bLocalUseExceptions ) {
   58131           0 :       pushErrorHandler();
   58132             :     }
   58133          30 :     {
   58134          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58135          30 :       result = (CPLXMLNode *)GDALGetJPEG2000Structure((char const *)arg1,arg2);
   58136          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58137             :     }
   58138          30 :     if ( bLocalUseExceptions ) {
   58139           0 :       popErrorHandler();
   58140             :     }
   58141             : #ifndef SED_HACKS
   58142             :     if ( bLocalUseExceptions ) {
   58143             :       CPLErr eclass = CPLGetLastErrorType();
   58144             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58145             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58146             :       }
   58147             :     }
   58148             : #endif
   58149             :   }
   58150          30 :   {
   58151             :     /* %typemap(out) (CPLXMLNode*) */
   58152             :     
   58153          30 :     CPLXMLNode *psXMLTree = result;
   58154          30 :     int         bFakeRoot = FALSE;
   58155             :     
   58156          30 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   58157             :     {
   58158           0 :       CPLXMLNode *psFirst = psXMLTree;
   58159             :       
   58160             :       /* create a "pseudo" root if we have multiple elements */
   58161           0 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   58162           0 :       psXMLTree->psChild = psFirst;
   58163           0 :       bFakeRoot = TRUE;
   58164             :     }
   58165             :     
   58166          30 :     resultobj = XMLTreeToPyList( psXMLTree );
   58167             :     
   58168          30 :     if( bFakeRoot )
   58169             :     {
   58170           0 :       psXMLTree->psChild = NULL;
   58171           0 :       CPLDestroyXMLNode( psXMLTree );
   58172             :     }
   58173             :   }
   58174          30 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58175          30 :   {
   58176             :     /* %typemap(freearg) char **dict */
   58177          30 :     CSLDestroy( arg2 );
   58178             :   }
   58179          30 :   {
   58180             :     /* %typemap(ret) (CPLXMLNode*) */
   58181          30 :     if ( result ) CPLDestroyXMLNode( result );
   58182             :   }
   58183          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; } }
   58184             :   return resultobj;
   58185           0 : fail:
   58186           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58187           0 :   {
   58188             :     /* %typemap(freearg) char **dict */
   58189           0 :     CSLDestroy( arg2 );
   58190             :   }
   58191             :   return NULL;
   58192             : }
   58193             : 
   58194             : 
   58195           9 : SWIGINTERN PyObject *_wrap_GetJPEG2000StructureAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58196           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58197           9 :   char *arg1 = (char *) 0 ;
   58198           9 :   char **arg2 = (char **) NULL ;
   58199           9 :   int res1 ;
   58200           9 :   char *buf1 = 0 ;
   58201           9 :   int alloc1 = 0 ;
   58202           9 :   PyObject *swig_obj[2] ;
   58203           9 :   retStringAndCPLFree *result = 0 ;
   58204             :   
   58205           9 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000StructureAsString", 1, 2, swig_obj)) SWIG_fail;
   58206           9 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   58207           9 :   if (!SWIG_IsOK(res1)) {
   58208           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000StructureAsString" "', argument " "1"" of type '" "char const *""'");
   58209             :   }
   58210           9 :   arg1 = reinterpret_cast< char * >(buf1);
   58211           9 :   if (swig_obj[1]) {
   58212           9 :     {
   58213             :       /* %typemap(in) char **dict */
   58214           9 :       arg2 = NULL;
   58215           9 :       if ( PySequence_Check( swig_obj[1] ) ) {
   58216           9 :         int bErr = FALSE;
   58217           9 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   58218           9 :         if ( bErr )
   58219             :         {
   58220           0 :           SWIG_fail;
   58221             :         }
   58222             :       }
   58223           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   58224           0 :         int bErr = FALSE;
   58225           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   58226           0 :         if ( bErr )
   58227             :         {
   58228           0 :           SWIG_fail;
   58229             :         }
   58230             :       }
   58231             :       else {
   58232           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58233           0 :         SWIG_fail;
   58234             :       }
   58235             :     }
   58236             :   }
   58237           9 :   {
   58238           9 :     const int bLocalUseExceptions = GetUseExceptions();
   58239           9 :     if ( bLocalUseExceptions ) {
   58240           5 :       pushErrorHandler();
   58241             :     }
   58242           9 :     {
   58243           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58244           9 :       result = (retStringAndCPLFree *)GetJPEG2000StructureAsString((char const *)arg1,arg2);
   58245           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58246             :     }
   58247           9 :     if ( bLocalUseExceptions ) {
   58248           5 :       popErrorHandler();
   58249             :     }
   58250             : #ifndef SED_HACKS
   58251             :     if ( bLocalUseExceptions ) {
   58252             :       CPLErr eclass = CPLGetLastErrorType();
   58253             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58254             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58255             :       }
   58256             :     }
   58257             : #endif
   58258             :   }
   58259           9 :   {
   58260             :     /* %typemap(out) (retStringAndCPLFree*) */
   58261           9 :     Py_XDECREF(resultobj);
   58262           9 :     if(result)
   58263             :     {
   58264           9 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   58265           9 :       CPLFree(result);
   58266             :     }
   58267             :     else
   58268             :     {
   58269           0 :       resultobj = Py_None;
   58270           0 :       Py_INCREF(resultobj);
   58271             :     }
   58272             :   }
   58273           9 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58274           9 :   {
   58275             :     /* %typemap(freearg) char **dict */
   58276           9 :     CSLDestroy( arg2 );
   58277             :   }
   58278          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; } }
   58279             :   return resultobj;
   58280           0 : fail:
   58281           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58282           0 :   {
   58283             :     /* %typemap(freearg) char **dict */
   58284           0 :     CSLDestroy( arg2 );
   58285             :   }
   58286             :   return NULL;
   58287             : }
   58288             : 
   58289             : 
   58290           6 : SWIGINTERN PyObject *_wrap_HasTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58291           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58292           6 :   int result;
   58293             :   
   58294           6 :   if (!SWIG_Python_UnpackTuple(args, "HasTriangulation", 0, 0, 0)) SWIG_fail;
   58295           6 :   {
   58296           6 :     const int bLocalUseExceptions = GetUseExceptions();
   58297           6 :     if ( bLocalUseExceptions ) {
   58298           6 :       pushErrorHandler();
   58299             :     }
   58300           6 :     {
   58301           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58302           6 :       result = (int)GDALHasTriangulation();
   58303           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58304             :     }
   58305           6 :     if ( bLocalUseExceptions ) {
   58306           6 :       popErrorHandler();
   58307             :     }
   58308             : #ifndef SED_HACKS
   58309             :     if ( bLocalUseExceptions ) {
   58310             :       CPLErr eclass = CPLGetLastErrorType();
   58311             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58312             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58313             :       }
   58314             :     }
   58315             : #endif
   58316             :   }
   58317           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   58318           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; } }
   58319             :   return resultobj;
   58320           0 : fail:
   58321           0 :   return NULL;
   58322             : }
   58323             : 
   58324             : 
   58325         373 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58326         373 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58327         373 :   int result;
   58328             :   
   58329         373 :   if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
   58330         373 :   {
   58331         373 :     const int bLocalUseExceptions = GetUseExceptions();
   58332         373 :     if ( bLocalUseExceptions ) {
   58333         303 :       pushErrorHandler();
   58334             :     }
   58335         373 :     {
   58336         373 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58337         373 :       result = (int)GetDriverCount();
   58338         373 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58339             :     }
   58340         373 :     if ( bLocalUseExceptions ) {
   58341         303 :       popErrorHandler();
   58342             :     }
   58343             : #ifndef SED_HACKS
   58344             :     if ( bLocalUseExceptions ) {
   58345             :       CPLErr eclass = CPLGetLastErrorType();
   58346             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58347             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58348             :       }
   58349             :     }
   58350             : #endif
   58351             :   }
   58352         373 :   resultobj = SWIG_From_int(static_cast< int >(result));
   58353         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; } }
   58354             :   return resultobj;
   58355           0 : fail:
   58356           0 :   return NULL;
   58357             : }
   58358             : 
   58359             : 
   58360       15901 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58361       15901 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58362       15901 :   char *arg1 = (char *) 0 ;
   58363       15901 :   int res1 ;
   58364       15901 :   char *buf1 = 0 ;
   58365       15901 :   int alloc1 = 0 ;
   58366       15901 :   PyObject *swig_obj[1] ;
   58367       15901 :   GDALDriverShadow *result = 0 ;
   58368             :   
   58369       15901 :   if (!args) SWIG_fail;
   58370       15901 :   swig_obj[0] = args;
   58371       15901 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   58372       15901 :   if (!SWIG_IsOK(res1)) {
   58373           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   58374             :   }
   58375       15901 :   arg1 = reinterpret_cast< char * >(buf1);
   58376       15901 :   {
   58377       15901 :     if (!arg1) {
   58378           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58379             :     }
   58380             :   }
   58381       15901 :   {
   58382       15901 :     const int bLocalUseExceptions = GetUseExceptions();
   58383       15901 :     if ( bLocalUseExceptions ) {
   58384        9846 :       pushErrorHandler();
   58385             :     }
   58386       15901 :     {
   58387       15901 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58388       15901 :       result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   58389       15901 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58390             :     }
   58391       15901 :     if ( bLocalUseExceptions ) {
   58392        9846 :       popErrorHandler();
   58393             :     }
   58394             : #ifndef SED_HACKS
   58395             :     if ( bLocalUseExceptions ) {
   58396             :       CPLErr eclass = CPLGetLastErrorType();
   58397             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58398             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58399             :       }
   58400             :     }
   58401             : #endif
   58402             :   }
   58403       15901 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58404       15901 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58405       15901 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58406             :   return resultobj;
   58407           0 : fail:
   58408           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58409             :   return NULL;
   58410             : }
   58411             : 
   58412             : 
   58413       82225 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58414       82225 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58415       82225 :   int arg1 ;
   58416       82225 :   int val1 ;
   58417       82225 :   int ecode1 = 0 ;
   58418       82225 :   PyObject *swig_obj[1] ;
   58419       82225 :   GDALDriverShadow *result = 0 ;
   58420             :   
   58421       82225 :   if (!args) SWIG_fail;
   58422       82225 :   swig_obj[0] = args;
   58423       82225 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   58424       82225 :   if (!SWIG_IsOK(ecode1)) {
   58425           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   58426             :   } 
   58427       82225 :   arg1 = static_cast< int >(val1);
   58428       82225 :   {
   58429       82225 :     const int bLocalUseExceptions = GetUseExceptions();
   58430       82225 :     if ( bLocalUseExceptions ) {
   58431       67618 :       pushErrorHandler();
   58432             :     }
   58433       82225 :     {
   58434       82225 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58435       82225 :       result = (GDALDriverShadow *)GetDriver(arg1);
   58436       82225 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58437             :     }
   58438       82225 :     if ( bLocalUseExceptions ) {
   58439       67618 :       popErrorHandler();
   58440             :     }
   58441             : #ifndef SED_HACKS
   58442             :     if ( bLocalUseExceptions ) {
   58443             :       CPLErr eclass = CPLGetLastErrorType();
   58444             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58445             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58446             :       }
   58447             :     }
   58448             : #endif
   58449             :   }
   58450       82225 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58451       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; } }
   58452             :   return resultobj;
   58453             : fail:
   58454             :   return NULL;
   58455             : }
   58456             : 
   58457             : 
   58458       23394 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58459       23394 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58460       23394 :   char *arg1 = (char *) 0 ;
   58461       23394 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   58462       23394 :   int bToFree1 = 0 ;
   58463       23394 :   PyObject *swig_obj[2] ;
   58464       23394 :   GDALDatasetShadow *result = 0 ;
   58465             :   
   58466       23394 :   if (!SWIG_Python_UnpackTuple(args, "Open", 1, 2, swig_obj)) SWIG_fail;
   58467       23394 :   {
   58468             :     /* %typemap(in) (const char *utf8_path) */
   58469       23394 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58470             :     {
   58471       22520 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58472             :     }
   58473             :     else
   58474             :     {
   58475         874 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58476             :       
   58477             :     }
   58478       23394 :     if (arg1 == NULL)
   58479             :     {
   58480           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58481           1 :       SWIG_fail;
   58482             :     }
   58483             :   }
   58484       23393 :   if (swig_obj[1]) {
   58485        1514 :     {
   58486             :       // %typemap(in) GDALAccess
   58487        1514 :       int val = 0;
   58488        1514 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   58489        1514 :       if (!SWIG_IsOK(ecode)) {
   58490           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   58491             :       }
   58492        1513 :       if( val != GA_ReadOnly && val != GA_Update )
   58493             :       {
   58494           1 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   58495             :       }
   58496             :       arg2 = static_cast<GDALAccess>(val);
   58497             :     }
   58498             :   }
   58499       23391 :   {
   58500       23391 :     if (!arg1) {
   58501       23391 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58502             :     }
   58503             :   }
   58504       23391 :   {
   58505       23391 :     const int bLocalUseExceptions = GetUseExceptions();
   58506       23391 :     if ( bLocalUseExceptions ) {
   58507       11588 :       pushErrorHandler();
   58508             :     }
   58509       23391 :     {
   58510       23391 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58511       23391 :       result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   58512       23391 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58513             :     }
   58514       23391 :     if ( bLocalUseExceptions ) {
   58515       11588 :       popErrorHandler();
   58516             :     }
   58517             : #ifndef SED_HACKS
   58518             :     if( result == NULL && bLocalUseExceptions ) {
   58519             :       CPLErr eclass = CPLGetLastErrorType();
   58520             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58521             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58522             :       }
   58523             :     }
   58524             : #endif
   58525       23391 :     if( result != NULL && bLocalUseExceptions ) {
   58526             : #ifdef SED_HACKS
   58527       11297 :       bLocalUseExceptionsCode = FALSE;
   58528             : #endif
   58529             :     }
   58530             :   }
   58531       23391 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58532       23391 :   {
   58533             :     /* %typemap(freearg) (const char *utf8_path) */
   58534       23391 :     GDALPythonFreeCStr(arg1, bToFree1);
   58535             :   }
   58536       23971 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58537             :   return resultobj;
   58538           3 : fail:
   58539           3 :   {
   58540             :     /* %typemap(freearg) (const char *utf8_path) */
   58541       23396 :     GDALPythonFreeCStr(arg1, bToFree1);
   58542             :   }
   58543             :   return NULL;
   58544             : }
   58545             : 
   58546             : 
   58547        6621 : SWIGINTERN PyObject *_wrap_OpenEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   58548        6621 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58549        6621 :   char *arg1 = (char *) 0 ;
   58550        6621 :   unsigned int arg2 = (unsigned int) 0 ;
   58551        6621 :   char **arg3 = (char **) NULL ;
   58552        6621 :   char **arg4 = (char **) NULL ;
   58553        6621 :   char **arg5 = (char **) NULL ;
   58554        6621 :   int bToFree1 = 0 ;
   58555        6621 :   unsigned int val2 ;
   58556        6621 :   int ecode2 = 0 ;
   58557        6621 :   PyObject * obj0 = 0 ;
   58558        6621 :   PyObject * obj1 = 0 ;
   58559        6621 :   PyObject * obj2 = 0 ;
   58560        6621 :   PyObject * obj3 = 0 ;
   58561        6621 :   PyObject * obj4 = 0 ;
   58562        6621 :   char * kwnames[] = {
   58563             :     (char *)"utf8_path",  (char *)"nOpenFlags",  (char *)"allowed_drivers",  (char *)"open_options",  (char *)"sibling_files",  NULL 
   58564             :   };
   58565        6621 :   GDALDatasetShadow *result = 0 ;
   58566             :   
   58567        6621 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:OpenEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   58568        6621 :   {
   58569             :     /* %typemap(in) (const char *utf8_path) */
   58570        6621 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   58571             :     {
   58572        5856 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   58573             :     }
   58574             :     else
   58575             :     {
   58576         765 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   58577             :       
   58578             :     }
   58579        6621 :     if (arg1 == NULL)
   58580             :     {
   58581           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58582           0 :       SWIG_fail;
   58583             :     }
   58584             :   }
   58585        6621 :   if (obj1) {
   58586        3910 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   58587        3910 :     if (!SWIG_IsOK(ecode2)) {
   58588           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenEx" "', argument " "2"" of type '" "unsigned int""'");
   58589             :     } 
   58590             :     arg2 = static_cast< unsigned int >(val2);
   58591             :   }
   58592        6621 :   if (obj2) {
   58593        1999 :     {
   58594             :       /* %typemap(in) char **dict */
   58595        1999 :       arg3 = NULL;
   58596        1999 :       if ( PySequence_Check( obj2 ) ) {
   58597        1999 :         int bErr = FALSE;
   58598        1999 :         arg3 = CSLFromPySequence(obj2, &bErr);
   58599        1999 :         if ( bErr )
   58600             :         {
   58601           0 :           SWIG_fail;
   58602             :         }
   58603             :       }
   58604           0 :       else if ( PyMapping_Check( obj2 ) ) {
   58605           0 :         int bErr = FALSE;
   58606           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   58607           0 :         if ( bErr )
   58608             :         {
   58609           0 :           SWIG_fail;
   58610             :         }
   58611             :       }
   58612             :       else {
   58613           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58614           0 :         SWIG_fail;
   58615             :       }
   58616             :     }
   58617             :   }
   58618        6621 :   if (obj3) {
   58619        2604 :     {
   58620             :       /* %typemap(in) char **dict */
   58621        2604 :       arg4 = NULL;
   58622        2604 :       if ( PySequence_Check( obj3 ) ) {
   58623        2420 :         int bErr = FALSE;
   58624        2420 :         arg4 = CSLFromPySequence(obj3, &bErr);
   58625        2420 :         if ( bErr )
   58626             :         {
   58627           0 :           SWIG_fail;
   58628             :         }
   58629             :       }
   58630         184 :       else if ( PyMapping_Check( obj3 ) ) {
   58631         184 :         int bErr = FALSE;
   58632         184 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   58633         184 :         if ( bErr )
   58634             :         {
   58635           0 :           SWIG_fail;
   58636             :         }
   58637             :       }
   58638             :       else {
   58639           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58640           0 :         SWIG_fail;
   58641             :       }
   58642             :     }
   58643             :   }
   58644        6621 :   if (obj4) {
   58645           0 :     {
   58646             :       /* %typemap(in) char **dict */
   58647           0 :       arg5 = NULL;
   58648           0 :       if ( PySequence_Check( obj4 ) ) {
   58649           0 :         int bErr = FALSE;
   58650           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   58651           0 :         if ( bErr )
   58652             :         {
   58653           0 :           SWIG_fail;
   58654             :         }
   58655             :       }
   58656           0 :       else if ( PyMapping_Check( obj4 ) ) {
   58657           0 :         int bErr = FALSE;
   58658           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   58659           0 :         if ( bErr )
   58660             :         {
   58661           0 :           SWIG_fail;
   58662             :         }
   58663             :       }
   58664             :       else {
   58665           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58666           0 :         SWIG_fail;
   58667             :       }
   58668             :     }
   58669             :   }
   58670        6621 :   {
   58671        6621 :     if (!arg1) {
   58672        6621 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58673             :     }
   58674             :   }
   58675        6621 :   {
   58676        6621 :     const int bLocalUseExceptions = GetUseExceptions();
   58677        6621 :     if ( bLocalUseExceptions ) {
   58678        2986 :       pushErrorHandler();
   58679             :     }
   58680        6621 :     {
   58681        6621 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58682        6621 :       result = (GDALDatasetShadow *)OpenEx((char const *)arg1,arg2,arg3,arg4,arg5);
   58683        6621 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58684             :     }
   58685        6621 :     if ( bLocalUseExceptions ) {
   58686        2986 :       popErrorHandler();
   58687             :     }
   58688             : #ifndef SED_HACKS
   58689             :     if( result == NULL && bLocalUseExceptions ) {
   58690             :       CPLErr eclass = CPLGetLastErrorType();
   58691             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58692             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58693             :       }
   58694             :     }
   58695             : #endif
   58696        6621 :     if( result != NULL && bLocalUseExceptions ) {
   58697             : #ifdef SED_HACKS
   58698        2603 :       bLocalUseExceptionsCode = FALSE;
   58699             : #endif
   58700             :     }
   58701             :   }
   58702        6621 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58703        6621 :   {
   58704             :     /* %typemap(freearg) (const char *utf8_path) */
   58705        6621 :     GDALPythonFreeCStr(arg1, bToFree1);
   58706             :   }
   58707        6621 :   {
   58708             :     /* %typemap(freearg) char **dict */
   58709        6621 :     CSLDestroy( arg3 );
   58710             :   }
   58711        6621 :   {
   58712             :     /* %typemap(freearg) char **dict */
   58713        6621 :     CSLDestroy( arg4 );
   58714             :   }
   58715        6621 :   {
   58716             :     /* %typemap(freearg) char **dict */
   58717        6621 :     CSLDestroy( arg5 );
   58718             :   }
   58719        7387 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58720             :   return resultobj;
   58721           0 : fail:
   58722           0 :   {
   58723             :     /* %typemap(freearg) (const char *utf8_path) */
   58724           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58725             :   }
   58726           0 :   {
   58727             :     /* %typemap(freearg) char **dict */
   58728           0 :     CSLDestroy( arg3 );
   58729             :   }
   58730           0 :   {
   58731             :     /* %typemap(freearg) char **dict */
   58732           0 :     CSLDestroy( arg4 );
   58733             :   }
   58734           0 :   {
   58735             :     /* %typemap(freearg) char **dict */
   58736           0 :     CSLDestroy( arg5 );
   58737             :   }
   58738             :   return NULL;
   58739             : }
   58740             : 
   58741             : 
   58742        5053 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58743        5053 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58744        5053 :   char *arg1 = (char *) 0 ;
   58745        5053 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   58746        5053 :   int bToFree1 = 0 ;
   58747        5053 :   PyObject *swig_obj[2] ;
   58748        5053 :   GDALDatasetShadow *result = 0 ;
   58749             :   
   58750        5053 :   if (!SWIG_Python_UnpackTuple(args, "OpenShared", 1, 2, swig_obj)) SWIG_fail;
   58751        5053 :   {
   58752             :     /* %typemap(in) (const char *utf8_path) */
   58753        5053 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58754             :     {
   58755        5053 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58756             :     }
   58757             :     else
   58758             :     {
   58759           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58760             :       
   58761             :     }
   58762        5053 :     if (arg1 == NULL)
   58763             :     {
   58764           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58765           0 :       SWIG_fail;
   58766             :     }
   58767             :   }
   58768        5053 :   if (swig_obj[1]) {
   58769          50 :     {
   58770             :       // %typemap(in) GDALAccess
   58771          50 :       int val = 0;
   58772          50 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   58773          50 :       if (!SWIG_IsOK(ecode)) {
   58774           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   58775             :       }
   58776          50 :       if( val != GA_ReadOnly && val != GA_Update )
   58777             :       {
   58778           0 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   58779             :       }
   58780             :       arg2 = static_cast<GDALAccess>(val);
   58781             :     }
   58782             :   }
   58783        5053 :   {
   58784        5053 :     if (!arg1) {
   58785        5053 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58786             :     }
   58787             :   }
   58788        5053 :   {
   58789        5053 :     const int bLocalUseExceptions = GetUseExceptions();
   58790        5053 :     if ( bLocalUseExceptions ) {
   58791          51 :       pushErrorHandler();
   58792             :     }
   58793        5053 :     {
   58794        5053 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58795        5053 :       result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   58796        5053 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58797             :     }
   58798        5053 :     if ( bLocalUseExceptions ) {
   58799          51 :       popErrorHandler();
   58800             :     }
   58801             : #ifndef SED_HACKS
   58802             :     if( result == NULL && bLocalUseExceptions ) {
   58803             :       CPLErr eclass = CPLGetLastErrorType();
   58804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58806             :       }
   58807             :     }
   58808             : #endif
   58809        5053 :     if( result != NULL && bLocalUseExceptions ) {
   58810             : #ifdef SED_HACKS
   58811          51 :       bLocalUseExceptionsCode = FALSE;
   58812             : #endif
   58813             :     }
   58814             :   }
   58815        5053 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58816        5053 :   {
   58817             :     /* %typemap(freearg) (const char *utf8_path) */
   58818        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   58819             :   }
   58820        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; } }
   58821             :   return resultobj;
   58822           0 : fail:
   58823           0 :   {
   58824             :     /* %typemap(freearg) (const char *utf8_path) */
   58825        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   58826             :   }
   58827             :   return NULL;
   58828             : }
   58829             : 
   58830             : 
   58831          11 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58832          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58833          11 :   char *arg1 = (char *) 0 ;
   58834          11 :   char **arg2 = (char **) NULL ;
   58835          11 :   int bToFree1 = 0 ;
   58836          11 :   PyObject *swig_obj[2] ;
   58837          11 :   GDALDriverShadow *result = 0 ;
   58838             :   
   58839          11 :   if (!SWIG_Python_UnpackTuple(args, "IdentifyDriver", 1, 2, swig_obj)) SWIG_fail;
   58840          11 :   {
   58841             :     /* %typemap(in) (const char *utf8_path) */
   58842          11 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58843             :     {
   58844          11 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58845             :     }
   58846             :     else
   58847             :     {
   58848           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58849             :       
   58850             :     }
   58851          11 :     if (arg1 == NULL)
   58852             :     {
   58853           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58854           0 :       SWIG_fail;
   58855             :     }
   58856             :   }
   58857          11 :   if (swig_obj[1]) {
   58858           2 :     {
   58859             :       /* %typemap(in) char **dict */
   58860           2 :       arg2 = NULL;
   58861           2 :       if ( PySequence_Check( swig_obj[1] ) ) {
   58862           2 :         int bErr = FALSE;
   58863           2 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   58864           2 :         if ( bErr )
   58865             :         {
   58866           0 :           SWIG_fail;
   58867             :         }
   58868             :       }
   58869           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   58870           0 :         int bErr = FALSE;
   58871           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   58872           0 :         if ( bErr )
   58873             :         {
   58874           0 :           SWIG_fail;
   58875             :         }
   58876             :       }
   58877             :       else {
   58878           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58879           0 :         SWIG_fail;
   58880             :       }
   58881             :     }
   58882             :   }
   58883          11 :   {
   58884          11 :     if (!arg1) {
   58885          11 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58886             :     }
   58887             :   }
   58888          11 :   {
   58889          11 :     const int bLocalUseExceptions = GetUseExceptions();
   58890          11 :     if ( bLocalUseExceptions ) {
   58891           6 :       pushErrorHandler();
   58892             :     }
   58893          11 :     {
   58894          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58895          11 :       result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   58896          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58897             :     }
   58898          11 :     if ( bLocalUseExceptions ) {
   58899           6 :       popErrorHandler();
   58900             :     }
   58901             : #ifndef SED_HACKS
   58902             :     if ( bLocalUseExceptions ) {
   58903             :       CPLErr eclass = CPLGetLastErrorType();
   58904             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58905             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58906             :       }
   58907             :     }
   58908             : #endif
   58909             :   }
   58910          11 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58911          11 :   {
   58912             :     /* %typemap(freearg) (const char *utf8_path) */
   58913          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   58914             :   }
   58915          11 :   {
   58916             :     /* %typemap(freearg) char **dict */
   58917          11 :     CSLDestroy( arg2 );
   58918             :   }
   58919          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; } }
   58920             :   return resultobj;
   58921           0 : fail:
   58922           0 :   {
   58923             :     /* %typemap(freearg) (const char *utf8_path) */
   58924           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58925             :   }
   58926           0 :   {
   58927             :     /* %typemap(freearg) char **dict */
   58928           0 :     CSLDestroy( arg2 );
   58929             :   }
   58930             :   return NULL;
   58931             : }
   58932             : 
   58933             : 
   58934          50 : SWIGINTERN PyObject *_wrap_IdentifyDriverEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   58935          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58936          50 :   char *arg1 = (char *) 0 ;
   58937          50 :   unsigned int arg2 = (unsigned int) 0 ;
   58938          50 :   char **arg3 = (char **) NULL ;
   58939          50 :   char **arg4 = (char **) NULL ;
   58940          50 :   int bToFree1 = 0 ;
   58941          50 :   unsigned int val2 ;
   58942          50 :   int ecode2 = 0 ;
   58943          50 :   PyObject * obj0 = 0 ;
   58944          50 :   PyObject * obj1 = 0 ;
   58945          50 :   PyObject * obj2 = 0 ;
   58946          50 :   PyObject * obj3 = 0 ;
   58947          50 :   char * kwnames[] = {
   58948             :     (char *)"utf8_path",  (char *)"nIdentifyFlags",  (char *)"allowed_drivers",  (char *)"sibling_files",  NULL 
   58949             :   };
   58950          50 :   GDALDriverShadow *result = 0 ;
   58951             :   
   58952          50 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:IdentifyDriverEx", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   58953          50 :   {
   58954             :     /* %typemap(in) (const char *utf8_path) */
   58955          50 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   58956             :     {
   58957          50 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   58958             :     }
   58959             :     else
   58960             :     {
   58961           0 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   58962             :       
   58963             :     }
   58964          50 :     if (arg1 == NULL)
   58965             :     {
   58966           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58967           0 :       SWIG_fail;
   58968             :     }
   58969             :   }
   58970          50 :   if (obj1) {
   58971           3 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   58972           3 :     if (!SWIG_IsOK(ecode2)) {
   58973           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IdentifyDriverEx" "', argument " "2"" of type '" "unsigned int""'");
   58974             :     } 
   58975             :     arg2 = static_cast< unsigned int >(val2);
   58976             :   }
   58977          50 :   if (obj2) {
   58978          41 :     {
   58979             :       /* %typemap(in) char **dict */
   58980          41 :       arg3 = NULL;
   58981          41 :       if ( PySequence_Check( obj2 ) ) {
   58982          41 :         int bErr = FALSE;
   58983          41 :         arg3 = CSLFromPySequence(obj2, &bErr);
   58984          41 :         if ( bErr )
   58985             :         {
   58986           0 :           SWIG_fail;
   58987             :         }
   58988             :       }
   58989           0 :       else if ( PyMapping_Check( obj2 ) ) {
   58990           0 :         int bErr = FALSE;
   58991           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   58992           0 :         if ( bErr )
   58993             :         {
   58994           0 :           SWIG_fail;
   58995             :         }
   58996             :       }
   58997             :       else {
   58998           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58999           0 :         SWIG_fail;
   59000             :       }
   59001             :     }
   59002             :   }
   59003          50 :   if (obj3) {
   59004           2 :     {
   59005             :       /* %typemap(in) char **dict */
   59006           2 :       arg4 = NULL;
   59007           2 :       if ( PySequence_Check( obj3 ) ) {
   59008           2 :         int bErr = FALSE;
   59009           2 :         arg4 = CSLFromPySequence(obj3, &bErr);
   59010           2 :         if ( bErr )
   59011             :         {
   59012           0 :           SWIG_fail;
   59013             :         }
   59014             :       }
   59015           0 :       else if ( PyMapping_Check( obj3 ) ) {
   59016           0 :         int bErr = FALSE;
   59017           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   59018           0 :         if ( bErr )
   59019             :         {
   59020           0 :           SWIG_fail;
   59021             :         }
   59022             :       }
   59023             :       else {
   59024           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59025           0 :         SWIG_fail;
   59026             :       }
   59027             :     }
   59028             :   }
   59029          50 :   {
   59030          50 :     if (!arg1) {
   59031          50 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59032             :     }
   59033             :   }
   59034          50 :   {
   59035          50 :     const int bLocalUseExceptions = GetUseExceptions();
   59036          50 :     if ( bLocalUseExceptions ) {
   59037          45 :       pushErrorHandler();
   59038             :     }
   59039          50 :     {
   59040          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59041          50 :       result = (GDALDriverShadow *)IdentifyDriverEx((char const *)arg1,arg2,arg3,arg4);
   59042          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59043             :     }
   59044          50 :     if ( bLocalUseExceptions ) {
   59045          45 :       popErrorHandler();
   59046             :     }
   59047             : #ifndef SED_HACKS
   59048             :     if ( bLocalUseExceptions ) {
   59049             :       CPLErr eclass = CPLGetLastErrorType();
   59050             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59051             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59052             :       }
   59053             :     }
   59054             : #endif
   59055             :   }
   59056          50 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   59057          50 :   {
   59058             :     /* %typemap(freearg) (const char *utf8_path) */
   59059          50 :     GDALPythonFreeCStr(arg1, bToFree1);
   59060             :   }
   59061          50 :   {
   59062             :     /* %typemap(freearg) char **dict */
   59063          50 :     CSLDestroy( arg3 );
   59064             :   }
   59065          50 :   {
   59066             :     /* %typemap(freearg) char **dict */
   59067          50 :     CSLDestroy( arg4 );
   59068             :   }
   59069          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; } }
   59070             :   return resultobj;
   59071           0 : fail:
   59072           0 :   {
   59073             :     /* %typemap(freearg) (const char *utf8_path) */
   59074           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   59075             :   }
   59076           0 :   {
   59077             :     /* %typemap(freearg) char **dict */
   59078           0 :     CSLDestroy( arg3 );
   59079             :   }
   59080           0 :   {
   59081             :     /* %typemap(freearg) char **dict */
   59082           0 :     CSLDestroy( arg4 );
   59083             :   }
   59084             :   return NULL;
   59085             : }
   59086             : 
   59087             : 
   59088         193 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59089         193 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59090         193 :   char **arg1 = (char **) 0 ;
   59091         193 :   int arg2 = (int) 0 ;
   59092         193 :   int val2 ;
   59093         193 :   int ecode2 = 0 ;
   59094         193 :   PyObject *swig_obj[2] ;
   59095         193 :   char **result = 0 ;
   59096             :   
   59097         193 :   if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
   59098         193 :   {
   59099             :     /* %typemap(in) char **dict */
   59100         193 :     arg1 = NULL;
   59101         193 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59102         193 :       int bErr = FALSE;
   59103         193 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59104         193 :       if ( bErr )
   59105             :       {
   59106           0 :         SWIG_fail;
   59107             :       }
   59108             :     }
   59109           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59110           0 :       int bErr = FALSE;
   59111           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59112           0 :       if ( bErr )
   59113             :       {
   59114           0 :         SWIG_fail;
   59115             :       }
   59116             :     }
   59117             :     else {
   59118           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59119           0 :       SWIG_fail;
   59120             :     }
   59121             :   }
   59122         193 :   if (swig_obj[1]) {
   59123           0 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   59124           0 :     if (!SWIG_IsOK(ecode2)) {
   59125           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   59126             :     } 
   59127             :     arg2 = static_cast< int >(val2);
   59128             :   }
   59129         193 :   {
   59130         193 :     const int bLocalUseExceptions = GetUseExceptions();
   59131         193 :     if ( bLocalUseExceptions ) {
   59132         104 :       pushErrorHandler();
   59133             :     }
   59134         193 :     {
   59135         193 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59136         193 :       result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   59137         193 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59138             :     }
   59139         193 :     if ( bLocalUseExceptions ) {
   59140         104 :       popErrorHandler();
   59141             :     }
   59142             : #ifndef SED_HACKS
   59143             :     if ( bLocalUseExceptions ) {
   59144             :       CPLErr eclass = CPLGetLastErrorType();
   59145             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59146             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59147             :       }
   59148             :     }
   59149             : #endif
   59150             :   }
   59151         193 :   {
   59152             :     /* %typemap(out) char **CSL -> ( string ) */
   59153         193 :     bool bErr = false;
   59154         193 :     resultobj = CSLToList(result, &bErr);
   59155         193 :     CSLDestroy(result);
   59156         193 :     if( bErr ) {
   59157           0 :       SWIG_fail;
   59158             :     }
   59159             :   }
   59160         193 :   {
   59161             :     /* %typemap(freearg) char **dict */
   59162         193 :     CSLDestroy( arg1 );
   59163             :   }
   59164         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; } }
   59165             :   return resultobj;
   59166           0 : fail:
   59167           0 :   {
   59168             :     /* %typemap(freearg) char **dict */
   59169           0 :     CSLDestroy( arg1 );
   59170             :   }
   59171             :   return NULL;
   59172             : }
   59173             : 
   59174             : 
   59175          57 : SWIGINTERN PyObject *_wrap_new_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59176          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59177          57 :   char **arg1 = (char **) 0 ;
   59178          57 :   PyObject *swig_obj[1] ;
   59179          57 :   GDALInfoOptions *result = 0 ;
   59180             :   
   59181          57 :   if (!args) SWIG_fail;
   59182          57 :   swig_obj[0] = args;
   59183          57 :   {
   59184             :     /* %typemap(in) char **dict */
   59185          57 :     arg1 = NULL;
   59186          57 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59187          57 :       int bErr = FALSE;
   59188          57 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59189          57 :       if ( bErr )
   59190             :       {
   59191           0 :         SWIG_fail;
   59192             :       }
   59193             :     }
   59194           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59195           0 :       int bErr = FALSE;
   59196           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59197           0 :       if ( bErr )
   59198             :       {
   59199           0 :         SWIG_fail;
   59200             :       }
   59201             :     }
   59202             :     else {
   59203           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59204           0 :       SWIG_fail;
   59205             :     }
   59206             :   }
   59207          57 :   {
   59208          57 :     const int bLocalUseExceptions = GetUseExceptions();
   59209          57 :     if ( bLocalUseExceptions ) {
   59210          50 :       pushErrorHandler();
   59211             :     }
   59212          57 :     {
   59213          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59214          57 :       result = (GDALInfoOptions *)new_GDALInfoOptions(arg1);
   59215          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59216             :     }
   59217          57 :     if ( bLocalUseExceptions ) {
   59218          50 :       popErrorHandler();
   59219             :     }
   59220             : #ifndef SED_HACKS
   59221             :     if ( bLocalUseExceptions ) {
   59222             :       CPLErr eclass = CPLGetLastErrorType();
   59223             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59224             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59225             :       }
   59226             :     }
   59227             : #endif
   59228             :   }
   59229          57 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_NEW |  0 );
   59230          57 :   {
   59231             :     /* %typemap(freearg) char **dict */
   59232          57 :     CSLDestroy( arg1 );
   59233             :   }
   59234          57 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59235             :   return resultobj;
   59236           0 : fail:
   59237           0 :   {
   59238             :     /* %typemap(freearg) char **dict */
   59239           0 :     CSLDestroy( arg1 );
   59240             :   }
   59241             :   return NULL;
   59242             : }
   59243             : 
   59244             : 
   59245          57 : SWIGINTERN PyObject *_wrap_delete_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59246          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59247          57 :   GDALInfoOptions *arg1 = (GDALInfoOptions *) 0 ;
   59248          57 :   void *argp1 = 0 ;
   59249          57 :   int res1 = 0 ;
   59250          57 :   PyObject *swig_obj[1] ;
   59251             :   
   59252          57 :   if (!args) SWIG_fail;
   59253          57 :   swig_obj[0] = args;
   59254          57 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_DISOWN |  0 );
   59255          57 :   if (!SWIG_IsOK(res1)) {
   59256           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALInfoOptions" "', argument " "1"" of type '" "GDALInfoOptions *""'"); 
   59257             :   }
   59258          57 :   arg1 = reinterpret_cast< GDALInfoOptions * >(argp1);
   59259          57 :   {
   59260          57 :     const int bLocalUseExceptions = GetUseExceptions();
   59261          57 :     if ( bLocalUseExceptions ) {
   59262          50 :       pushErrorHandler();
   59263             :     }
   59264          57 :     {
   59265          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59266          57 :       delete_GDALInfoOptions(arg1);
   59267          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59268             :     }
   59269          57 :     if ( bLocalUseExceptions ) {
   59270          50 :       popErrorHandler();
   59271             :     }
   59272             : #ifndef SED_HACKS
   59273             :     if ( bLocalUseExceptions ) {
   59274             :       CPLErr eclass = CPLGetLastErrorType();
   59275             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59276             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59277             :       }
   59278             :     }
   59279             : #endif
   59280             :   }
   59281          57 :   resultobj = SWIG_Py_Void();
   59282          57 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59283             :   return resultobj;
   59284             : fail:
   59285             :   return NULL;
   59286             : }
   59287             : 
   59288             : 
   59289         277 : SWIGINTERN PyObject *GDALInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59290         277 :   PyObject *obj;
   59291         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59292         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALInfoOptions, SWIG_NewClientData(obj));
   59293         277 :   return SWIG_Py_Void();
   59294             : }
   59295             : 
   59296          57 : SWIGINTERN PyObject *GDALInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59297          57 :   return SWIG_Python_InitShadowInstance(args);
   59298             : }
   59299             : 
   59300          57 : SWIGINTERN PyObject *_wrap_InfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59301          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59302          57 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59303          57 :   GDALInfoOptions *arg2 = (GDALInfoOptions *) 0 ;
   59304          57 :   void *argp1 = 0 ;
   59305          57 :   int res1 = 0 ;
   59306          57 :   void *argp2 = 0 ;
   59307          57 :   int res2 = 0 ;
   59308          57 :   PyObject *swig_obj[2] ;
   59309          57 :   retStringAndCPLFree *result = 0 ;
   59310             :   
   59311          57 :   if (!SWIG_Python_UnpackTuple(args, "InfoInternal", 2, 2, swig_obj)) SWIG_fail;
   59312          57 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59313          57 :   if (!SWIG_IsOK(res1)) {
   59314           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59315             :   }
   59316          57 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59317          57 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALInfoOptions, 0 |  0 );
   59318          57 :   if (!SWIG_IsOK(res2)) {
   59319           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InfoInternal" "', argument " "2"" of type '" "GDALInfoOptions *""'"); 
   59320             :   }
   59321          57 :   arg2 = reinterpret_cast< GDALInfoOptions * >(argp2);
   59322          57 :   {
   59323          57 :     const int bLocalUseExceptions = GetUseExceptions();
   59324          57 :     if ( bLocalUseExceptions ) {
   59325          50 :       pushErrorHandler();
   59326             :     }
   59327          57 :     {
   59328          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59329          57 :       result = (retStringAndCPLFree *)GDALInfo(arg1,arg2);
   59330          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59331             :     }
   59332          57 :     if ( bLocalUseExceptions ) {
   59333          50 :       popErrorHandler();
   59334             :     }
   59335             : #ifndef SED_HACKS
   59336             :     if ( bLocalUseExceptions ) {
   59337             :       CPLErr eclass = CPLGetLastErrorType();
   59338             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59339             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59340             :       }
   59341             :     }
   59342             : #endif
   59343             :   }
   59344          57 :   {
   59345             :     /* %typemap(out) (retStringAndCPLFree*) */
   59346          57 :     Py_XDECREF(resultobj);
   59347          57 :     if(result)
   59348             :     {
   59349          57 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   59350          57 :       CPLFree(result);
   59351             :     }
   59352             :     else
   59353             :     {
   59354           0 :       resultobj = Py_None;
   59355           0 :       Py_INCREF(resultobj);
   59356             :     }
   59357             :   }
   59358          57 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59359             :   return resultobj;
   59360             : fail:
   59361             :   return NULL;
   59362             : }
   59363             : 
   59364             : 
   59365          36 : SWIGINTERN PyObject *_wrap_new_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59366          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59367          36 :   char **arg1 = (char **) 0 ;
   59368          36 :   PyObject *swig_obj[1] ;
   59369          36 :   GDALVectorInfoOptions *result = 0 ;
   59370             :   
   59371          36 :   if (!args) SWIG_fail;
   59372          36 :   swig_obj[0] = args;
   59373          36 :   {
   59374             :     /* %typemap(in) char **dict */
   59375          36 :     arg1 = NULL;
   59376          36 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59377          36 :       int bErr = FALSE;
   59378          36 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59379          36 :       if ( bErr )
   59380             :       {
   59381           0 :         SWIG_fail;
   59382             :       }
   59383             :     }
   59384           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59385           0 :       int bErr = FALSE;
   59386           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59387           0 :       if ( bErr )
   59388             :       {
   59389           0 :         SWIG_fail;
   59390             :       }
   59391             :     }
   59392             :     else {
   59393           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59394           0 :       SWIG_fail;
   59395             :     }
   59396             :   }
   59397          36 :   {
   59398          36 :     const int bLocalUseExceptions = GetUseExceptions();
   59399          36 :     if ( bLocalUseExceptions ) {
   59400          35 :       pushErrorHandler();
   59401             :     }
   59402          36 :     {
   59403          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59404          36 :       result = (GDALVectorInfoOptions *)new_GDALVectorInfoOptions(arg1);
   59405          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59406             :     }
   59407          36 :     if ( bLocalUseExceptions ) {
   59408          35 :       popErrorHandler();
   59409             :     }
   59410             : #ifndef SED_HACKS
   59411             :     if ( bLocalUseExceptions ) {
   59412             :       CPLErr eclass = CPLGetLastErrorType();
   59413             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59414             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59415             :       }
   59416             :     }
   59417             : #endif
   59418             :   }
   59419          36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_NEW |  0 );
   59420          36 :   {
   59421             :     /* %typemap(freearg) char **dict */
   59422          36 :     CSLDestroy( arg1 );
   59423             :   }
   59424          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; } }
   59425             :   return resultobj;
   59426           0 : fail:
   59427           0 :   {
   59428             :     /* %typemap(freearg) char **dict */
   59429           0 :     CSLDestroy( arg1 );
   59430             :   }
   59431             :   return NULL;
   59432             : }
   59433             : 
   59434             : 
   59435          36 : SWIGINTERN PyObject *_wrap_delete_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59436          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59437          36 :   GDALVectorInfoOptions *arg1 = (GDALVectorInfoOptions *) 0 ;
   59438          36 :   void *argp1 = 0 ;
   59439          36 :   int res1 = 0 ;
   59440          36 :   PyObject *swig_obj[1] ;
   59441             :   
   59442          36 :   if (!args) SWIG_fail;
   59443          36 :   swig_obj[0] = args;
   59444          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_DISOWN |  0 );
   59445          36 :   if (!SWIG_IsOK(res1)) {
   59446           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorInfoOptions" "', argument " "1"" of type '" "GDALVectorInfoOptions *""'"); 
   59447             :   }
   59448          36 :   arg1 = reinterpret_cast< GDALVectorInfoOptions * >(argp1);
   59449          36 :   {
   59450          36 :     const int bLocalUseExceptions = GetUseExceptions();
   59451          36 :     if ( bLocalUseExceptions ) {
   59452          35 :       pushErrorHandler();
   59453             :     }
   59454          36 :     {
   59455          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59456          36 :       delete_GDALVectorInfoOptions(arg1);
   59457          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59458             :     }
   59459          36 :     if ( bLocalUseExceptions ) {
   59460          35 :       popErrorHandler();
   59461             :     }
   59462             : #ifndef SED_HACKS
   59463             :     if ( bLocalUseExceptions ) {
   59464             :       CPLErr eclass = CPLGetLastErrorType();
   59465             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59466             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59467             :       }
   59468             :     }
   59469             : #endif
   59470             :   }
   59471          36 :   resultobj = SWIG_Py_Void();
   59472          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; } }
   59473             :   return resultobj;
   59474             : fail:
   59475             :   return NULL;
   59476             : }
   59477             : 
   59478             : 
   59479         277 : SWIGINTERN PyObject *GDALVectorInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59480         277 :   PyObject *obj;
   59481         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59482         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorInfoOptions, SWIG_NewClientData(obj));
   59483         277 :   return SWIG_Py_Void();
   59484             : }
   59485             : 
   59486          36 : SWIGINTERN PyObject *GDALVectorInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59487          36 :   return SWIG_Python_InitShadowInstance(args);
   59488             : }
   59489             : 
   59490          36 : SWIGINTERN PyObject *_wrap_VectorInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59491          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59492          36 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59493          36 :   GDALVectorInfoOptions *arg2 = (GDALVectorInfoOptions *) 0 ;
   59494          36 :   void *argp1 = 0 ;
   59495          36 :   int res1 = 0 ;
   59496          36 :   void *argp2 = 0 ;
   59497          36 :   int res2 = 0 ;
   59498          36 :   PyObject *swig_obj[2] ;
   59499          36 :   retStringAndCPLFree *result = 0 ;
   59500             :   
   59501          36 :   if (!SWIG_Python_UnpackTuple(args, "VectorInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   59502          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59503          36 :   if (!SWIG_IsOK(res1)) {
   59504           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59505             :   }
   59506          36 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59507          36 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALVectorInfoOptions, 0 |  0 );
   59508          36 :   if (!SWIG_IsOK(res2)) {
   59509           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorInfoInternal" "', argument " "2"" of type '" "GDALVectorInfoOptions *""'"); 
   59510             :   }
   59511          36 :   arg2 = reinterpret_cast< GDALVectorInfoOptions * >(argp2);
   59512          36 :   {
   59513          36 :     const int bLocalUseExceptions = GetUseExceptions();
   59514          36 :     if ( bLocalUseExceptions ) {
   59515          35 :       pushErrorHandler();
   59516             :     }
   59517          36 :     {
   59518          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59519          36 :       result = (retStringAndCPLFree *)GDALVectorInfo(arg1,arg2);
   59520          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59521             :     }
   59522          36 :     if ( bLocalUseExceptions ) {
   59523          35 :       popErrorHandler();
   59524             :     }
   59525             : #ifndef SED_HACKS
   59526             :     if ( bLocalUseExceptions ) {
   59527             :       CPLErr eclass = CPLGetLastErrorType();
   59528             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59529             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59530             :       }
   59531             :     }
   59532             : #endif
   59533             :   }
   59534          36 :   {
   59535             :     /* %typemap(out) (retStringAndCPLFree*) */
   59536          36 :     Py_XDECREF(resultobj);
   59537          36 :     if(result)
   59538             :     {
   59539          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   59540          35 :       CPLFree(result);
   59541             :     }
   59542             :     else
   59543             :     {
   59544           1 :       resultobj = Py_None;
   59545           1 :       Py_INCREF(resultobj);
   59546             :     }
   59547             :   }
   59548          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; } }
   59549             :   return resultobj;
   59550             : fail:
   59551             :   return NULL;
   59552             : }
   59553             : 
   59554             : 
   59555          28 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59556          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59557          28 :   char **arg1 = (char **) 0 ;
   59558          28 :   PyObject *swig_obj[1] ;
   59559          28 :   GDALMultiDimInfoOptions *result = 0 ;
   59560             :   
   59561          28 :   if (!args) SWIG_fail;
   59562          28 :   swig_obj[0] = args;
   59563          28 :   {
   59564             :     /* %typemap(in) char **dict */
   59565          28 :     arg1 = NULL;
   59566          28 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59567          28 :       int bErr = FALSE;
   59568          28 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59569          28 :       if ( bErr )
   59570             :       {
   59571           0 :         SWIG_fail;
   59572             :       }
   59573             :     }
   59574           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59575           0 :       int bErr = FALSE;
   59576           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59577           0 :       if ( bErr )
   59578             :       {
   59579           0 :         SWIG_fail;
   59580             :       }
   59581             :     }
   59582             :     else {
   59583           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59584           0 :       SWIG_fail;
   59585             :     }
   59586             :   }
   59587          28 :   {
   59588          28 :     const int bLocalUseExceptions = GetUseExceptions();
   59589          28 :     if ( bLocalUseExceptions ) {
   59590          22 :       pushErrorHandler();
   59591             :     }
   59592          28 :     {
   59593          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59594          28 :       result = (GDALMultiDimInfoOptions *)new_GDALMultiDimInfoOptions(arg1);
   59595          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59596             :     }
   59597          28 :     if ( bLocalUseExceptions ) {
   59598          22 :       popErrorHandler();
   59599             :     }
   59600             : #ifndef SED_HACKS
   59601             :     if ( bLocalUseExceptions ) {
   59602             :       CPLErr eclass = CPLGetLastErrorType();
   59603             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59604             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59605             :       }
   59606             :     }
   59607             : #endif
   59608             :   }
   59609          28 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_NEW |  0 );
   59610          28 :   {
   59611             :     /* %typemap(freearg) char **dict */
   59612          28 :     CSLDestroy( arg1 );
   59613             :   }
   59614          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; } }
   59615             :   return resultobj;
   59616           0 : fail:
   59617           0 :   {
   59618             :     /* %typemap(freearg) char **dict */
   59619           0 :     CSLDestroy( arg1 );
   59620             :   }
   59621             :   return NULL;
   59622             : }
   59623             : 
   59624             : 
   59625          28 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59626          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59627          28 :   GDALMultiDimInfoOptions *arg1 = (GDALMultiDimInfoOptions *) 0 ;
   59628          28 :   void *argp1 = 0 ;
   59629          28 :   int res1 = 0 ;
   59630          28 :   PyObject *swig_obj[1] ;
   59631             :   
   59632          28 :   if (!args) SWIG_fail;
   59633          28 :   swig_obj[0] = args;
   59634          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_DISOWN |  0 );
   59635          28 :   if (!SWIG_IsOK(res1)) {
   59636           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimInfoOptions" "', argument " "1"" of type '" "GDALMultiDimInfoOptions *""'"); 
   59637             :   }
   59638          28 :   arg1 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp1);
   59639          28 :   {
   59640          28 :     const int bLocalUseExceptions = GetUseExceptions();
   59641          28 :     if ( bLocalUseExceptions ) {
   59642          22 :       pushErrorHandler();
   59643             :     }
   59644          28 :     {
   59645          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59646          28 :       delete_GDALMultiDimInfoOptions(arg1);
   59647          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59648             :     }
   59649          28 :     if ( bLocalUseExceptions ) {
   59650          22 :       popErrorHandler();
   59651             :     }
   59652             : #ifndef SED_HACKS
   59653             :     if ( bLocalUseExceptions ) {
   59654             :       CPLErr eclass = CPLGetLastErrorType();
   59655             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59656             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59657             :       }
   59658             :     }
   59659             : #endif
   59660             :   }
   59661          28 :   resultobj = SWIG_Py_Void();
   59662          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; } }
   59663             :   return resultobj;
   59664             : fail:
   59665             :   return NULL;
   59666             : }
   59667             : 
   59668             : 
   59669         277 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59670         277 :   PyObject *obj;
   59671         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59672         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_NewClientData(obj));
   59673         277 :   return SWIG_Py_Void();
   59674             : }
   59675             : 
   59676          28 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59677          28 :   return SWIG_Python_InitShadowInstance(args);
   59678             : }
   59679             : 
   59680          27 : SWIGINTERN PyObject *_wrap_MultiDimInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59681          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59682          27 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59683          27 :   GDALMultiDimInfoOptions *arg2 = (GDALMultiDimInfoOptions *) 0 ;
   59684          27 :   void *argp1 = 0 ;
   59685          27 :   int res1 = 0 ;
   59686          27 :   void *argp2 = 0 ;
   59687          27 :   int res2 = 0 ;
   59688          27 :   PyObject *swig_obj[2] ;
   59689          27 :   retStringAndCPLFree *result = 0 ;
   59690             :   
   59691          27 :   if (!SWIG_Python_UnpackTuple(args, "MultiDimInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   59692          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59693          27 :   if (!SWIG_IsOK(res1)) {
   59694           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiDimInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59695             :   }
   59696          27 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59697          27 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMultiDimInfoOptions, 0 |  0 );
   59698          27 :   if (!SWIG_IsOK(res2)) {
   59699           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiDimInfoInternal" "', argument " "2"" of type '" "GDALMultiDimInfoOptions *""'"); 
   59700             :   }
   59701          27 :   arg2 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp2);
   59702          27 :   {
   59703          27 :     const int bLocalUseExceptions = GetUseExceptions();
   59704          27 :     if ( bLocalUseExceptions ) {
   59705          21 :       pushErrorHandler();
   59706             :     }
   59707          27 :     {
   59708          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59709          27 :       result = (retStringAndCPLFree *)GDALMultiDimInfo(arg1,arg2);
   59710          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59711             :     }
   59712          27 :     if ( bLocalUseExceptions ) {
   59713          21 :       popErrorHandler();
   59714             :     }
   59715             : #ifndef SED_HACKS
   59716             :     if ( bLocalUseExceptions ) {
   59717             :       CPLErr eclass = CPLGetLastErrorType();
   59718             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59719             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59720             :       }
   59721             :     }
   59722             : #endif
   59723             :   }
   59724          27 :   {
   59725             :     /* %typemap(out) (retStringAndCPLFree*) */
   59726          27 :     Py_XDECREF(resultobj);
   59727          27 :     if(result)
   59728             :     {
   59729          26 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   59730          26 :       CPLFree(result);
   59731             :     }
   59732             :     else
   59733             :     {
   59734           1 :       resultobj = Py_None;
   59735           1 :       Py_INCREF(resultobj);
   59736             :     }
   59737             :   }
   59738          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; } }
   59739             :   return resultobj;
   59740             : fail:
   59741             :   return NULL;
   59742             : }
   59743             : 
   59744             : 
   59745        2034 : SWIGINTERN PyObject *_wrap_new_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59746        2034 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59747        2034 :   char **arg1 = (char **) 0 ;
   59748        2034 :   PyObject *swig_obj[1] ;
   59749        2034 :   GDALTranslateOptions *result = 0 ;
   59750             :   
   59751        2034 :   if (!args) SWIG_fail;
   59752        2034 :   swig_obj[0] = args;
   59753        2034 :   {
   59754             :     /* %typemap(in) char **dict */
   59755        2034 :     arg1 = NULL;
   59756        2034 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59757        2034 :       int bErr = FALSE;
   59758        2034 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59759        2034 :       if ( bErr )
   59760             :       {
   59761           0 :         SWIG_fail;
   59762             :       }
   59763             :     }
   59764           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59765           0 :       int bErr = FALSE;
   59766           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59767           0 :       if ( bErr )
   59768             :       {
   59769           0 :         SWIG_fail;
   59770             :       }
   59771             :     }
   59772             :     else {
   59773           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59774           0 :       SWIG_fail;
   59775             :     }
   59776             :   }
   59777        2034 :   {
   59778        2034 :     const int bLocalUseExceptions = GetUseExceptions();
   59779        2034 :     if ( bLocalUseExceptions ) {
   59780         902 :       pushErrorHandler();
   59781             :     }
   59782        2034 :     {
   59783        2034 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59784        2034 :       result = (GDALTranslateOptions *)new_GDALTranslateOptions(arg1);
   59785        2034 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59786             :     }
   59787        2034 :     if ( bLocalUseExceptions ) {
   59788         902 :       popErrorHandler();
   59789             :     }
   59790             : #ifndef SED_HACKS
   59791             :     if ( bLocalUseExceptions ) {
   59792             :       CPLErr eclass = CPLGetLastErrorType();
   59793             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59794             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59795             :       }
   59796             :     }
   59797             : #endif
   59798             :   }
   59799        2034 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_NEW |  0 );
   59800        2034 :   {
   59801             :     /* %typemap(freearg) char **dict */
   59802        2034 :     CSLDestroy( arg1 );
   59803             :   }
   59804        2042 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59805             :   return resultobj;
   59806           0 : fail:
   59807           0 :   {
   59808             :     /* %typemap(freearg) char **dict */
   59809           0 :     CSLDestroy( arg1 );
   59810             :   }
   59811             :   return NULL;
   59812             : }
   59813             : 
   59814             : 
   59815        2030 : SWIGINTERN PyObject *_wrap_delete_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59816        2030 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59817        2030 :   GDALTranslateOptions *arg1 = (GDALTranslateOptions *) 0 ;
   59818        2030 :   void *argp1 = 0 ;
   59819        2030 :   int res1 = 0 ;
   59820        2030 :   PyObject *swig_obj[1] ;
   59821             :   
   59822        2030 :   if (!args) SWIG_fail;
   59823        2030 :   swig_obj[0] = args;
   59824        2030 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   59825        2030 :   if (!SWIG_IsOK(res1)) {
   59826           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTranslateOptions" "', argument " "1"" of type '" "GDALTranslateOptions *""'"); 
   59827             :   }
   59828        2030 :   arg1 = reinterpret_cast< GDALTranslateOptions * >(argp1);
   59829        2030 :   {
   59830        2030 :     const int bLocalUseExceptions = GetUseExceptions();
   59831        2030 :     if ( bLocalUseExceptions ) {
   59832         898 :       pushErrorHandler();
   59833             :     }
   59834        2030 :     {
   59835        2030 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59836        2030 :       delete_GDALTranslateOptions(arg1);
   59837        2030 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59838             :     }
   59839        2030 :     if ( bLocalUseExceptions ) {
   59840         898 :       popErrorHandler();
   59841             :     }
   59842             : #ifndef SED_HACKS
   59843             :     if ( bLocalUseExceptions ) {
   59844             :       CPLErr eclass = CPLGetLastErrorType();
   59845             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59846             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59847             :       }
   59848             :     }
   59849             : #endif
   59850             :   }
   59851        2030 :   resultobj = SWIG_Py_Void();
   59852        2030 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59853             :   return resultobj;
   59854             : fail:
   59855             :   return NULL;
   59856             : }
   59857             : 
   59858             : 
   59859         277 : SWIGINTERN PyObject *GDALTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59860         277 :   PyObject *obj;
   59861         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59862         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTranslateOptions, SWIG_NewClientData(obj));
   59863         277 :   return SWIG_Py_Void();
   59864             : }
   59865             : 
   59866        2030 : SWIGINTERN PyObject *GDALTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59867        2030 :   return SWIG_Python_InitShadowInstance(args);
   59868             : }
   59869             : 
   59870        2033 : SWIGINTERN PyObject *_wrap_TranslateInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59871        2033 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59872        2033 :   char *arg1 = (char *) 0 ;
   59873        2033 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59874        2033 :   GDALTranslateOptions *arg3 = (GDALTranslateOptions *) 0 ;
   59875        2033 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   59876        2033 :   void *arg5 = (void *) NULL ;
   59877        2033 :   int bToFree1 = 0 ;
   59878        2033 :   void *argp2 = 0 ;
   59879        2033 :   int res2 = 0 ;
   59880        2033 :   void *argp3 = 0 ;
   59881        2033 :   int res3 = 0 ;
   59882        2033 :   PyObject *swig_obj[5] ;
   59883        2033 :   GDALDatasetShadow *result = 0 ;
   59884             :   
   59885             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59886        2033 :   PyProgressData *psProgressInfo;
   59887        2033 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59888        2033 :   psProgressInfo->nLastReported = -1;
   59889        2033 :   psProgressInfo->psPyCallback = NULL;
   59890        2033 :   psProgressInfo->psPyCallbackData = NULL;
   59891        2033 :   arg5 = psProgressInfo;
   59892        2033 :   if (!SWIG_Python_UnpackTuple(args, "TranslateInternal", 3, 5, swig_obj)) SWIG_fail;
   59893        2033 :   {
   59894             :     /* %typemap(in) (const char *utf8_path) */
   59895        2033 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   59896             :     {
   59897        1843 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   59898             :     }
   59899             :     else
   59900             :     {
   59901         190 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   59902             :       
   59903             :     }
   59904        2033 :     if (arg1 == NULL)
   59905             :     {
   59906           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   59907           1 :       SWIG_fail;
   59908             :     }
   59909             :   }
   59910        2032 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59911        2032 :   if (!SWIG_IsOK(res2)) {
   59912           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TranslateInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   59913             :   }
   59914        2032 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   59915        2032 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTranslateOptions, 0 |  0 );
   59916        2032 :   if (!SWIG_IsOK(res3)) {
   59917           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TranslateInternal" "', argument " "3"" of type '" "GDALTranslateOptions *""'"); 
   59918             :   }
   59919        2032 :   arg3 = reinterpret_cast< GDALTranslateOptions * >(argp3);
   59920        2032 :   if (swig_obj[3]) {
   59921        2031 :     {
   59922             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59923             :       /* callback_func typemap */
   59924             :       
   59925             :       /* In some cases 0 is passed instead of None. */
   59926             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59927        2031 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59928             :       {
   59929           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59930             :         {
   59931           0 :           swig_obj[3] = Py_None;
   59932             :         }
   59933             :       }
   59934             :       
   59935        2031 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59936           3 :         void* cbfunction = NULL;
   59937           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59938             :             (void**)&cbfunction,
   59939             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59940             :             SWIG_POINTER_EXCEPTION | 0 ));
   59941             :         
   59942           3 :         if ( cbfunction == GDALTermProgress ) {
   59943             :           arg4 = GDALTermProgress;
   59944             :         } else {
   59945           3 :           if (!PyCallable_Check(swig_obj[3])) {
   59946           0 :             PyErr_SetString( PyExc_RuntimeError,
   59947             :               "Object given is not a Python function" );
   59948           0 :             SWIG_fail;
   59949             :           }
   59950           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   59951           3 :           arg4 = PyProgressProxy;
   59952             :         }
   59953             :         
   59954             :       }
   59955             :       
   59956             :     }
   59957             :   }
   59958        2032 :   if (swig_obj[4]) {
   59959        2030 :     {
   59960             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59961        2030 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59962             :     }
   59963             :   }
   59964        2032 :   {
   59965        2032 :     if (!arg1) {
   59966        2032 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59967             :     }
   59968             :   }
   59969        2032 :   {
   59970        2032 :     if (!arg2) {
   59971           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59972             :     }
   59973             :   }
   59974        2032 :   {
   59975        2032 :     const int bLocalUseExceptions = GetUseExceptions();
   59976        2032 :     if ( bLocalUseExceptions ) {
   59977         900 :       pushErrorHandler();
   59978             :     }
   59979        2032 :     {
   59980        2032 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59981        2032 :       result = (GDALDatasetShadow *)wrapper_GDALTranslate((char const *)arg1,arg2,arg3,arg4,arg5);
   59982        2032 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59983             :     }
   59984        2032 :     if ( bLocalUseExceptions ) {
   59985         900 :       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        2032 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   59997        2032 :   {
   59998             :     /* %typemap(freearg) (const char *utf8_path) */
   59999        2032 :     GDALPythonFreeCStr(arg1, bToFree1);
   60000             :   }
   60001        2032 :   {
   60002             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60003             :     
   60004        2032 :     CPLFree(psProgressInfo);
   60005             :     
   60006             :   }
   60007        2071 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60008             :   return resultobj;
   60009           1 : fail:
   60010           1 :   {
   60011             :     /* %typemap(freearg) (const char *utf8_path) */
   60012           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   60013             :   }
   60014           1 :   {
   60015             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60016             :     
   60017           1 :     CPLFree(psProgressInfo);
   60018             :     
   60019             :   }
   60020             :   return NULL;
   60021             : }
   60022             : 
   60023             : 
   60024         810 : SWIGINTERN PyObject *_wrap_new_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60025         810 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60026         810 :   char **arg1 = (char **) 0 ;
   60027         810 :   PyObject *swig_obj[1] ;
   60028         810 :   GDALWarpAppOptions *result = 0 ;
   60029             :   
   60030         810 :   if (!args) SWIG_fail;
   60031         810 :   swig_obj[0] = args;
   60032         810 :   {
   60033             :     /* %typemap(in) char **dict */
   60034         810 :     arg1 = NULL;
   60035         810 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60036         810 :       int bErr = FALSE;
   60037         810 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60038         810 :       if ( bErr )
   60039             :       {
   60040           0 :         SWIG_fail;
   60041             :       }
   60042             :     }
   60043           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60044           0 :       int bErr = FALSE;
   60045           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60046           0 :       if ( bErr )
   60047             :       {
   60048           0 :         SWIG_fail;
   60049             :       }
   60050             :     }
   60051             :     else {
   60052           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60053           0 :       SWIG_fail;
   60054             :     }
   60055             :   }
   60056         810 :   {
   60057         810 :     const int bLocalUseExceptions = GetUseExceptions();
   60058         810 :     if ( bLocalUseExceptions ) {
   60059         786 :       pushErrorHandler();
   60060             :     }
   60061         810 :     {
   60062         810 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60063         810 :       result = (GDALWarpAppOptions *)new_GDALWarpAppOptions(arg1);
   60064         810 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60065             :     }
   60066         810 :     if ( bLocalUseExceptions ) {
   60067         786 :       popErrorHandler();
   60068             :     }
   60069             : #ifndef SED_HACKS
   60070             :     if ( bLocalUseExceptions ) {
   60071             :       CPLErr eclass = CPLGetLastErrorType();
   60072             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60073             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60074             :       }
   60075             :     }
   60076             : #endif
   60077             :   }
   60078         810 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_NEW |  0 );
   60079         810 :   {
   60080             :     /* %typemap(freearg) char **dict */
   60081         810 :     CSLDestroy( arg1 );
   60082             :   }
   60083         814 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60084             :   return resultobj;
   60085           0 : fail:
   60086           0 :   {
   60087             :     /* %typemap(freearg) char **dict */
   60088           0 :     CSLDestroy( arg1 );
   60089             :   }
   60090             :   return NULL;
   60091             : }
   60092             : 
   60093             : 
   60094         808 : SWIGINTERN PyObject *_wrap_delete_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60095         808 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60096         808 :   GDALWarpAppOptions *arg1 = (GDALWarpAppOptions *) 0 ;
   60097         808 :   void *argp1 = 0 ;
   60098         808 :   int res1 = 0 ;
   60099         808 :   PyObject *swig_obj[1] ;
   60100             :   
   60101         808 :   if (!args) SWIG_fail;
   60102         808 :   swig_obj[0] = args;
   60103         808 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_DISOWN |  0 );
   60104         808 :   if (!SWIG_IsOK(res1)) {
   60105           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALWarpAppOptions" "', argument " "1"" of type '" "GDALWarpAppOptions *""'"); 
   60106             :   }
   60107         808 :   arg1 = reinterpret_cast< GDALWarpAppOptions * >(argp1);
   60108         808 :   {
   60109         808 :     const int bLocalUseExceptions = GetUseExceptions();
   60110         808 :     if ( bLocalUseExceptions ) {
   60111         784 :       pushErrorHandler();
   60112             :     }
   60113         808 :     {
   60114         808 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60115         808 :       delete_GDALWarpAppOptions(arg1);
   60116         808 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60117             :     }
   60118         808 :     if ( bLocalUseExceptions ) {
   60119         784 :       popErrorHandler();
   60120             :     }
   60121             : #ifndef SED_HACKS
   60122             :     if ( bLocalUseExceptions ) {
   60123             :       CPLErr eclass = CPLGetLastErrorType();
   60124             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60125             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60126             :       }
   60127             :     }
   60128             : #endif
   60129             :   }
   60130         808 :   resultobj = SWIG_Py_Void();
   60131         808 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60132             :   return resultobj;
   60133             : fail:
   60134             :   return NULL;
   60135             : }
   60136             : 
   60137             : 
   60138         277 : SWIGINTERN PyObject *GDALWarpAppOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60139         277 :   PyObject *obj;
   60140         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60141         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALWarpAppOptions, SWIG_NewClientData(obj));
   60142         277 :   return SWIG_Py_Void();
   60143             : }
   60144             : 
   60145         808 : SWIGINTERN PyObject *GDALWarpAppOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60146         808 :   return SWIG_Python_InitShadowInstance(args);
   60147             : }
   60148             : 
   60149          87 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60150          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60151          87 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60152          87 :   int arg2 ;
   60153          87 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   60154          87 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   60155          87 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   60156          87 :   void *arg6 = (void *) NULL ;
   60157          87 :   void *argp1 = 0 ;
   60158          87 :   int res1 = 0 ;
   60159          87 :   void *argp4 = 0 ;
   60160          87 :   int res4 = 0 ;
   60161          87 :   PyObject *swig_obj[5] ;
   60162          87 :   int result;
   60163             :   
   60164             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60165          87 :   PyProgressData *psProgressInfo;
   60166          87 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60167          87 :   psProgressInfo->nLastReported = -1;
   60168          87 :   psProgressInfo->psPyCallback = NULL;
   60169          87 :   psProgressInfo->psPyCallbackData = NULL;
   60170          87 :   arg6 = psProgressInfo;
   60171          87 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestDS", 3, 5, swig_obj)) SWIG_fail;
   60172          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60173          87 :   if (!SWIG_IsOK(res1)) {
   60174           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALWarpDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60175             :   }
   60176          87 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60177          87 :   {
   60178             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   60179          87 :     if ( !PySequence_Check(swig_obj[1]) ) {
   60180           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   60181           0 :       SWIG_fail;
   60182             :     }
   60183          87 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   60184          87 :     if( size > (Py_ssize_t)INT_MAX ) {
   60185           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60186           0 :       SWIG_fail;
   60187             :     }
   60188          87 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   60189           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60190           0 :       SWIG_fail;
   60191             :     }
   60192          87 :     arg2 = (int)size;
   60193          87 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   60194          87 :     if( !arg3) {
   60195           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   60196           0 :       SWIG_fail;
   60197             :     }
   60198             :     
   60199         172 :     for( int i = 0; i<arg2; i++ ) {
   60200          85 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   60201          85 :       GDALDatasetShadow* rawobjectpointer = NULL;
   60202          85 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   60203          85 :       if (!rawobjectpointer) {
   60204           0 :         Py_DECREF(o);
   60205           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   60206           0 :         SWIG_fail;
   60207             :       }
   60208          85 :       arg3[i] = rawobjectpointer;
   60209          85 :       Py_DECREF(o);
   60210             :       
   60211             :     }
   60212             :   }
   60213          87 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   60214          87 :   if (!SWIG_IsOK(res4)) {
   60215           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestDS" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   60216             :   }
   60217          87 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   60218          87 :   if (swig_obj[3]) {
   60219          86 :     {
   60220             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60221             :       /* callback_func typemap */
   60222             :       
   60223             :       /* In some cases 0 is passed instead of None. */
   60224             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60225          86 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60226             :       {
   60227           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60228             :         {
   60229           0 :           swig_obj[3] = Py_None;
   60230             :         }
   60231             :       }
   60232             :       
   60233          86 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60234           1 :         void* cbfunction = NULL;
   60235           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60236             :             (void**)&cbfunction,
   60237             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60238             :             SWIG_POINTER_EXCEPTION | 0 ));
   60239             :         
   60240           1 :         if ( cbfunction == GDALTermProgress ) {
   60241             :           arg5 = GDALTermProgress;
   60242             :         } else {
   60243           1 :           if (!PyCallable_Check(swig_obj[3])) {
   60244           0 :             PyErr_SetString( PyExc_RuntimeError,
   60245             :               "Object given is not a Python function" );
   60246           0 :             SWIG_fail;
   60247             :           }
   60248           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   60249           1 :           arg5 = PyProgressProxy;
   60250             :         }
   60251             :         
   60252             :       }
   60253             :       
   60254             :     }
   60255             :   }
   60256          87 :   if (swig_obj[4]) {
   60257          85 :     {
   60258             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60259          85 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60260             :     }
   60261             :   }
   60262          87 :   {
   60263          87 :     if (!arg1) {
   60264           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60265             :     }
   60266             :   }
   60267          86 :   {
   60268          86 :     const int bLocalUseExceptions = GetUseExceptions();
   60269          86 :     if ( bLocalUseExceptions ) {
   60270          86 :       pushErrorHandler();
   60271             :     }
   60272          86 :     {
   60273          86 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60274          86 :       result = (int)wrapper_GDALWarpDestDS(arg1,arg2,arg3,arg4,arg5,arg6);
   60275          86 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60276             :     }
   60277          86 :     if ( bLocalUseExceptions ) {
   60278          86 :       popErrorHandler();
   60279             :     }
   60280             : #ifndef SED_HACKS
   60281             :     if ( bLocalUseExceptions ) {
   60282             :       CPLErr eclass = CPLGetLastErrorType();
   60283             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60284             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60285             :       }
   60286             :     }
   60287             : #endif
   60288             :   }
   60289          86 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60290          86 :   {
   60291             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60292          86 :     CPLFree( arg3 );
   60293             :   }
   60294          86 :   {
   60295             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60296             :     
   60297          86 :     CPLFree(psProgressInfo);
   60298             :     
   60299             :   }
   60300          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; } }
   60301             :   return resultobj;
   60302           1 : fail:
   60303           1 :   {
   60304             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60305           1 :     CPLFree( arg3 );
   60306             :   }
   60307           1 :   {
   60308             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60309             :     
   60310           1 :     CPLFree(psProgressInfo);
   60311             :     
   60312             :   }
   60313             :   return NULL;
   60314             : }
   60315             : 
   60316             : 
   60317         726 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60318         726 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60319         726 :   char *arg1 = (char *) 0 ;
   60320         726 :   int arg2 ;
   60321         726 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   60322         726 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   60323         726 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   60324         726 :   void *arg6 = (void *) NULL ;
   60325         726 :   int bToFree1 = 0 ;
   60326         726 :   void *argp4 = 0 ;
   60327         726 :   int res4 = 0 ;
   60328         726 :   PyObject *swig_obj[5] ;
   60329         726 :   GDALDatasetShadow *result = 0 ;
   60330             :   
   60331             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60332         726 :   PyProgressData *psProgressInfo;
   60333         726 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60334         726 :   psProgressInfo->nLastReported = -1;
   60335         726 :   psProgressInfo->psPyCallback = NULL;
   60336         726 :   psProgressInfo->psPyCallbackData = NULL;
   60337         726 :   arg6 = psProgressInfo;
   60338         726 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestName", 3, 5, swig_obj)) SWIG_fail;
   60339         726 :   {
   60340             :     /* %typemap(in) (const char *utf8_path) */
   60341         726 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60342             :     {
   60343         672 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60344             :     }
   60345             :     else
   60346             :     {
   60347          54 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60348             :       
   60349             :     }
   60350         726 :     if (arg1 == NULL)
   60351             :     {
   60352           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60353           1 :       SWIG_fail;
   60354             :     }
   60355             :   }
   60356         725 :   {
   60357             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   60358         725 :     if ( !PySequence_Check(swig_obj[1]) ) {
   60359           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   60360           0 :       SWIG_fail;
   60361             :     }
   60362         725 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   60363         725 :     if( size > (Py_ssize_t)INT_MAX ) {
   60364           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60365           0 :       SWIG_fail;
   60366             :     }
   60367         725 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   60368           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60369           0 :       SWIG_fail;
   60370             :     }
   60371         725 :     arg2 = (int)size;
   60372         725 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   60373         725 :     if( !arg3) {
   60374           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   60375           0 :       SWIG_fail;
   60376             :     }
   60377             :     
   60378        1468 :     for( int i = 0; i<arg2; i++ ) {
   60379         743 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   60380         743 :       GDALDatasetShadow* rawobjectpointer = NULL;
   60381         743 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   60382         743 :       if (!rawobjectpointer) {
   60383           0 :         Py_DECREF(o);
   60384           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   60385           0 :         SWIG_fail;
   60386             :       }
   60387         743 :       arg3[i] = rawobjectpointer;
   60388         743 :       Py_DECREF(o);
   60389             :       
   60390             :     }
   60391             :   }
   60392         725 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   60393         725 :   if (!SWIG_IsOK(res4)) {
   60394           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestName" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   60395             :   }
   60396         725 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   60397         725 :   if (swig_obj[3]) {
   60398         724 :     {
   60399             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60400             :       /* callback_func typemap */
   60401             :       
   60402             :       /* In some cases 0 is passed instead of None. */
   60403             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60404         724 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60405             :       {
   60406           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60407             :         {
   60408           0 :           swig_obj[3] = Py_None;
   60409             :         }
   60410             :       }
   60411             :       
   60412         724 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60413           2 :         void* cbfunction = NULL;
   60414           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60415             :             (void**)&cbfunction,
   60416             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60417             :             SWIG_POINTER_EXCEPTION | 0 ));
   60418             :         
   60419           2 :         if ( cbfunction == GDALTermProgress ) {
   60420             :           arg5 = GDALTermProgress;
   60421             :         } else {
   60422           2 :           if (!PyCallable_Check(swig_obj[3])) {
   60423           0 :             PyErr_SetString( PyExc_RuntimeError,
   60424             :               "Object given is not a Python function" );
   60425           0 :             SWIG_fail;
   60426             :           }
   60427           2 :           psProgressInfo->psPyCallback = swig_obj[3];
   60428           2 :           arg5 = PyProgressProxy;
   60429             :         }
   60430             :         
   60431             :       }
   60432             :       
   60433             :     }
   60434             :   }
   60435         725 :   if (swig_obj[4]) {
   60436         723 :     {
   60437             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60438         723 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60439             :     }
   60440             :   }
   60441         725 :   {
   60442         725 :     if (!arg1) {
   60443         725 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60444             :     }
   60445             :   }
   60446         725 :   {
   60447         725 :     const int bLocalUseExceptions = GetUseExceptions();
   60448         725 :     if ( bLocalUseExceptions ) {
   60449         701 :       pushErrorHandler();
   60450             :     }
   60451         725 :     {
   60452         725 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60453         725 :       result = (GDALDatasetShadow *)wrapper_GDALWarpDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   60454         725 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60455             :     }
   60456         725 :     if ( bLocalUseExceptions ) {
   60457         701 :       popErrorHandler();
   60458             :     }
   60459             : #ifndef SED_HACKS
   60460             :     if ( bLocalUseExceptions ) {
   60461             :       CPLErr eclass = CPLGetLastErrorType();
   60462             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60463             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60464             :       }
   60465             :     }
   60466             : #endif
   60467             :   }
   60468         725 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60469         725 :   {
   60470             :     /* %typemap(freearg) (const char *utf8_path) */
   60471         725 :     GDALPythonFreeCStr(arg1, bToFree1);
   60472             :   }
   60473         725 :   {
   60474             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60475         725 :     CPLFree( arg3 );
   60476             :   }
   60477         725 :   {
   60478             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60479             :     
   60480         725 :     CPLFree(psProgressInfo);
   60481             :     
   60482             :   }
   60483         806 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60484             :   return resultobj;
   60485           1 : fail:
   60486           1 :   {
   60487             :     /* %typemap(freearg) (const char *utf8_path) */
   60488           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   60489             :   }
   60490           1 :   {
   60491             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60492           1 :     CPLFree( arg3 );
   60493             :   }
   60494           1 :   {
   60495             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60496             :     
   60497           1 :     CPLFree(psProgressInfo);
   60498             :     
   60499             :   }
   60500             :   return NULL;
   60501             : }
   60502             : 
   60503             : 
   60504         652 : SWIGINTERN PyObject *_wrap_new_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60505         652 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60506         652 :   char **arg1 = (char **) 0 ;
   60507         652 :   PyObject *swig_obj[1] ;
   60508         652 :   GDALVectorTranslateOptions *result = 0 ;
   60509             :   
   60510         652 :   if (!args) SWIG_fail;
   60511         652 :   swig_obj[0] = args;
   60512         652 :   {
   60513             :     /* %typemap(in) char **dict */
   60514         652 :     arg1 = NULL;
   60515         652 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60516         652 :       int bErr = FALSE;
   60517         652 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60518         652 :       if ( bErr )
   60519             :       {
   60520           0 :         SWIG_fail;
   60521             :       }
   60522             :     }
   60523           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60524           0 :       int bErr = FALSE;
   60525           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60526           0 :       if ( bErr )
   60527             :       {
   60528           0 :         SWIG_fail;
   60529             :       }
   60530             :     }
   60531             :     else {
   60532           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60533           0 :       SWIG_fail;
   60534             :     }
   60535             :   }
   60536         652 :   {
   60537         652 :     const int bLocalUseExceptions = GetUseExceptions();
   60538         652 :     if ( bLocalUseExceptions ) {
   60539         501 :       pushErrorHandler();
   60540             :     }
   60541         652 :     {
   60542         652 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60543         652 :       result = (GDALVectorTranslateOptions *)new_GDALVectorTranslateOptions(arg1);
   60544         652 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60545             :     }
   60546         652 :     if ( bLocalUseExceptions ) {
   60547         501 :       popErrorHandler();
   60548             :     }
   60549             : #ifndef SED_HACKS
   60550             :     if ( bLocalUseExceptions ) {
   60551             :       CPLErr eclass = CPLGetLastErrorType();
   60552             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60553             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60554             :       }
   60555             :     }
   60556             : #endif
   60557             :   }
   60558         652 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_NEW |  0 );
   60559         652 :   {
   60560             :     /* %typemap(freearg) char **dict */
   60561         652 :     CSLDestroy( arg1 );
   60562             :   }
   60563         706 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60564             :   return resultobj;
   60565           0 : fail:
   60566           0 :   {
   60567             :     /* %typemap(freearg) char **dict */
   60568           0 :     CSLDestroy( arg1 );
   60569             :   }
   60570             :   return NULL;
   60571             : }
   60572             : 
   60573             : 
   60574         625 : SWIGINTERN PyObject *_wrap_delete_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60575         625 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60576         625 :   GDALVectorTranslateOptions *arg1 = (GDALVectorTranslateOptions *) 0 ;
   60577         625 :   void *argp1 = 0 ;
   60578         625 :   int res1 = 0 ;
   60579         625 :   PyObject *swig_obj[1] ;
   60580             :   
   60581         625 :   if (!args) SWIG_fail;
   60582         625 :   swig_obj[0] = args;
   60583         625 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   60584         625 :   if (!SWIG_IsOK(res1)) {
   60585           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorTranslateOptions" "', argument " "1"" of type '" "GDALVectorTranslateOptions *""'"); 
   60586             :   }
   60587         625 :   arg1 = reinterpret_cast< GDALVectorTranslateOptions * >(argp1);
   60588         625 :   {
   60589         625 :     const int bLocalUseExceptions = GetUseExceptions();
   60590         625 :     if ( bLocalUseExceptions ) {
   60591         474 :       pushErrorHandler();
   60592             :     }
   60593         625 :     {
   60594         625 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60595         625 :       delete_GDALVectorTranslateOptions(arg1);
   60596         625 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60597             :     }
   60598         625 :     if ( bLocalUseExceptions ) {
   60599         474 :       popErrorHandler();
   60600             :     }
   60601             : #ifndef SED_HACKS
   60602             :     if ( bLocalUseExceptions ) {
   60603             :       CPLErr eclass = CPLGetLastErrorType();
   60604             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60605             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60606             :       }
   60607             :     }
   60608             : #endif
   60609             :   }
   60610         625 :   resultobj = SWIG_Py_Void();
   60611         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; } }
   60612             :   return resultobj;
   60613             : fail:
   60614             :   return NULL;
   60615             : }
   60616             : 
   60617             : 
   60618         277 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60619         277 :   PyObject *obj;
   60620         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60621         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_NewClientData(obj));
   60622         277 :   return SWIG_Py_Void();
   60623             : }
   60624             : 
   60625         625 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60626         625 :   return SWIG_Python_InitShadowInstance(args);
   60627             : }
   60628             : 
   60629          12 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60630          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60631          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60632          12 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60633          12 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   60634          12 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60635          12 :   void *arg5 = (void *) NULL ;
   60636          12 :   void *argp1 = 0 ;
   60637          12 :   int res1 = 0 ;
   60638          12 :   void *argp2 = 0 ;
   60639          12 :   int res2 = 0 ;
   60640          12 :   void *argp3 = 0 ;
   60641          12 :   int res3 = 0 ;
   60642          12 :   PyObject *swig_obj[5] ;
   60643          12 :   int result;
   60644             :   
   60645             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60646          12 :   PyProgressData *psProgressInfo;
   60647          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60648          12 :   psProgressInfo->nLastReported = -1;
   60649          12 :   psProgressInfo->psPyCallback = NULL;
   60650          12 :   psProgressInfo->psPyCallbackData = NULL;
   60651          12 :   arg5 = psProgressInfo;
   60652          12 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestDS", 3, 5, swig_obj)) SWIG_fail;
   60653          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60654          12 :   if (!SWIG_IsOK(res1)) {
   60655           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60656             :   }
   60657          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60658          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60659          12 :   if (!SWIG_IsOK(res2)) {
   60660           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60661             :   }
   60662          12 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60663          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   60664          12 :   if (!SWIG_IsOK(res3)) {
   60665           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   60666             :   }
   60667          12 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   60668          12 :   if (swig_obj[3]) {
   60669          12 :     {
   60670             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60671             :       /* callback_func typemap */
   60672             :       
   60673             :       /* In some cases 0 is passed instead of None. */
   60674             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60675          12 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60676             :       {
   60677           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60678             :         {
   60679           0 :           swig_obj[3] = Py_None;
   60680             :         }
   60681             :       }
   60682             :       
   60683          12 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60684           0 :         void* cbfunction = NULL;
   60685           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60686             :             (void**)&cbfunction,
   60687             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60688             :             SWIG_POINTER_EXCEPTION | 0 ));
   60689             :         
   60690           0 :         if ( cbfunction == GDALTermProgress ) {
   60691             :           arg4 = GDALTermProgress;
   60692             :         } else {
   60693           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60694           0 :             PyErr_SetString( PyExc_RuntimeError,
   60695             :               "Object given is not a Python function" );
   60696           0 :             SWIG_fail;
   60697             :           }
   60698           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60699           0 :           arg4 = PyProgressProxy;
   60700             :         }
   60701             :         
   60702             :       }
   60703             :       
   60704             :     }
   60705             :   }
   60706          12 :   if (swig_obj[4]) {
   60707          12 :     {
   60708             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60709          12 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60710             :     }
   60711             :   }
   60712          12 :   {
   60713          12 :     const int bLocalUseExceptions = GetUseExceptions();
   60714          12 :     if ( bLocalUseExceptions ) {
   60715          11 :       pushErrorHandler();
   60716             :     }
   60717          12 :     {
   60718          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60719          12 :       result = (int)wrapper_GDALVectorTranslateDestDS(arg1,arg2,arg3,arg4,arg5);
   60720          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60721             :     }
   60722          12 :     if ( bLocalUseExceptions ) {
   60723          11 :       popErrorHandler();
   60724             :     }
   60725             : #ifndef SED_HACKS
   60726             :     if ( bLocalUseExceptions ) {
   60727             :       CPLErr eclass = CPLGetLastErrorType();
   60728             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60729             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60730             :       }
   60731             :     }
   60732             : #endif
   60733             :   }
   60734          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60735          12 :   {
   60736             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60737             :     
   60738          12 :     CPLFree(psProgressInfo);
   60739             :     
   60740             :   }
   60741          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; } }
   60742             :   return resultobj;
   60743           0 : fail:
   60744           0 :   {
   60745             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60746             :     
   60747           0 :     CPLFree(psProgressInfo);
   60748             :     
   60749             :   }
   60750             :   return NULL;
   60751             : }
   60752             : 
   60753             : 
   60754         602 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60755         602 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60756         602 :   char *arg1 = (char *) 0 ;
   60757         602 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60758         602 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   60759         602 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60760         602 :   void *arg5 = (void *) NULL ;
   60761         602 :   int bToFree1 = 0 ;
   60762         602 :   void *argp2 = 0 ;
   60763         602 :   int res2 = 0 ;
   60764         602 :   void *argp3 = 0 ;
   60765         602 :   int res3 = 0 ;
   60766         602 :   PyObject *swig_obj[5] ;
   60767         602 :   GDALDatasetShadow *result = 0 ;
   60768             :   
   60769             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60770         602 :   PyProgressData *psProgressInfo;
   60771         602 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60772         602 :   psProgressInfo->nLastReported = -1;
   60773         602 :   psProgressInfo->psPyCallback = NULL;
   60774         602 :   psProgressInfo->psPyCallbackData = NULL;
   60775         602 :   arg5 = psProgressInfo;
   60776         602 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   60777         602 :   {
   60778             :     /* %typemap(in) (const char *utf8_path) */
   60779         602 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60780             :     {
   60781         480 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60782             :     }
   60783             :     else
   60784             :     {
   60785         122 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60786             :       
   60787             :     }
   60788         602 :     if (arg1 == NULL)
   60789             :     {
   60790           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60791           1 :       SWIG_fail;
   60792             :     }
   60793             :   }
   60794         601 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60795         601 :   if (!SWIG_IsOK(res2)) {
   60796           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60797             :   }
   60798         601 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60799         601 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   60800         601 :   if (!SWIG_IsOK(res3)) {
   60801           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   60802             :   }
   60803         601 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   60804         601 :   if (swig_obj[3]) {
   60805         601 :     {
   60806             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60807             :       /* callback_func typemap */
   60808             :       
   60809             :       /* In some cases 0 is passed instead of None. */
   60810             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60811         601 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60812             :       {
   60813           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60814             :         {
   60815           0 :           swig_obj[3] = Py_None;
   60816             :         }
   60817             :       }
   60818             :       
   60819         601 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60820           3 :         void* cbfunction = NULL;
   60821           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60822             :             (void**)&cbfunction,
   60823             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60824             :             SWIG_POINTER_EXCEPTION | 0 ));
   60825             :         
   60826           3 :         if ( cbfunction == GDALTermProgress ) {
   60827             :           arg4 = GDALTermProgress;
   60828             :         } else {
   60829           3 :           if (!PyCallable_Check(swig_obj[3])) {
   60830           0 :             PyErr_SetString( PyExc_RuntimeError,
   60831             :               "Object given is not a Python function" );
   60832           0 :             SWIG_fail;
   60833             :           }
   60834           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   60835           3 :           arg4 = PyProgressProxy;
   60836             :         }
   60837             :         
   60838             :       }
   60839             :       
   60840             :     }
   60841             :   }
   60842         601 :   if (swig_obj[4]) {
   60843         601 :     {
   60844             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60845         601 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60846             :     }
   60847             :   }
   60848         601 :   {
   60849         601 :     if (!arg1) {
   60850         601 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60851             :     }
   60852             :   }
   60853         601 :   {
   60854         601 :     const int bLocalUseExceptions = GetUseExceptions();
   60855         601 :     if ( bLocalUseExceptions ) {
   60856         451 :       pushErrorHandler();
   60857             :     }
   60858         601 :     {
   60859         601 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60860         601 :       result = (GDALDatasetShadow *)wrapper_GDALVectorTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   60861         601 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60862             :     }
   60863         601 :     if ( bLocalUseExceptions ) {
   60864         451 :       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         601 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60876         601 :   {
   60877             :     /* %typemap(freearg) (const char *utf8_path) */
   60878         601 :     GDALPythonFreeCStr(arg1, bToFree1);
   60879             :   }
   60880         601 :   {
   60881             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60882             :     
   60883         601 :     CPLFree(psProgressInfo);
   60884             :     
   60885             :   }
   60886         636 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60887             :   return resultobj;
   60888           1 : fail:
   60889           1 :   {
   60890             :     /* %typemap(freearg) (const char *utf8_path) */
   60891           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   60892             :   }
   60893           1 :   {
   60894             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60895             :     
   60896           1 :     CPLFree(psProgressInfo);
   60897             :     
   60898             :   }
   60899             :   return NULL;
   60900             : }
   60901             : 
   60902             : 
   60903          93 : SWIGINTERN PyObject *_wrap_new_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60904          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60905          93 :   char **arg1 = (char **) 0 ;
   60906          93 :   PyObject *swig_obj[1] ;
   60907          93 :   GDALDEMProcessingOptions *result = 0 ;
   60908             :   
   60909          93 :   if (!args) SWIG_fail;
   60910          93 :   swig_obj[0] = args;
   60911          93 :   {
   60912             :     /* %typemap(in) char **dict */
   60913          93 :     arg1 = NULL;
   60914          93 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60915          93 :       int bErr = FALSE;
   60916          93 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60917          93 :       if ( bErr )
   60918             :       {
   60919           0 :         SWIG_fail;
   60920             :       }
   60921             :     }
   60922           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60923           0 :       int bErr = FALSE;
   60924           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60925           0 :       if ( bErr )
   60926             :       {
   60927           0 :         SWIG_fail;
   60928             :       }
   60929             :     }
   60930             :     else {
   60931           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60932           0 :       SWIG_fail;
   60933             :     }
   60934             :   }
   60935          93 :   {
   60936          93 :     const int bLocalUseExceptions = GetUseExceptions();
   60937          93 :     if ( bLocalUseExceptions ) {
   60938          93 :       pushErrorHandler();
   60939             :     }
   60940          93 :     {
   60941          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60942          93 :       result = (GDALDEMProcessingOptions *)new_GDALDEMProcessingOptions(arg1);
   60943          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60944             :     }
   60945          93 :     if ( bLocalUseExceptions ) {
   60946          93 :       popErrorHandler();
   60947             :     }
   60948             : #ifndef SED_HACKS
   60949             :     if ( bLocalUseExceptions ) {
   60950             :       CPLErr eclass = CPLGetLastErrorType();
   60951             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60952             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60953             :       }
   60954             :     }
   60955             : #endif
   60956             :   }
   60957          93 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_NEW |  0 );
   60958          93 :   {
   60959             :     /* %typemap(freearg) char **dict */
   60960          93 :     CSLDestroy( arg1 );
   60961             :   }
   60962         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; } }
   60963             :   return resultobj;
   60964           0 : fail:
   60965           0 :   {
   60966             :     /* %typemap(freearg) char **dict */
   60967           0 :     CSLDestroy( arg1 );
   60968             :   }
   60969             :   return NULL;
   60970             : }
   60971             : 
   60972             : 
   60973          89 : SWIGINTERN PyObject *_wrap_delete_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60974          89 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60975          89 :   GDALDEMProcessingOptions *arg1 = (GDALDEMProcessingOptions *) 0 ;
   60976          89 :   void *argp1 = 0 ;
   60977          89 :   int res1 = 0 ;
   60978          89 :   PyObject *swig_obj[1] ;
   60979             :   
   60980          89 :   if (!args) SWIG_fail;
   60981          89 :   swig_obj[0] = args;
   60982          89 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_DISOWN |  0 );
   60983          89 :   if (!SWIG_IsOK(res1)) {
   60984           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALDEMProcessingOptions" "', argument " "1"" of type '" "GDALDEMProcessingOptions *""'"); 
   60985             :   }
   60986          89 :   arg1 = reinterpret_cast< GDALDEMProcessingOptions * >(argp1);
   60987          89 :   {
   60988          89 :     const int bLocalUseExceptions = GetUseExceptions();
   60989          89 :     if ( bLocalUseExceptions ) {
   60990          89 :       pushErrorHandler();
   60991             :     }
   60992          89 :     {
   60993          89 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60994          89 :       delete_GDALDEMProcessingOptions(arg1);
   60995          89 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60996             :     }
   60997          89 :     if ( bLocalUseExceptions ) {
   60998          89 :       popErrorHandler();
   60999             :     }
   61000             : #ifndef SED_HACKS
   61001             :     if ( bLocalUseExceptions ) {
   61002             :       CPLErr eclass = CPLGetLastErrorType();
   61003             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61004             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61005             :       }
   61006             :     }
   61007             : #endif
   61008             :   }
   61009          89 :   resultobj = SWIG_Py_Void();
   61010          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; } }
   61011             :   return resultobj;
   61012             : fail:
   61013             :   return NULL;
   61014             : }
   61015             : 
   61016             : 
   61017         277 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61018         277 :   PyObject *obj;
   61019         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61020         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_NewClientData(obj));
   61021         277 :   return SWIG_Py_Void();
   61022             : }
   61023             : 
   61024          89 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61025          89 :   return SWIG_Python_InitShadowInstance(args);
   61026             : }
   61027             : 
   61028          89 : SWIGINTERN PyObject *_wrap_DEMProcessingInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61029          89 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61030          89 :   char *arg1 = (char *) 0 ;
   61031          89 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61032          89 :   char *arg3 = (char *) 0 ;
   61033          89 :   char *arg4 = (char *) 0 ;
   61034          89 :   GDALDEMProcessingOptions *arg5 = (GDALDEMProcessingOptions *) 0 ;
   61035          89 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   61036          89 :   void *arg7 = (void *) NULL ;
   61037          89 :   int bToFree1 = 0 ;
   61038          89 :   void *argp2 = 0 ;
   61039          89 :   int res2 = 0 ;
   61040          89 :   int res3 ;
   61041          89 :   char *buf3 = 0 ;
   61042          89 :   int alloc3 = 0 ;
   61043          89 :   int res4 ;
   61044          89 :   char *buf4 = 0 ;
   61045          89 :   int alloc4 = 0 ;
   61046          89 :   void *argp5 = 0 ;
   61047          89 :   int res5 = 0 ;
   61048          89 :   PyObject *swig_obj[7] ;
   61049          89 :   GDALDatasetShadow *result = 0 ;
   61050             :   
   61051             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61052          89 :   PyProgressData *psProgressInfo;
   61053          89 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61054          89 :   psProgressInfo->nLastReported = -1;
   61055          89 :   psProgressInfo->psPyCallback = NULL;
   61056          89 :   psProgressInfo->psPyCallbackData = NULL;
   61057          89 :   arg7 = psProgressInfo;
   61058          89 :   if (!SWIG_Python_UnpackTuple(args, "DEMProcessingInternal", 5, 7, swig_obj)) SWIG_fail;
   61059          89 :   {
   61060             :     /* %typemap(in) (const char *utf8_path) */
   61061          89 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61062             :     {
   61063          88 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61064             :     }
   61065             :     else
   61066             :     {
   61067           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61068             :       
   61069             :     }
   61070          89 :     if (arg1 == NULL)
   61071             :     {
   61072           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61073           0 :       SWIG_fail;
   61074             :     }
   61075             :   }
   61076          89 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61077          89 :   if (!SWIG_IsOK(res2)) {
   61078           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DEMProcessingInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61079             :   }
   61080          89 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61081          89 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   61082          89 :   if (!SWIG_IsOK(res3)) {
   61083           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DEMProcessingInternal" "', argument " "3"" of type '" "char const *""'");
   61084             :   }
   61085          89 :   arg3 = reinterpret_cast< char * >(buf3);
   61086          89 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   61087          89 :   if (!SWIG_IsOK(res4)) {
   61088           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DEMProcessingInternal" "', argument " "4"" of type '" "char const *""'");
   61089             :   }
   61090          89 :   arg4 = reinterpret_cast< char * >(buf4);
   61091          89 :   res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_GDALDEMProcessingOptions, 0 |  0 );
   61092          89 :   if (!SWIG_IsOK(res5)) {
   61093           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DEMProcessingInternal" "', argument " "5"" of type '" "GDALDEMProcessingOptions *""'"); 
   61094             :   }
   61095          89 :   arg5 = reinterpret_cast< GDALDEMProcessingOptions * >(argp5);
   61096          89 :   if (swig_obj[5]) {
   61097          89 :     {
   61098             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61099             :       /* callback_func typemap */
   61100             :       
   61101             :       /* In some cases 0 is passed instead of None. */
   61102             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61103          89 :       if ( PyLong_Check(swig_obj[5]) || PyInt_Check(swig_obj[5]) )
   61104             :       {
   61105           0 :         if( PyLong_AsLong(swig_obj[5]) == 0 )
   61106             :         {
   61107           0 :           swig_obj[5] = Py_None;
   61108             :         }
   61109             :       }
   61110             :       
   61111          89 :       if (swig_obj[5] && swig_obj[5] != Py_None ) {
   61112           0 :         void* cbfunction = NULL;
   61113           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[5],
   61114             :             (void**)&cbfunction,
   61115             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61116             :             SWIG_POINTER_EXCEPTION | 0 ));
   61117             :         
   61118           0 :         if ( cbfunction == GDALTermProgress ) {
   61119             :           arg6 = GDALTermProgress;
   61120             :         } else {
   61121           0 :           if (!PyCallable_Check(swig_obj[5])) {
   61122           0 :             PyErr_SetString( PyExc_RuntimeError,
   61123             :               "Object given is not a Python function" );
   61124           0 :             SWIG_fail;
   61125             :           }
   61126           0 :           psProgressInfo->psPyCallback = swig_obj[5];
   61127           0 :           arg6 = PyProgressProxy;
   61128             :         }
   61129             :         
   61130             :       }
   61131             :       
   61132             :     }
   61133             :   }
   61134          89 :   if (swig_obj[6]) {
   61135          89 :     {
   61136             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61137          89 :       psProgressInfo->psPyCallbackData = swig_obj[6] ;
   61138             :     }
   61139             :   }
   61140          89 :   {
   61141          89 :     if (!arg1) {
   61142          89 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61143             :     }
   61144             :   }
   61145          89 :   {
   61146          89 :     if (!arg2) {
   61147           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61148             :     }
   61149             :   }
   61150          89 :   {
   61151          89 :     if (!arg3) {
   61152           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61153             :     }
   61154             :   }
   61155          89 :   {
   61156          89 :     const int bLocalUseExceptions = GetUseExceptions();
   61157          89 :     if ( bLocalUseExceptions ) {
   61158          89 :       pushErrorHandler();
   61159             :     }
   61160          89 :     {
   61161          89 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61162          89 :       result = (GDALDatasetShadow *)wrapper_GDALDEMProcessing((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7);
   61163          89 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61164             :     }
   61165          89 :     if ( bLocalUseExceptions ) {
   61166          89 :       popErrorHandler();
   61167             :     }
   61168             : #ifndef SED_HACKS
   61169             :     if ( bLocalUseExceptions ) {
   61170             :       CPLErr eclass = CPLGetLastErrorType();
   61171             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61172             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61173             :       }
   61174             :     }
   61175             : #endif
   61176             :   }
   61177          89 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61178          89 :   {
   61179             :     /* %typemap(freearg) (const char *utf8_path) */
   61180          89 :     GDALPythonFreeCStr(arg1, bToFree1);
   61181             :   }
   61182          89 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   61183          89 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   61184          89 :   {
   61185             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61186             :     
   61187          89 :     CPLFree(psProgressInfo);
   61188             :     
   61189             :   }
   61190          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; } }
   61191             :   return resultobj;
   61192           0 : fail:
   61193           0 :   {
   61194             :     /* %typemap(freearg) (const char *utf8_path) */
   61195           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61196             :   }
   61197           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   61198           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   61199           0 :   {
   61200             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61201             :     
   61202           0 :     CPLFree(psProgressInfo);
   61203             :     
   61204             :   }
   61205             :   return NULL;
   61206             : }
   61207             : 
   61208             : 
   61209          45 : SWIGINTERN PyObject *_wrap_new_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61210          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61211          45 :   char **arg1 = (char **) 0 ;
   61212          45 :   PyObject *swig_obj[1] ;
   61213          45 :   GDALNearblackOptions *result = 0 ;
   61214             :   
   61215          45 :   if (!args) SWIG_fail;
   61216          45 :   swig_obj[0] = args;
   61217          45 :   {
   61218             :     /* %typemap(in) char **dict */
   61219          45 :     arg1 = NULL;
   61220          45 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61221          45 :       int bErr = FALSE;
   61222          45 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61223          45 :       if ( bErr )
   61224             :       {
   61225           0 :         SWIG_fail;
   61226             :       }
   61227             :     }
   61228           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61229           0 :       int bErr = FALSE;
   61230           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61231           0 :       if ( bErr )
   61232             :       {
   61233           0 :         SWIG_fail;
   61234             :       }
   61235             :     }
   61236             :     else {
   61237           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61238           0 :       SWIG_fail;
   61239             :     }
   61240             :   }
   61241          45 :   {
   61242          45 :     const int bLocalUseExceptions = GetUseExceptions();
   61243          45 :     if ( bLocalUseExceptions ) {
   61244          45 :       pushErrorHandler();
   61245             :     }
   61246          45 :     {
   61247          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61248          45 :       result = (GDALNearblackOptions *)new_GDALNearblackOptions(arg1);
   61249          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61250             :     }
   61251          45 :     if ( bLocalUseExceptions ) {
   61252          45 :       popErrorHandler();
   61253             :     }
   61254             : #ifndef SED_HACKS
   61255             :     if ( bLocalUseExceptions ) {
   61256             :       CPLErr eclass = CPLGetLastErrorType();
   61257             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61258             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61259             :       }
   61260             :     }
   61261             : #endif
   61262             :   }
   61263          45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_NEW |  0 );
   61264          45 :   {
   61265             :     /* %typemap(freearg) char **dict */
   61266          45 :     CSLDestroy( arg1 );
   61267             :   }
   61268          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; } }
   61269             :   return resultobj;
   61270           0 : fail:
   61271           0 :   {
   61272             :     /* %typemap(freearg) char **dict */
   61273           0 :     CSLDestroy( arg1 );
   61274             :   }
   61275             :   return NULL;
   61276             : }
   61277             : 
   61278             : 
   61279          45 : SWIGINTERN PyObject *_wrap_delete_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61280          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61281          45 :   GDALNearblackOptions *arg1 = (GDALNearblackOptions *) 0 ;
   61282          45 :   void *argp1 = 0 ;
   61283          45 :   int res1 = 0 ;
   61284          45 :   PyObject *swig_obj[1] ;
   61285             :   
   61286          45 :   if (!args) SWIG_fail;
   61287          45 :   swig_obj[0] = args;
   61288          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_DISOWN |  0 );
   61289          45 :   if (!SWIG_IsOK(res1)) {
   61290           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALNearblackOptions" "', argument " "1"" of type '" "GDALNearblackOptions *""'"); 
   61291             :   }
   61292          45 :   arg1 = reinterpret_cast< GDALNearblackOptions * >(argp1);
   61293          45 :   {
   61294          45 :     const int bLocalUseExceptions = GetUseExceptions();
   61295          45 :     if ( bLocalUseExceptions ) {
   61296          45 :       pushErrorHandler();
   61297             :     }
   61298          45 :     {
   61299          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61300          45 :       delete_GDALNearblackOptions(arg1);
   61301          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61302             :     }
   61303          45 :     if ( bLocalUseExceptions ) {
   61304          45 :       popErrorHandler();
   61305             :     }
   61306             : #ifndef SED_HACKS
   61307             :     if ( bLocalUseExceptions ) {
   61308             :       CPLErr eclass = CPLGetLastErrorType();
   61309             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61310             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61311             :       }
   61312             :     }
   61313             : #endif
   61314             :   }
   61315          45 :   resultobj = SWIG_Py_Void();
   61316          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; } }
   61317             :   return resultobj;
   61318             : fail:
   61319             :   return NULL;
   61320             : }
   61321             : 
   61322             : 
   61323         277 : SWIGINTERN PyObject *GDALNearblackOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61324         277 :   PyObject *obj;
   61325         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61326         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALNearblackOptions, SWIG_NewClientData(obj));
   61327         277 :   return SWIG_Py_Void();
   61328             : }
   61329             : 
   61330          45 : SWIGINTERN PyObject *GDALNearblackOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61331          45 :   return SWIG_Python_InitShadowInstance(args);
   61332             : }
   61333             : 
   61334           2 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61335           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61336           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   61337           2 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61338           2 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   61339           2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61340           2 :   void *arg5 = (void *) NULL ;
   61341           2 :   void *argp1 = 0 ;
   61342           2 :   int res1 = 0 ;
   61343           2 :   void *argp2 = 0 ;
   61344           2 :   int res2 = 0 ;
   61345           2 :   void *argp3 = 0 ;
   61346           2 :   int res3 = 0 ;
   61347           2 :   PyObject *swig_obj[5] ;
   61348           2 :   int result;
   61349             :   
   61350             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61351           2 :   PyProgressData *psProgressInfo;
   61352           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61353           2 :   psProgressInfo->nLastReported = -1;
   61354           2 :   psProgressInfo->psPyCallback = NULL;
   61355           2 :   psProgressInfo->psPyCallbackData = NULL;
   61356           2 :   arg5 = psProgressInfo;
   61357           2 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestDS", 3, 5, swig_obj)) SWIG_fail;
   61358           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61359           2 :   if (!SWIG_IsOK(res1)) {
   61360           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   61361             :   }
   61362           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   61363           2 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61364           2 :   if (!SWIG_IsOK(res2)) {
   61365           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61366             :   }
   61367           2 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61368           2 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   61369           2 :   if (!SWIG_IsOK(res3)) {
   61370           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   61371             :   }
   61372           2 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   61373           2 :   if (swig_obj[3]) {
   61374           2 :     {
   61375             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61376             :       /* callback_func typemap */
   61377             :       
   61378             :       /* In some cases 0 is passed instead of None. */
   61379             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61380           2 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61381             :       {
   61382           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61383             :         {
   61384           0 :           swig_obj[3] = Py_None;
   61385             :         }
   61386             :       }
   61387             :       
   61388           2 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61389           0 :         void* cbfunction = NULL;
   61390           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61391             :             (void**)&cbfunction,
   61392             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61393             :             SWIG_POINTER_EXCEPTION | 0 ));
   61394             :         
   61395           0 :         if ( cbfunction == GDALTermProgress ) {
   61396             :           arg4 = GDALTermProgress;
   61397             :         } else {
   61398           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61399           0 :             PyErr_SetString( PyExc_RuntimeError,
   61400             :               "Object given is not a Python function" );
   61401           0 :             SWIG_fail;
   61402             :           }
   61403           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61404           0 :           arg4 = PyProgressProxy;
   61405             :         }
   61406             :         
   61407             :       }
   61408             :       
   61409             :     }
   61410             :   }
   61411           2 :   if (swig_obj[4]) {
   61412           2 :     {
   61413             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61414           2 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61415             :     }
   61416             :   }
   61417           2 :   {
   61418           2 :     const int bLocalUseExceptions = GetUseExceptions();
   61419           2 :     if ( bLocalUseExceptions ) {
   61420           2 :       pushErrorHandler();
   61421             :     }
   61422           2 :     {
   61423           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61424           2 :       result = (int)wrapper_GDALNearblackDestDS(arg1,arg2,arg3,arg4,arg5);
   61425           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61426             :     }
   61427           2 :     if ( bLocalUseExceptions ) {
   61428           2 :       popErrorHandler();
   61429             :     }
   61430             : #ifndef SED_HACKS
   61431             :     if ( bLocalUseExceptions ) {
   61432             :       CPLErr eclass = CPLGetLastErrorType();
   61433             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61434             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61435             :       }
   61436             :     }
   61437             : #endif
   61438             :   }
   61439           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   61440           2 :   {
   61441             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61442             :     
   61443           2 :     CPLFree(psProgressInfo);
   61444             :     
   61445             :   }
   61446           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; } }
   61447             :   return resultobj;
   61448           0 : fail:
   61449           0 :   {
   61450             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61451             :     
   61452           0 :     CPLFree(psProgressInfo);
   61453             :     
   61454             :   }
   61455             :   return NULL;
   61456             : }
   61457             : 
   61458             : 
   61459          43 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61460          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61461          43 :   char *arg1 = (char *) 0 ;
   61462          43 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61463          43 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   61464          43 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61465          43 :   void *arg5 = (void *) NULL ;
   61466          43 :   int bToFree1 = 0 ;
   61467          43 :   void *argp2 = 0 ;
   61468          43 :   int res2 = 0 ;
   61469          43 :   void *argp3 = 0 ;
   61470          43 :   int res3 = 0 ;
   61471          43 :   PyObject *swig_obj[5] ;
   61472          43 :   GDALDatasetShadow *result = 0 ;
   61473             :   
   61474             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61475          43 :   PyProgressData *psProgressInfo;
   61476          43 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61477          43 :   psProgressInfo->nLastReported = -1;
   61478          43 :   psProgressInfo->psPyCallback = NULL;
   61479          43 :   psProgressInfo->psPyCallbackData = NULL;
   61480          43 :   arg5 = psProgressInfo;
   61481          43 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestName", 3, 5, swig_obj)) SWIG_fail;
   61482          43 :   {
   61483             :     /* %typemap(in) (const char *utf8_path) */
   61484          43 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61485             :     {
   61486          41 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61487             :     }
   61488             :     else
   61489             :     {
   61490           2 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61491             :       
   61492             :     }
   61493          43 :     if (arg1 == NULL)
   61494             :     {
   61495           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61496           0 :       SWIG_fail;
   61497             :     }
   61498             :   }
   61499          43 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61500          43 :   if (!SWIG_IsOK(res2)) {
   61501           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61502             :   }
   61503          43 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61504          43 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   61505          43 :   if (!SWIG_IsOK(res3)) {
   61506           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestName" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   61507             :   }
   61508          43 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   61509          43 :   if (swig_obj[3]) {
   61510          43 :     {
   61511             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61512             :       /* callback_func typemap */
   61513             :       
   61514             :       /* In some cases 0 is passed instead of None. */
   61515             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61516          43 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61517             :       {
   61518           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61519             :         {
   61520           0 :           swig_obj[3] = Py_None;
   61521             :         }
   61522             :       }
   61523             :       
   61524          43 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61525           0 :         void* cbfunction = NULL;
   61526           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61527             :             (void**)&cbfunction,
   61528             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61529             :             SWIG_POINTER_EXCEPTION | 0 ));
   61530             :         
   61531           0 :         if ( cbfunction == GDALTermProgress ) {
   61532             :           arg4 = GDALTermProgress;
   61533             :         } else {
   61534           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61535           0 :             PyErr_SetString( PyExc_RuntimeError,
   61536             :               "Object given is not a Python function" );
   61537           0 :             SWIG_fail;
   61538             :           }
   61539           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61540           0 :           arg4 = PyProgressProxy;
   61541             :         }
   61542             :         
   61543             :       }
   61544             :       
   61545             :     }
   61546             :   }
   61547          43 :   if (swig_obj[4]) {
   61548          43 :     {
   61549             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61550          43 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61551             :     }
   61552             :   }
   61553          43 :   {
   61554          43 :     if (!arg1) {
   61555          43 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61556             :     }
   61557             :   }
   61558          43 :   {
   61559          43 :     const int bLocalUseExceptions = GetUseExceptions();
   61560          43 :     if ( bLocalUseExceptions ) {
   61561          43 :       pushErrorHandler();
   61562             :     }
   61563          43 :     {
   61564          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61565          43 :       result = (GDALDatasetShadow *)wrapper_GDALNearblackDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   61566          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61567             :     }
   61568          43 :     if ( bLocalUseExceptions ) {
   61569          43 :       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          43 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61581          43 :   {
   61582             :     /* %typemap(freearg) (const char *utf8_path) */
   61583          43 :     GDALPythonFreeCStr(arg1, bToFree1);
   61584             :   }
   61585          43 :   {
   61586             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61587             :     
   61588          43 :     CPLFree(psProgressInfo);
   61589             :     
   61590             :   }
   61591          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; } }
   61592             :   return resultobj;
   61593           0 : fail:
   61594           0 :   {
   61595             :     /* %typemap(freearg) (const char *utf8_path) */
   61596           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61597             :   }
   61598           0 :   {
   61599             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61600             :     
   61601           0 :     CPLFree(psProgressInfo);
   61602             :     
   61603             :   }
   61604             :   return NULL;
   61605             : }
   61606             : 
   61607             : 
   61608          52 : SWIGINTERN PyObject *_wrap_new_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61609          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61610          52 :   char **arg1 = (char **) 0 ;
   61611          52 :   PyObject *swig_obj[1] ;
   61612          52 :   GDALGridOptions *result = 0 ;
   61613             :   
   61614          52 :   if (!args) SWIG_fail;
   61615          52 :   swig_obj[0] = args;
   61616          52 :   {
   61617             :     /* %typemap(in) char **dict */
   61618          52 :     arg1 = NULL;
   61619          52 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61620          52 :       int bErr = FALSE;
   61621          52 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61622          52 :       if ( bErr )
   61623             :       {
   61624           0 :         SWIG_fail;
   61625             :       }
   61626             :     }
   61627           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61628           0 :       int bErr = FALSE;
   61629           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61630           0 :       if ( bErr )
   61631             :       {
   61632           0 :         SWIG_fail;
   61633             :       }
   61634             :     }
   61635             :     else {
   61636           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61637           0 :       SWIG_fail;
   61638             :     }
   61639             :   }
   61640          52 :   {
   61641          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61642          52 :     if ( bLocalUseExceptions ) {
   61643          51 :       pushErrorHandler();
   61644             :     }
   61645          52 :     {
   61646          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61647          52 :       result = (GDALGridOptions *)new_GDALGridOptions(arg1);
   61648          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61649             :     }
   61650          52 :     if ( bLocalUseExceptions ) {
   61651          51 :       popErrorHandler();
   61652             :     }
   61653             : #ifndef SED_HACKS
   61654             :     if ( bLocalUseExceptions ) {
   61655             :       CPLErr eclass = CPLGetLastErrorType();
   61656             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61657             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61658             :       }
   61659             :     }
   61660             : #endif
   61661             :   }
   61662          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_NEW |  0 );
   61663          52 :   {
   61664             :     /* %typemap(freearg) char **dict */
   61665          52 :     CSLDestroy( arg1 );
   61666             :   }
   61667          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; } }
   61668             :   return resultobj;
   61669           0 : fail:
   61670           0 :   {
   61671             :     /* %typemap(freearg) char **dict */
   61672           0 :     CSLDestroy( arg1 );
   61673             :   }
   61674             :   return NULL;
   61675             : }
   61676             : 
   61677             : 
   61678          52 : SWIGINTERN PyObject *_wrap_delete_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61679          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61680          52 :   GDALGridOptions *arg1 = (GDALGridOptions *) 0 ;
   61681          52 :   void *argp1 = 0 ;
   61682          52 :   int res1 = 0 ;
   61683          52 :   PyObject *swig_obj[1] ;
   61684             :   
   61685          52 :   if (!args) SWIG_fail;
   61686          52 :   swig_obj[0] = args;
   61687          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_DISOWN |  0 );
   61688          52 :   if (!SWIG_IsOK(res1)) {
   61689           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALGridOptions" "', argument " "1"" of type '" "GDALGridOptions *""'"); 
   61690             :   }
   61691          52 :   arg1 = reinterpret_cast< GDALGridOptions * >(argp1);
   61692          52 :   {
   61693          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61694          52 :     if ( bLocalUseExceptions ) {
   61695          51 :       pushErrorHandler();
   61696             :     }
   61697          52 :     {
   61698          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61699          52 :       delete_GDALGridOptions(arg1);
   61700          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61701             :     }
   61702          52 :     if ( bLocalUseExceptions ) {
   61703          51 :       popErrorHandler();
   61704             :     }
   61705             : #ifndef SED_HACKS
   61706             :     if ( bLocalUseExceptions ) {
   61707             :       CPLErr eclass = CPLGetLastErrorType();
   61708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61710             :       }
   61711             :     }
   61712             : #endif
   61713             :   }
   61714          52 :   resultobj = SWIG_Py_Void();
   61715          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; } }
   61716             :   return resultobj;
   61717             : fail:
   61718             :   return NULL;
   61719             : }
   61720             : 
   61721             : 
   61722         277 : SWIGINTERN PyObject *GDALGridOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61723         277 :   PyObject *obj;
   61724         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61725         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGridOptions, SWIG_NewClientData(obj));
   61726         277 :   return SWIG_Py_Void();
   61727             : }
   61728             : 
   61729          52 : SWIGINTERN PyObject *GDALGridOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61730          52 :   return SWIG_Python_InitShadowInstance(args);
   61731             : }
   61732             : 
   61733          52 : SWIGINTERN PyObject *_wrap_GridInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61734          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61735          52 :   char *arg1 = (char *) 0 ;
   61736          52 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61737          52 :   GDALGridOptions *arg3 = (GDALGridOptions *) 0 ;
   61738          52 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61739          52 :   void *arg5 = (void *) NULL ;
   61740          52 :   int bToFree1 = 0 ;
   61741          52 :   void *argp2 = 0 ;
   61742          52 :   int res2 = 0 ;
   61743          52 :   void *argp3 = 0 ;
   61744          52 :   int res3 = 0 ;
   61745          52 :   PyObject *swig_obj[5] ;
   61746          52 :   GDALDatasetShadow *result = 0 ;
   61747             :   
   61748             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61749          52 :   PyProgressData *psProgressInfo;
   61750          52 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61751          52 :   psProgressInfo->nLastReported = -1;
   61752          52 :   psProgressInfo->psPyCallback = NULL;
   61753          52 :   psProgressInfo->psPyCallbackData = NULL;
   61754          52 :   arg5 = psProgressInfo;
   61755          52 :   if (!SWIG_Python_UnpackTuple(args, "GridInternal", 3, 5, swig_obj)) SWIG_fail;
   61756          52 :   {
   61757             :     /* %typemap(in) (const char *utf8_path) */
   61758          52 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61759             :     {
   61760          52 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61761             :     }
   61762             :     else
   61763             :     {
   61764           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61765             :       
   61766             :     }
   61767          52 :     if (arg1 == NULL)
   61768             :     {
   61769           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61770           0 :       SWIG_fail;
   61771             :     }
   61772             :   }
   61773          52 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61774          52 :   if (!SWIG_IsOK(res2)) {
   61775           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61776             :   }
   61777          52 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61778          52 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALGridOptions, 0 |  0 );
   61779          52 :   if (!SWIG_IsOK(res3)) {
   61780           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridInternal" "', argument " "3"" of type '" "GDALGridOptions *""'"); 
   61781             :   }
   61782          52 :   arg3 = reinterpret_cast< GDALGridOptions * >(argp3);
   61783          52 :   if (swig_obj[3]) {
   61784          52 :     {
   61785             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61786             :       /* callback_func typemap */
   61787             :       
   61788             :       /* In some cases 0 is passed instead of None. */
   61789             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61790          52 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61791             :       {
   61792           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61793             :         {
   61794           0 :           swig_obj[3] = Py_None;
   61795             :         }
   61796             :       }
   61797             :       
   61798          52 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61799           0 :         void* cbfunction = NULL;
   61800           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61801             :             (void**)&cbfunction,
   61802             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61803             :             SWIG_POINTER_EXCEPTION | 0 ));
   61804             :         
   61805           0 :         if ( cbfunction == GDALTermProgress ) {
   61806             :           arg4 = GDALTermProgress;
   61807             :         } else {
   61808           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61809           0 :             PyErr_SetString( PyExc_RuntimeError,
   61810             :               "Object given is not a Python function" );
   61811           0 :             SWIG_fail;
   61812             :           }
   61813           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61814           0 :           arg4 = PyProgressProxy;
   61815             :         }
   61816             :         
   61817             :       }
   61818             :       
   61819             :     }
   61820             :   }
   61821          52 :   if (swig_obj[4]) {
   61822          52 :     {
   61823             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61824          52 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61825             :     }
   61826             :   }
   61827          52 :   {
   61828          52 :     if (!arg1) {
   61829          52 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61830             :     }
   61831             :   }
   61832          52 :   {
   61833          52 :     if (!arg2) {
   61834           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61835             :     }
   61836             :   }
   61837          52 :   {
   61838          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61839          52 :     if ( bLocalUseExceptions ) {
   61840          51 :       pushErrorHandler();
   61841             :     }
   61842          52 :     {
   61843          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61844          52 :       result = (GDALDatasetShadow *)wrapper_GDALGrid((char const *)arg1,arg2,arg3,arg4,arg5);
   61845          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61846             :     }
   61847          52 :     if ( bLocalUseExceptions ) {
   61848          51 :       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          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61860          52 :   {
   61861             :     /* %typemap(freearg) (const char *utf8_path) */
   61862          52 :     GDALPythonFreeCStr(arg1, bToFree1);
   61863             :   }
   61864          52 :   {
   61865             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61866             :     
   61867          52 :     CPLFree(psProgressInfo);
   61868             :     
   61869             :   }
   61870          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; } }
   61871             :   return resultobj;
   61872           0 : fail:
   61873           0 :   {
   61874             :     /* %typemap(freearg) (const char *utf8_path) */
   61875           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61876             :   }
   61877           0 :   {
   61878             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61879             :     
   61880           0 :     CPLFree(psProgressInfo);
   61881             :     
   61882             :   }
   61883             :   return NULL;
   61884             : }
   61885             : 
   61886             : 
   61887          12 : SWIGINTERN PyObject *_wrap_new_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61888          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61889          12 :   char **arg1 = (char **) 0 ;
   61890          12 :   PyObject *swig_obj[1] ;
   61891          12 :   GDALContourOptions *result = 0 ;
   61892             :   
   61893          12 :   if (!args) SWIG_fail;
   61894          12 :   swig_obj[0] = args;
   61895          12 :   {
   61896             :     /* %typemap(in) char **dict */
   61897          12 :     arg1 = NULL;
   61898          12 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61899          12 :       int bErr = FALSE;
   61900          12 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61901          12 :       if ( bErr )
   61902             :       {
   61903           0 :         SWIG_fail;
   61904             :       }
   61905             :     }
   61906           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61907           0 :       int bErr = FALSE;
   61908           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61909           0 :       if ( bErr )
   61910             :       {
   61911           0 :         SWIG_fail;
   61912             :       }
   61913             :     }
   61914             :     else {
   61915           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61916           0 :       SWIG_fail;
   61917             :     }
   61918             :   }
   61919          12 :   {
   61920          12 :     const int bLocalUseExceptions = GetUseExceptions();
   61921          12 :     if ( bLocalUseExceptions ) {
   61922          12 :       pushErrorHandler();
   61923             :     }
   61924          12 :     {
   61925          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61926          12 :       result = (GDALContourOptions *)new_GDALContourOptions(arg1);
   61927          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61928             :     }
   61929          12 :     if ( bLocalUseExceptions ) {
   61930          12 :       popErrorHandler();
   61931             :     }
   61932             : #ifndef SED_HACKS
   61933             :     if ( bLocalUseExceptions ) {
   61934             :       CPLErr eclass = CPLGetLastErrorType();
   61935             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61936             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61937             :       }
   61938             :     }
   61939             : #endif
   61940             :   }
   61941          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_NEW |  0 );
   61942          12 :   {
   61943             :     /* %typemap(freearg) char **dict */
   61944          12 :     CSLDestroy( arg1 );
   61945             :   }
   61946          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; } }
   61947             :   return resultobj;
   61948           0 : fail:
   61949           0 :   {
   61950             :     /* %typemap(freearg) char **dict */
   61951           0 :     CSLDestroy( arg1 );
   61952             :   }
   61953             :   return NULL;
   61954             : }
   61955             : 
   61956             : 
   61957          12 : SWIGINTERN PyObject *_wrap_delete_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61958          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61959          12 :   GDALContourOptions *arg1 = (GDALContourOptions *) 0 ;
   61960          12 :   void *argp1 = 0 ;
   61961          12 :   int res1 = 0 ;
   61962          12 :   PyObject *swig_obj[1] ;
   61963             :   
   61964          12 :   if (!args) SWIG_fail;
   61965          12 :   swig_obj[0] = args;
   61966          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_DISOWN |  0 );
   61967          12 :   if (!SWIG_IsOK(res1)) {
   61968           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALContourOptions" "', argument " "1"" of type '" "GDALContourOptions *""'"); 
   61969             :   }
   61970          12 :   arg1 = reinterpret_cast< GDALContourOptions * >(argp1);
   61971          12 :   {
   61972          12 :     const int bLocalUseExceptions = GetUseExceptions();
   61973          12 :     if ( bLocalUseExceptions ) {
   61974          12 :       pushErrorHandler();
   61975             :     }
   61976          12 :     {
   61977          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61978          12 :       delete_GDALContourOptions(arg1);
   61979          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61980             :     }
   61981          12 :     if ( bLocalUseExceptions ) {
   61982          12 :       popErrorHandler();
   61983             :     }
   61984             : #ifndef SED_HACKS
   61985             :     if ( bLocalUseExceptions ) {
   61986             :       CPLErr eclass = CPLGetLastErrorType();
   61987             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61988             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61989             :       }
   61990             :     }
   61991             : #endif
   61992             :   }
   61993          12 :   resultobj = SWIG_Py_Void();
   61994          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; } }
   61995             :   return resultobj;
   61996             : fail:
   61997             :   return NULL;
   61998             : }
   61999             : 
   62000             : 
   62001         277 : SWIGINTERN PyObject *GDALContourOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62002         277 :   PyObject *obj;
   62003         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62004         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALContourOptions, SWIG_NewClientData(obj));
   62005         277 :   return SWIG_Py_Void();
   62006             : }
   62007             : 
   62008          12 : SWIGINTERN PyObject *GDALContourOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62009          12 :   return SWIG_Python_InitShadowInstance(args);
   62010             : }
   62011             : 
   62012           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62013           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62014           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   62015           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62016           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   62017           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62018           6 :   void *arg5 = (void *) NULL ;
   62019           6 :   void *argp1 = 0 ;
   62020           6 :   int res1 = 0 ;
   62021           6 :   void *argp2 = 0 ;
   62022           6 :   int res2 = 0 ;
   62023           6 :   void *argp3 = 0 ;
   62024           6 :   int res3 = 0 ;
   62025           6 :   PyObject *swig_obj[5] ;
   62026           6 :   int result;
   62027             :   
   62028             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62029           6 :   PyProgressData *psProgressInfo;
   62030           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62031           6 :   psProgressInfo->nLastReported = -1;
   62032           6 :   psProgressInfo->psPyCallback = NULL;
   62033           6 :   psProgressInfo->psPyCallbackData = NULL;
   62034           6 :   arg5 = psProgressInfo;
   62035           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestDS", 3, 5, swig_obj)) SWIG_fail;
   62036           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62037           6 :   if (!SWIG_IsOK(res1)) {
   62038           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALContourDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   62039             :   }
   62040           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   62041           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62042           6 :   if (!SWIG_IsOK(res2)) {
   62043           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62044             :   }
   62045           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62046           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   62047           6 :   if (!SWIG_IsOK(res3)) {
   62048           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestDS" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   62049             :   }
   62050           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   62051           6 :   if (swig_obj[3]) {
   62052           6 :     {
   62053             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62054             :       /* callback_func typemap */
   62055             :       
   62056             :       /* In some cases 0 is passed instead of None. */
   62057             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62058           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62059             :       {
   62060           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62061             :         {
   62062           0 :           swig_obj[3] = Py_None;
   62063             :         }
   62064             :       }
   62065             :       
   62066           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62067           0 :         void* cbfunction = NULL;
   62068           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62069             :             (void**)&cbfunction,
   62070             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62071             :             SWIG_POINTER_EXCEPTION | 0 ));
   62072             :         
   62073           0 :         if ( cbfunction == GDALTermProgress ) {
   62074             :           arg4 = GDALTermProgress;
   62075             :         } else {
   62076           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62077           0 :             PyErr_SetString( PyExc_RuntimeError,
   62078             :               "Object given is not a Python function" );
   62079           0 :             SWIG_fail;
   62080             :           }
   62081           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62082           0 :           arg4 = PyProgressProxy;
   62083             :         }
   62084             :         
   62085             :       }
   62086             :       
   62087             :     }
   62088             :   }
   62089           6 :   if (swig_obj[4]) {
   62090           6 :     {
   62091             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62092           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62093             :     }
   62094             :   }
   62095           6 :   {
   62096           6 :     const int bLocalUseExceptions = GetUseExceptions();
   62097           6 :     if ( bLocalUseExceptions ) {
   62098           6 :       pushErrorHandler();
   62099             :     }
   62100           6 :     {
   62101           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62102           6 :       result = (int)wrapper_GDALContourDestDS(arg1,arg2,arg3,arg4,arg5);
   62103           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62104             :     }
   62105           6 :     if ( bLocalUseExceptions ) {
   62106           6 :       popErrorHandler();
   62107             :     }
   62108             : #ifndef SED_HACKS
   62109             :     if ( bLocalUseExceptions ) {
   62110             :       CPLErr eclass = CPLGetLastErrorType();
   62111             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62112             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62113             :       }
   62114             :     }
   62115             : #endif
   62116             :   }
   62117           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   62118           6 :   {
   62119             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62120             :     
   62121           6 :     CPLFree(psProgressInfo);
   62122             :     
   62123             :   }
   62124           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; } }
   62125             :   return resultobj;
   62126           0 : fail:
   62127           0 :   {
   62128             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62129             :     
   62130           0 :     CPLFree(psProgressInfo);
   62131             :     
   62132             :   }
   62133             :   return NULL;
   62134             : }
   62135             : 
   62136             : 
   62137           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62138           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62139           6 :   char *arg1 = (char *) 0 ;
   62140           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62141           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   62142           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62143           6 :   void *arg5 = (void *) NULL ;
   62144           6 :   int bToFree1 = 0 ;
   62145           6 :   void *argp2 = 0 ;
   62146           6 :   int res2 = 0 ;
   62147           6 :   void *argp3 = 0 ;
   62148           6 :   int res3 = 0 ;
   62149           6 :   PyObject *swig_obj[5] ;
   62150           6 :   GDALDatasetShadow *result = 0 ;
   62151             :   
   62152             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62153           6 :   PyProgressData *psProgressInfo;
   62154           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62155           6 :   psProgressInfo->nLastReported = -1;
   62156           6 :   psProgressInfo->psPyCallback = NULL;
   62157           6 :   psProgressInfo->psPyCallbackData = NULL;
   62158           6 :   arg5 = psProgressInfo;
   62159           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestName", 3, 5, swig_obj)) SWIG_fail;
   62160           6 :   {
   62161             :     /* %typemap(in) (const char *utf8_path) */
   62162           6 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62163             :     {
   62164           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62165             :     }
   62166             :     else
   62167             :     {
   62168           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62169             :       
   62170             :     }
   62171           6 :     if (arg1 == NULL)
   62172             :     {
   62173           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62174           0 :       SWIG_fail;
   62175             :     }
   62176             :   }
   62177           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62178           6 :   if (!SWIG_IsOK(res2)) {
   62179           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62180             :   }
   62181           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62182           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   62183           6 :   if (!SWIG_IsOK(res3)) {
   62184           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestName" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   62185             :   }
   62186           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   62187           6 :   if (swig_obj[3]) {
   62188           6 :     {
   62189             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62190             :       /* callback_func typemap */
   62191             :       
   62192             :       /* In some cases 0 is passed instead of None. */
   62193             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62194           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62195             :       {
   62196           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62197             :         {
   62198           0 :           swig_obj[3] = Py_None;
   62199             :         }
   62200             :       }
   62201             :       
   62202           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62203           0 :         void* cbfunction = NULL;
   62204           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62205             :             (void**)&cbfunction,
   62206             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62207             :             SWIG_POINTER_EXCEPTION | 0 ));
   62208             :         
   62209           0 :         if ( cbfunction == GDALTermProgress ) {
   62210             :           arg4 = GDALTermProgress;
   62211             :         } else {
   62212           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62213           0 :             PyErr_SetString( PyExc_RuntimeError,
   62214             :               "Object given is not a Python function" );
   62215           0 :             SWIG_fail;
   62216             :           }
   62217           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62218           0 :           arg4 = PyProgressProxy;
   62219             :         }
   62220             :         
   62221             :       }
   62222             :       
   62223             :     }
   62224             :   }
   62225           6 :   if (swig_obj[4]) {
   62226           6 :     {
   62227             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62228           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62229             :     }
   62230             :   }
   62231           6 :   {
   62232           6 :     if (!arg1) {
   62233           6 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62234             :     }
   62235             :   }
   62236           6 :   {
   62237           6 :     const int bLocalUseExceptions = GetUseExceptions();
   62238           6 :     if ( bLocalUseExceptions ) {
   62239           6 :       pushErrorHandler();
   62240             :     }
   62241           6 :     {
   62242           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62243           6 :       result = (GDALDatasetShadow *)wrapper_GDALContourDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   62244           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62245             :     }
   62246           6 :     if ( bLocalUseExceptions ) {
   62247           6 :       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           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62259           6 :   {
   62260             :     /* %typemap(freearg) (const char *utf8_path) */
   62261           6 :     GDALPythonFreeCStr(arg1, bToFree1);
   62262             :   }
   62263           6 :   {
   62264             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62265             :     
   62266           6 :     CPLFree(psProgressInfo);
   62267             :     
   62268             :   }
   62269           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; } }
   62270             :   return resultobj;
   62271           0 : fail:
   62272           0 :   {
   62273             :     /* %typemap(freearg) (const char *utf8_path) */
   62274           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62275             :   }
   62276           0 :   {
   62277             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62278             :     
   62279           0 :     CPLFree(psProgressInfo);
   62280             :     
   62281             :   }
   62282             :   return NULL;
   62283             : }
   62284             : 
   62285             : 
   62286          23 : SWIGINTERN PyObject *_wrap_new_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62287          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62288          23 :   char **arg1 = (char **) 0 ;
   62289          23 :   PyObject *swig_obj[1] ;
   62290          23 :   GDALRasterizeOptions *result = 0 ;
   62291             :   
   62292          23 :   if (!args) SWIG_fail;
   62293          23 :   swig_obj[0] = args;
   62294          23 :   {
   62295             :     /* %typemap(in) char **dict */
   62296          23 :     arg1 = NULL;
   62297          23 :     if ( PySequence_Check( swig_obj[0] ) ) {
   62298          23 :       int bErr = FALSE;
   62299          23 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   62300          23 :       if ( bErr )
   62301             :       {
   62302           0 :         SWIG_fail;
   62303             :       }
   62304             :     }
   62305           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   62306           0 :       int bErr = FALSE;
   62307           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   62308           0 :       if ( bErr )
   62309             :       {
   62310           0 :         SWIG_fail;
   62311             :       }
   62312             :     }
   62313             :     else {
   62314           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62315           0 :       SWIG_fail;
   62316             :     }
   62317             :   }
   62318          23 :   {
   62319          23 :     const int bLocalUseExceptions = GetUseExceptions();
   62320          23 :     if ( bLocalUseExceptions ) {
   62321          23 :       pushErrorHandler();
   62322             :     }
   62323          23 :     {
   62324          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62325          23 :       result = (GDALRasterizeOptions *)new_GDALRasterizeOptions(arg1);
   62326          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62327             :     }
   62328          23 :     if ( bLocalUseExceptions ) {
   62329          23 :       popErrorHandler();
   62330             :     }
   62331             : #ifndef SED_HACKS
   62332             :     if ( bLocalUseExceptions ) {
   62333             :       CPLErr eclass = CPLGetLastErrorType();
   62334             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62335             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62336             :       }
   62337             :     }
   62338             : #endif
   62339             :   }
   62340          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_NEW |  0 );
   62341          23 :   {
   62342             :     /* %typemap(freearg) char **dict */
   62343          23 :     CSLDestroy( arg1 );
   62344             :   }
   62345          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; } }
   62346             :   return resultobj;
   62347           0 : fail:
   62348           0 :   {
   62349             :     /* %typemap(freearg) char **dict */
   62350           0 :     CSLDestroy( arg1 );
   62351             :   }
   62352             :   return NULL;
   62353             : }
   62354             : 
   62355             : 
   62356          23 : SWIGINTERN PyObject *_wrap_delete_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62357          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62358          23 :   GDALRasterizeOptions *arg1 = (GDALRasterizeOptions *) 0 ;
   62359          23 :   void *argp1 = 0 ;
   62360          23 :   int res1 = 0 ;
   62361          23 :   PyObject *swig_obj[1] ;
   62362             :   
   62363          23 :   if (!args) SWIG_fail;
   62364          23 :   swig_obj[0] = args;
   62365          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_DISOWN |  0 );
   62366          23 :   if (!SWIG_IsOK(res1)) {
   62367           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALRasterizeOptions" "', argument " "1"" of type '" "GDALRasterizeOptions *""'"); 
   62368             :   }
   62369          23 :   arg1 = reinterpret_cast< GDALRasterizeOptions * >(argp1);
   62370          23 :   {
   62371          23 :     const int bLocalUseExceptions = GetUseExceptions();
   62372          23 :     if ( bLocalUseExceptions ) {
   62373          23 :       pushErrorHandler();
   62374             :     }
   62375          23 :     {
   62376          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62377          23 :       delete_GDALRasterizeOptions(arg1);
   62378          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62379             :     }
   62380          23 :     if ( bLocalUseExceptions ) {
   62381          23 :       popErrorHandler();
   62382             :     }
   62383             : #ifndef SED_HACKS
   62384             :     if ( bLocalUseExceptions ) {
   62385             :       CPLErr eclass = CPLGetLastErrorType();
   62386             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62387             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62388             :       }
   62389             :     }
   62390             : #endif
   62391             :   }
   62392          23 :   resultobj = SWIG_Py_Void();
   62393          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; } }
   62394             :   return resultobj;
   62395             : fail:
   62396             :   return NULL;
   62397             : }
   62398             : 
   62399             : 
   62400         277 : SWIGINTERN PyObject *GDALRasterizeOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62401         277 :   PyObject *obj;
   62402         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62403         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterizeOptions, SWIG_NewClientData(obj));
   62404         277 :   return SWIG_Py_Void();
   62405             : }
   62406             : 
   62407          23 : SWIGINTERN PyObject *GDALRasterizeOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62408          23 :   return SWIG_Python_InitShadowInstance(args);
   62409             : }
   62410             : 
   62411          13 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62412          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62413          13 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   62414          13 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62415          13 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   62416          13 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62417          13 :   void *arg5 = (void *) NULL ;
   62418          13 :   void *argp1 = 0 ;
   62419          13 :   int res1 = 0 ;
   62420          13 :   void *argp2 = 0 ;
   62421          13 :   int res2 = 0 ;
   62422          13 :   void *argp3 = 0 ;
   62423          13 :   int res3 = 0 ;
   62424          13 :   PyObject *swig_obj[5] ;
   62425          13 :   int result;
   62426             :   
   62427             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62428          13 :   PyProgressData *psProgressInfo;
   62429          13 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62430          13 :   psProgressInfo->nLastReported = -1;
   62431          13 :   psProgressInfo->psPyCallback = NULL;
   62432          13 :   psProgressInfo->psPyCallbackData = NULL;
   62433          13 :   arg5 = psProgressInfo;
   62434          13 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestDS", 3, 5, swig_obj)) SWIG_fail;
   62435          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62436          13 :   if (!SWIG_IsOK(res1)) {
   62437           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   62438             :   }
   62439          13 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   62440          13 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62441          13 :   if (!SWIG_IsOK(res2)) {
   62442           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62443             :   }
   62444          13 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62445          13 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   62446          13 :   if (!SWIG_IsOK(res3)) {
   62447           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   62448             :   }
   62449          13 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   62450          13 :   if (swig_obj[3]) {
   62451          13 :     {
   62452             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62453             :       /* callback_func typemap */
   62454             :       
   62455             :       /* In some cases 0 is passed instead of None. */
   62456             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62457          13 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62458             :       {
   62459           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62460             :         {
   62461           0 :           swig_obj[3] = Py_None;
   62462             :         }
   62463             :       }
   62464             :       
   62465          13 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62466           0 :         void* cbfunction = NULL;
   62467           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62468             :             (void**)&cbfunction,
   62469             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62470             :             SWIG_POINTER_EXCEPTION | 0 ));
   62471             :         
   62472           0 :         if ( cbfunction == GDALTermProgress ) {
   62473             :           arg4 = GDALTermProgress;
   62474             :         } else {
   62475           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62476           0 :             PyErr_SetString( PyExc_RuntimeError,
   62477             :               "Object given is not a Python function" );
   62478           0 :             SWIG_fail;
   62479             :           }
   62480           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62481           0 :           arg4 = PyProgressProxy;
   62482             :         }
   62483             :         
   62484             :       }
   62485             :       
   62486             :     }
   62487             :   }
   62488          13 :   if (swig_obj[4]) {
   62489          13 :     {
   62490             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62491          13 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62492             :     }
   62493             :   }
   62494          13 :   {
   62495          13 :     const int bLocalUseExceptions = GetUseExceptions();
   62496          13 :     if ( bLocalUseExceptions ) {
   62497          13 :       pushErrorHandler();
   62498             :     }
   62499          13 :     {
   62500          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62501          13 :       result = (int)wrapper_GDALRasterizeDestDS(arg1,arg2,arg3,arg4,arg5);
   62502          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62503             :     }
   62504          13 :     if ( bLocalUseExceptions ) {
   62505          13 :       popErrorHandler();
   62506             :     }
   62507             : #ifndef SED_HACKS
   62508             :     if ( bLocalUseExceptions ) {
   62509             :       CPLErr eclass = CPLGetLastErrorType();
   62510             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62511             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62512             :       }
   62513             :     }
   62514             : #endif
   62515             :   }
   62516          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   62517          13 :   {
   62518             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62519             :     
   62520          13 :     CPLFree(psProgressInfo);
   62521             :     
   62522             :   }
   62523          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; } }
   62524             :   return resultobj;
   62525           0 : fail:
   62526           0 :   {
   62527             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62528             :     
   62529           0 :     CPLFree(psProgressInfo);
   62530             :     
   62531             :   }
   62532             :   return NULL;
   62533             : }
   62534             : 
   62535             : 
   62536          10 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62537          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62538          10 :   char *arg1 = (char *) 0 ;
   62539          10 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62540          10 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   62541          10 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62542          10 :   void *arg5 = (void *) NULL ;
   62543          10 :   int bToFree1 = 0 ;
   62544          10 :   void *argp2 = 0 ;
   62545          10 :   int res2 = 0 ;
   62546          10 :   void *argp3 = 0 ;
   62547          10 :   int res3 = 0 ;
   62548          10 :   PyObject *swig_obj[5] ;
   62549          10 :   GDALDatasetShadow *result = 0 ;
   62550             :   
   62551             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62552          10 :   PyProgressData *psProgressInfo;
   62553          10 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62554          10 :   psProgressInfo->nLastReported = -1;
   62555          10 :   psProgressInfo->psPyCallback = NULL;
   62556          10 :   psProgressInfo->psPyCallbackData = NULL;
   62557          10 :   arg5 = psProgressInfo;
   62558          10 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestName", 3, 5, swig_obj)) SWIG_fail;
   62559          10 :   {
   62560             :     /* %typemap(in) (const char *utf8_path) */
   62561          10 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62562             :     {
   62563           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62564             :     }
   62565             :     else
   62566             :     {
   62567           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62568             :       
   62569             :     }
   62570          10 :     if (arg1 == NULL)
   62571             :     {
   62572           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62573           0 :       SWIG_fail;
   62574             :     }
   62575             :   }
   62576          10 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62577          10 :   if (!SWIG_IsOK(res2)) {
   62578           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62579             :   }
   62580          10 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62581          10 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   62582          10 :   if (!SWIG_IsOK(res3)) {
   62583           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   62584             :   }
   62585          10 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   62586          10 :   if (swig_obj[3]) {
   62587          10 :     {
   62588             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62589             :       /* callback_func typemap */
   62590             :       
   62591             :       /* In some cases 0 is passed instead of None. */
   62592             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62593          10 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62594             :       {
   62595           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62596             :         {
   62597           0 :           swig_obj[3] = Py_None;
   62598             :         }
   62599             :       }
   62600             :       
   62601          10 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62602           0 :         void* cbfunction = NULL;
   62603           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62604             :             (void**)&cbfunction,
   62605             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62606             :             SWIG_POINTER_EXCEPTION | 0 ));
   62607             :         
   62608           0 :         if ( cbfunction == GDALTermProgress ) {
   62609             :           arg4 = GDALTermProgress;
   62610             :         } else {
   62611           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62612           0 :             PyErr_SetString( PyExc_RuntimeError,
   62613             :               "Object given is not a Python function" );
   62614           0 :             SWIG_fail;
   62615             :           }
   62616           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62617           0 :           arg4 = PyProgressProxy;
   62618             :         }
   62619             :         
   62620             :       }
   62621             :       
   62622             :     }
   62623             :   }
   62624          10 :   if (swig_obj[4]) {
   62625          10 :     {
   62626             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62627          10 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62628             :     }
   62629             :   }
   62630          10 :   {
   62631          10 :     if (!arg1) {
   62632          10 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62633             :     }
   62634             :   }
   62635          10 :   {
   62636          10 :     const int bLocalUseExceptions = GetUseExceptions();
   62637          10 :     if ( bLocalUseExceptions ) {
   62638          10 :       pushErrorHandler();
   62639             :     }
   62640          10 :     {
   62641          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62642          10 :       result = (GDALDatasetShadow *)wrapper_GDALRasterizeDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   62643          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62644             :     }
   62645          10 :     if ( bLocalUseExceptions ) {
   62646          10 :       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          10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62658          10 :   {
   62659             :     /* %typemap(freearg) (const char *utf8_path) */
   62660          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   62661             :   }
   62662          10 :   {
   62663             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62664             :     
   62665          10 :     CPLFree(psProgressInfo);
   62666             :     
   62667             :   }
   62668          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; } }
   62669             :   return resultobj;
   62670           0 : fail:
   62671           0 :   {
   62672             :     /* %typemap(freearg) (const char *utf8_path) */
   62673           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62674             :   }
   62675           0 :   {
   62676             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62677             :     
   62678           0 :     CPLFree(psProgressInfo);
   62679             :     
   62680             :   }
   62681             :   return NULL;
   62682             : }
   62683             : 
   62684             : 
   62685          39 : SWIGINTERN PyObject *_wrap_new_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62686          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62687          39 :   char **arg1 = (char **) 0 ;
   62688          39 :   PyObject *swig_obj[1] ;
   62689          39 :   GDALFootprintOptions *result = 0 ;
   62690             :   
   62691          39 :   if (!args) SWIG_fail;
   62692          39 :   swig_obj[0] = args;
   62693          39 :   {
   62694             :     /* %typemap(in) char **dict */
   62695          39 :     arg1 = NULL;
   62696          39 :     if ( PySequence_Check( swig_obj[0] ) ) {
   62697          39 :       int bErr = FALSE;
   62698          39 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   62699          39 :       if ( bErr )
   62700             :       {
   62701           0 :         SWIG_fail;
   62702             :       }
   62703             :     }
   62704           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   62705           0 :       int bErr = FALSE;
   62706           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   62707           0 :       if ( bErr )
   62708             :       {
   62709           0 :         SWIG_fail;
   62710             :       }
   62711             :     }
   62712             :     else {
   62713           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62714           0 :       SWIG_fail;
   62715             :     }
   62716             :   }
   62717          39 :   {
   62718          39 :     const int bLocalUseExceptions = GetUseExceptions();
   62719          39 :     if ( bLocalUseExceptions ) {
   62720          39 :       pushErrorHandler();
   62721             :     }
   62722          39 :     {
   62723          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62724          39 :       result = (GDALFootprintOptions *)new_GDALFootprintOptions(arg1);
   62725          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62726             :     }
   62727          39 :     if ( bLocalUseExceptions ) {
   62728          39 :       popErrorHandler();
   62729             :     }
   62730             : #ifndef SED_HACKS
   62731             :     if ( bLocalUseExceptions ) {
   62732             :       CPLErr eclass = CPLGetLastErrorType();
   62733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62735             :       }
   62736             :     }
   62737             : #endif
   62738             :   }
   62739          39 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_NEW |  0 );
   62740          39 :   {
   62741             :     /* %typemap(freearg) char **dict */
   62742          39 :     CSLDestroy( arg1 );
   62743             :   }
   62744          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; } }
   62745             :   return resultobj;
   62746           0 : fail:
   62747           0 :   {
   62748             :     /* %typemap(freearg) char **dict */
   62749           0 :     CSLDestroy( arg1 );
   62750             :   }
   62751             :   return NULL;
   62752             : }
   62753             : 
   62754             : 
   62755          37 : SWIGINTERN PyObject *_wrap_delete_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62756          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62757          37 :   GDALFootprintOptions *arg1 = (GDALFootprintOptions *) 0 ;
   62758          37 :   void *argp1 = 0 ;
   62759          37 :   int res1 = 0 ;
   62760          37 :   PyObject *swig_obj[1] ;
   62761             :   
   62762          37 :   if (!args) SWIG_fail;
   62763          37 :   swig_obj[0] = args;
   62764          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_DISOWN |  0 );
   62765          37 :   if (!SWIG_IsOK(res1)) {
   62766           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALFootprintOptions" "', argument " "1"" of type '" "GDALFootprintOptions *""'"); 
   62767             :   }
   62768          37 :   arg1 = reinterpret_cast< GDALFootprintOptions * >(argp1);
   62769          37 :   {
   62770          37 :     const int bLocalUseExceptions = GetUseExceptions();
   62771          37 :     if ( bLocalUseExceptions ) {
   62772          37 :       pushErrorHandler();
   62773             :     }
   62774          37 :     {
   62775          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62776          37 :       delete_GDALFootprintOptions(arg1);
   62777          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62778             :     }
   62779          37 :     if ( bLocalUseExceptions ) {
   62780          37 :       popErrorHandler();
   62781             :     }
   62782             : #ifndef SED_HACKS
   62783             :     if ( bLocalUseExceptions ) {
   62784             :       CPLErr eclass = CPLGetLastErrorType();
   62785             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62786             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62787             :       }
   62788             :     }
   62789             : #endif
   62790             :   }
   62791          37 :   resultobj = SWIG_Py_Void();
   62792          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; } }
   62793             :   return resultobj;
   62794             : fail:
   62795             :   return NULL;
   62796             : }
   62797             : 
   62798             : 
   62799         277 : SWIGINTERN PyObject *GDALFootprintOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62800         277 :   PyObject *obj;
   62801         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62802         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALFootprintOptions, SWIG_NewClientData(obj));
   62803         277 :   return SWIG_Py_Void();
   62804             : }
   62805             : 
   62806          37 : SWIGINTERN PyObject *GDALFootprintOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62807          37 :   return SWIG_Python_InitShadowInstance(args);
   62808             : }
   62809             : 
   62810           3 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62811           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62812           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   62813           3 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62814           3 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   62815           3 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62816           3 :   void *arg5 = (void *) NULL ;
   62817           3 :   void *argp1 = 0 ;
   62818           3 :   int res1 = 0 ;
   62819           3 :   void *argp2 = 0 ;
   62820           3 :   int res2 = 0 ;
   62821           3 :   void *argp3 = 0 ;
   62822           3 :   int res3 = 0 ;
   62823           3 :   PyObject *swig_obj[5] ;
   62824           3 :   int result;
   62825             :   
   62826             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62827           3 :   PyProgressData *psProgressInfo;
   62828           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62829           3 :   psProgressInfo->nLastReported = -1;
   62830           3 :   psProgressInfo->psPyCallback = NULL;
   62831           3 :   psProgressInfo->psPyCallbackData = NULL;
   62832           3 :   arg5 = psProgressInfo;
   62833           3 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestDS", 3, 5, swig_obj)) SWIG_fail;
   62834           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62835           3 :   if (!SWIG_IsOK(res1)) {
   62836           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   62837             :   }
   62838           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   62839           3 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62840           3 :   if (!SWIG_IsOK(res2)) {
   62841           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62842             :   }
   62843           3 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62844           3 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   62845           3 :   if (!SWIG_IsOK(res3)) {
   62846           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   62847             :   }
   62848           3 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   62849           3 :   if (swig_obj[3]) {
   62850           3 :     {
   62851             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62852             :       /* callback_func typemap */
   62853             :       
   62854             :       /* In some cases 0 is passed instead of None. */
   62855             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62856           3 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62857             :       {
   62858           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62859             :         {
   62860           0 :           swig_obj[3] = Py_None;
   62861             :         }
   62862             :       }
   62863             :       
   62864           3 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62865           0 :         void* cbfunction = NULL;
   62866           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62867             :             (void**)&cbfunction,
   62868             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62869             :             SWIG_POINTER_EXCEPTION | 0 ));
   62870             :         
   62871           0 :         if ( cbfunction == GDALTermProgress ) {
   62872             :           arg4 = GDALTermProgress;
   62873             :         } else {
   62874           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62875           0 :             PyErr_SetString( PyExc_RuntimeError,
   62876             :               "Object given is not a Python function" );
   62877           0 :             SWIG_fail;
   62878             :           }
   62879           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62880           0 :           arg4 = PyProgressProxy;
   62881             :         }
   62882             :         
   62883             :       }
   62884             :       
   62885             :     }
   62886             :   }
   62887           3 :   if (swig_obj[4]) {
   62888           3 :     {
   62889             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62890           3 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62891             :     }
   62892             :   }
   62893           3 :   {
   62894           3 :     const int bLocalUseExceptions = GetUseExceptions();
   62895           3 :     if ( bLocalUseExceptions ) {
   62896           3 :       pushErrorHandler();
   62897             :     }
   62898           3 :     {
   62899           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62900           3 :       result = (int)wrapper_GDALFootprintDestDS(arg1,arg2,arg3,arg4,arg5);
   62901           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62902             :     }
   62903           3 :     if ( bLocalUseExceptions ) {
   62904           3 :       popErrorHandler();
   62905             :     }
   62906             : #ifndef SED_HACKS
   62907             :     if ( bLocalUseExceptions ) {
   62908             :       CPLErr eclass = CPLGetLastErrorType();
   62909             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62910             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62911             :       }
   62912             :     }
   62913             : #endif
   62914             :   }
   62915           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   62916           3 :   {
   62917             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62918             :     
   62919           3 :     CPLFree(psProgressInfo);
   62920             :     
   62921             :   }
   62922           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; } }
   62923             :   return resultobj;
   62924           0 : fail:
   62925           0 :   {
   62926             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62927             :     
   62928           0 :     CPLFree(psProgressInfo);
   62929             :     
   62930             :   }
   62931             :   return NULL;
   62932             : }
   62933             : 
   62934             : 
   62935          34 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62936          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62937          34 :   char *arg1 = (char *) 0 ;
   62938          34 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62939          34 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   62940          34 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62941          34 :   void *arg5 = (void *) NULL ;
   62942          34 :   int bToFree1 = 0 ;
   62943          34 :   void *argp2 = 0 ;
   62944          34 :   int res2 = 0 ;
   62945          34 :   void *argp3 = 0 ;
   62946          34 :   int res3 = 0 ;
   62947          34 :   PyObject *swig_obj[5] ;
   62948          34 :   GDALDatasetShadow *result = 0 ;
   62949             :   
   62950             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62951          34 :   PyProgressData *psProgressInfo;
   62952          34 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62953          34 :   psProgressInfo->nLastReported = -1;
   62954          34 :   psProgressInfo->psPyCallback = NULL;
   62955          34 :   psProgressInfo->psPyCallbackData = NULL;
   62956          34 :   arg5 = psProgressInfo;
   62957          34 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestName", 3, 5, swig_obj)) SWIG_fail;
   62958          34 :   {
   62959             :     /* %typemap(in) (const char *utf8_path) */
   62960          34 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62961             :     {
   62962          33 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62963             :     }
   62964             :     else
   62965             :     {
   62966           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62967             :       
   62968             :     }
   62969          34 :     if (arg1 == NULL)
   62970             :     {
   62971           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62972           0 :       SWIG_fail;
   62973             :     }
   62974             :   }
   62975          34 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62976          34 :   if (!SWIG_IsOK(res2)) {
   62977           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62978             :   }
   62979          34 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62980          34 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   62981          34 :   if (!SWIG_IsOK(res3)) {
   62982           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestName" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   62983             :   }
   62984          34 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   62985          34 :   if (swig_obj[3]) {
   62986          34 :     {
   62987             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62988             :       /* callback_func typemap */
   62989             :       
   62990             :       /* In some cases 0 is passed instead of None. */
   62991             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62992          34 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62993             :       {
   62994           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62995             :         {
   62996           0 :           swig_obj[3] = Py_None;
   62997             :         }
   62998             :       }
   62999             :       
   63000          34 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63001           0 :         void* cbfunction = NULL;
   63002           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63003             :             (void**)&cbfunction,
   63004             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63005             :             SWIG_POINTER_EXCEPTION | 0 ));
   63006             :         
   63007           0 :         if ( cbfunction == GDALTermProgress ) {
   63008             :           arg4 = GDALTermProgress;
   63009             :         } else {
   63010           0 :           if (!PyCallable_Check(swig_obj[3])) {
   63011           0 :             PyErr_SetString( PyExc_RuntimeError,
   63012             :               "Object given is not a Python function" );
   63013           0 :             SWIG_fail;
   63014             :           }
   63015           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   63016           0 :           arg4 = PyProgressProxy;
   63017             :         }
   63018             :         
   63019             :       }
   63020             :       
   63021             :     }
   63022             :   }
   63023          34 :   if (swig_obj[4]) {
   63024          34 :     {
   63025             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63026          34 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63027             :     }
   63028             :   }
   63029          34 :   {
   63030          34 :     if (!arg1) {
   63031          34 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63032             :     }
   63033             :   }
   63034          34 :   {
   63035          34 :     const int bLocalUseExceptions = GetUseExceptions();
   63036          34 :     if ( bLocalUseExceptions ) {
   63037          34 :       pushErrorHandler();
   63038             :     }
   63039          34 :     {
   63040          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63041          34 :       result = (GDALDatasetShadow *)wrapper_GDALFootprintDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   63042          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63043             :     }
   63044          34 :     if ( bLocalUseExceptions ) {
   63045          34 :       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          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63057          34 :   {
   63058             :     /* %typemap(freearg) (const char *utf8_path) */
   63059          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   63060             :   }
   63061          34 :   {
   63062             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63063             :     
   63064          34 :     CPLFree(psProgressInfo);
   63065             :     
   63066             :   }
   63067          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; } }
   63068             :   return resultobj;
   63069           0 : fail:
   63070           0 :   {
   63071             :     /* %typemap(freearg) (const char *utf8_path) */
   63072           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63073             :   }
   63074           0 :   {
   63075             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63076             :     
   63077           0 :     CPLFree(psProgressInfo);
   63078             :     
   63079             :   }
   63080             :   return NULL;
   63081             : }
   63082             : 
   63083             : 
   63084         172 : SWIGINTERN PyObject *_wrap_new_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63085         172 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63086         172 :   char **arg1 = (char **) 0 ;
   63087         172 :   PyObject *swig_obj[1] ;
   63088         172 :   GDALBuildVRTOptions *result = 0 ;
   63089             :   
   63090         172 :   if (!args) SWIG_fail;
   63091         172 :   swig_obj[0] = args;
   63092         172 :   {
   63093             :     /* %typemap(in) char **dict */
   63094         172 :     arg1 = NULL;
   63095         172 :     if ( PySequence_Check( swig_obj[0] ) ) {
   63096         172 :       int bErr = FALSE;
   63097         172 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   63098         172 :       if ( bErr )
   63099             :       {
   63100           0 :         SWIG_fail;
   63101             :       }
   63102             :     }
   63103           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   63104           0 :       int bErr = FALSE;
   63105           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   63106           0 :       if ( bErr )
   63107             :       {
   63108           0 :         SWIG_fail;
   63109             :       }
   63110             :     }
   63111             :     else {
   63112           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63113           0 :       SWIG_fail;
   63114             :     }
   63115             :   }
   63116         172 :   {
   63117         172 :     const int bLocalUseExceptions = GetUseExceptions();
   63118         172 :     if ( bLocalUseExceptions ) {
   63119         144 :       pushErrorHandler();
   63120             :     }
   63121         172 :     {
   63122         172 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63123         172 :       result = (GDALBuildVRTOptions *)new_GDALBuildVRTOptions(arg1);
   63124         172 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63125             :     }
   63126         172 :     if ( bLocalUseExceptions ) {
   63127         144 :       popErrorHandler();
   63128             :     }
   63129             : #ifndef SED_HACKS
   63130             :     if ( bLocalUseExceptions ) {
   63131             :       CPLErr eclass = CPLGetLastErrorType();
   63132             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63133             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63134             :       }
   63135             :     }
   63136             : #endif
   63137             :   }
   63138         172 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_NEW |  0 );
   63139         172 :   {
   63140             :     /* %typemap(freearg) char **dict */
   63141         172 :     CSLDestroy( arg1 );
   63142             :   }
   63143         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; } }
   63144             :   return resultobj;
   63145           0 : fail:
   63146           0 :   {
   63147             :     /* %typemap(freearg) char **dict */
   63148           0 :     CSLDestroy( arg1 );
   63149             :   }
   63150             :   return NULL;
   63151             : }
   63152             : 
   63153             : 
   63154         169 : SWIGINTERN PyObject *_wrap_delete_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63155         169 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63156         169 :   GDALBuildVRTOptions *arg1 = (GDALBuildVRTOptions *) 0 ;
   63157         169 :   void *argp1 = 0 ;
   63158         169 :   int res1 = 0 ;
   63159         169 :   PyObject *swig_obj[1] ;
   63160             :   
   63161         169 :   if (!args) SWIG_fail;
   63162         169 :   swig_obj[0] = args;
   63163         169 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_DISOWN |  0 );
   63164         169 :   if (!SWIG_IsOK(res1)) {
   63165           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALBuildVRTOptions" "', argument " "1"" of type '" "GDALBuildVRTOptions *""'"); 
   63166             :   }
   63167         169 :   arg1 = reinterpret_cast< GDALBuildVRTOptions * >(argp1);
   63168         169 :   {
   63169         169 :     const int bLocalUseExceptions = GetUseExceptions();
   63170         169 :     if ( bLocalUseExceptions ) {
   63171         141 :       pushErrorHandler();
   63172             :     }
   63173         169 :     {
   63174         169 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63175         169 :       delete_GDALBuildVRTOptions(arg1);
   63176         169 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63177             :     }
   63178         169 :     if ( bLocalUseExceptions ) {
   63179         141 :       popErrorHandler();
   63180             :     }
   63181             : #ifndef SED_HACKS
   63182             :     if ( bLocalUseExceptions ) {
   63183             :       CPLErr eclass = CPLGetLastErrorType();
   63184             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63185             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63186             :       }
   63187             :     }
   63188             : #endif
   63189             :   }
   63190         169 :   resultobj = SWIG_Py_Void();
   63191         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; } }
   63192             :   return resultobj;
   63193             : fail:
   63194             :   return NULL;
   63195             : }
   63196             : 
   63197             : 
   63198         277 : SWIGINTERN PyObject *GDALBuildVRTOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63199         277 :   PyObject *obj;
   63200         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63201         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALBuildVRTOptions, SWIG_NewClientData(obj));
   63202         277 :   return SWIG_Py_Void();
   63203             : }
   63204             : 
   63205         169 : SWIGINTERN PyObject *GDALBuildVRTOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63206         169 :   return SWIG_Python_InitShadowInstance(args);
   63207             : }
   63208             : 
   63209          69 : SWIGINTERN PyObject *_wrap_BuildVRTInternalObjects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63210          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63211          69 :   char *arg1 = (char *) 0 ;
   63212          69 :   int arg2 ;
   63213          69 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   63214          69 :   GDALBuildVRTOptions *arg4 = (GDALBuildVRTOptions *) 0 ;
   63215          69 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   63216          69 :   void *arg6 = (void *) NULL ;
   63217          69 :   int bToFree1 = 0 ;
   63218          69 :   void *argp4 = 0 ;
   63219          69 :   int res4 = 0 ;
   63220          69 :   PyObject *swig_obj[5] ;
   63221          69 :   GDALDatasetShadow *result = 0 ;
   63222             :   
   63223             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63224          69 :   PyProgressData *psProgressInfo;
   63225          69 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63226          69 :   psProgressInfo->nLastReported = -1;
   63227          69 :   psProgressInfo->psPyCallback = NULL;
   63228          69 :   psProgressInfo->psPyCallbackData = NULL;
   63229          69 :   arg6 = psProgressInfo;
   63230          69 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalObjects", 3, 5, swig_obj)) SWIG_fail;
   63231          69 :   {
   63232             :     /* %typemap(in) (const char *utf8_path) */
   63233          69 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63234             :     {
   63235          64 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63236             :     }
   63237             :     else
   63238             :     {
   63239           5 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63240             :       
   63241             :     }
   63242          69 :     if (arg1 == NULL)
   63243             :     {
   63244           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63245           0 :       SWIG_fail;
   63246             :     }
   63247             :   }
   63248          69 :   {
   63249             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   63250          69 :     if ( !PySequence_Check(swig_obj[1]) ) {
   63251           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   63252           0 :       SWIG_fail;
   63253             :     }
   63254          69 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   63255          69 :     if( size > (Py_ssize_t)INT_MAX ) {
   63256           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63257           0 :       SWIG_fail;
   63258             :     }
   63259          69 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   63260           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63261           0 :       SWIG_fail;
   63262             :     }
   63263          69 :     arg2 = (int)size;
   63264          69 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   63265          69 :     if( !arg3) {
   63266           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   63267           0 :       SWIG_fail;
   63268             :     }
   63269             :     
   63270        1173 :     for( int i = 0; i<arg2; i++ ) {
   63271        1104 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   63272        1104 :       GDALDatasetShadow* rawobjectpointer = NULL;
   63273        1104 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   63274        1104 :       if (!rawobjectpointer) {
   63275           0 :         Py_DECREF(o);
   63276           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   63277           0 :         SWIG_fail;
   63278             :       }
   63279        1104 :       arg3[i] = rawobjectpointer;
   63280        1104 :       Py_DECREF(o);
   63281             :       
   63282             :     }
   63283             :   }
   63284          69 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   63285          69 :   if (!SWIG_IsOK(res4)) {
   63286           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BuildVRTInternalObjects" "', argument " "4"" of type '" "GDALBuildVRTOptions *""'"); 
   63287             :   }
   63288          69 :   arg4 = reinterpret_cast< GDALBuildVRTOptions * >(argp4);
   63289          69 :   if (swig_obj[3]) {
   63290          69 :     {
   63291             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63292             :       /* callback_func typemap */
   63293             :       
   63294             :       /* In some cases 0 is passed instead of None. */
   63295             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63296          69 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63297             :       {
   63298           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63299             :         {
   63300           0 :           swig_obj[3] = Py_None;
   63301             :         }
   63302             :       }
   63303             :       
   63304          69 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63305           0 :         void* cbfunction = NULL;
   63306           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63307             :             (void**)&cbfunction,
   63308             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63309             :             SWIG_POINTER_EXCEPTION | 0 ));
   63310             :         
   63311           0 :         if ( cbfunction == GDALTermProgress ) {
   63312             :           arg5 = GDALTermProgress;
   63313             :         } else {
   63314           0 :           if (!PyCallable_Check(swig_obj[3])) {
   63315           0 :             PyErr_SetString( PyExc_RuntimeError,
   63316             :               "Object given is not a Python function" );
   63317           0 :             SWIG_fail;
   63318             :           }
   63319           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   63320           0 :           arg5 = PyProgressProxy;
   63321             :         }
   63322             :         
   63323             :       }
   63324             :       
   63325             :     }
   63326             :   }
   63327          69 :   if (swig_obj[4]) {
   63328          69 :     {
   63329             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63330          69 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63331             :     }
   63332             :   }
   63333          69 :   {
   63334          69 :     if (!arg1) {
   63335          69 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63336             :     }
   63337             :   }
   63338          69 :   {
   63339          69 :     const int bLocalUseExceptions = GetUseExceptions();
   63340          69 :     if ( bLocalUseExceptions ) {
   63341          56 :       pushErrorHandler();
   63342             :     }
   63343          69 :     {
   63344          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63345          69 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_objects((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   63346          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63347             :     }
   63348          69 :     if ( bLocalUseExceptions ) {
   63349          56 :       popErrorHandler();
   63350             :     }
   63351             : #ifndef SED_HACKS
   63352             :     if ( bLocalUseExceptions ) {
   63353             :       CPLErr eclass = CPLGetLastErrorType();
   63354             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63355             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63356             :       }
   63357             :     }
   63358             : #endif
   63359             :   }
   63360          69 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63361          69 :   {
   63362             :     /* %typemap(freearg) (const char *utf8_path) */
   63363          69 :     GDALPythonFreeCStr(arg1, bToFree1);
   63364             :   }
   63365          69 :   {
   63366             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   63367          69 :     CPLFree( arg3 );
   63368             :   }
   63369          69 :   {
   63370             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63371             :     
   63372          69 :     CPLFree(psProgressInfo);
   63373             :     
   63374             :   }
   63375          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; } }
   63376             :   return resultobj;
   63377           0 : fail:
   63378           0 :   {
   63379             :     /* %typemap(freearg) (const char *utf8_path) */
   63380           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63381             :   }
   63382           0 :   {
   63383             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   63384           0 :     CPLFree( arg3 );
   63385             :   }
   63386           0 :   {
   63387             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63388             :     
   63389           0 :     CPLFree(psProgressInfo);
   63390             :     
   63391             :   }
   63392             :   return NULL;
   63393             : }
   63394             : 
   63395             : 
   63396         100 : SWIGINTERN PyObject *_wrap_BuildVRTInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63397         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63398         100 :   char *arg1 = (char *) 0 ;
   63399         100 :   char **arg2 = (char **) 0 ;
   63400         100 :   GDALBuildVRTOptions *arg3 = (GDALBuildVRTOptions *) 0 ;
   63401         100 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   63402         100 :   void *arg5 = (void *) NULL ;
   63403         100 :   int bToFree1 = 0 ;
   63404         100 :   void *argp3 = 0 ;
   63405         100 :   int res3 = 0 ;
   63406         100 :   PyObject *swig_obj[5] ;
   63407         100 :   GDALDatasetShadow *result = 0 ;
   63408             :   
   63409             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63410         100 :   PyProgressData *psProgressInfo;
   63411         100 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63412         100 :   psProgressInfo->nLastReported = -1;
   63413         100 :   psProgressInfo->psPyCallback = NULL;
   63414         100 :   psProgressInfo->psPyCallbackData = NULL;
   63415         100 :   arg5 = psProgressInfo;
   63416         100 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalNames", 3, 5, swig_obj)) SWIG_fail;
   63417         100 :   {
   63418             :     /* %typemap(in) (const char *utf8_path) */
   63419         100 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63420             :     {
   63421          93 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63422             :     }
   63423             :     else
   63424             :     {
   63425           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63426             :       
   63427             :     }
   63428         100 :     if (arg1 == NULL)
   63429             :     {
   63430           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63431           0 :       SWIG_fail;
   63432             :     }
   63433             :   }
   63434         100 :   {
   63435             :     /* %typemap(in) char **dict */
   63436         100 :     arg2 = NULL;
   63437         100 :     if ( PySequence_Check( swig_obj[1] ) ) {
   63438         100 :       int bErr = FALSE;
   63439         100 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   63440         100 :       if ( bErr )
   63441             :       {
   63442           0 :         SWIG_fail;
   63443             :       }
   63444             :     }
   63445           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   63446           0 :       int bErr = FALSE;
   63447           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   63448           0 :       if ( bErr )
   63449             :       {
   63450           0 :         SWIG_fail;
   63451             :       }
   63452             :     }
   63453             :     else {
   63454           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63455           0 :       SWIG_fail;
   63456             :     }
   63457             :   }
   63458         100 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   63459         100 :   if (!SWIG_IsOK(res3)) {
   63460           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BuildVRTInternalNames" "', argument " "3"" of type '" "GDALBuildVRTOptions *""'"); 
   63461             :   }
   63462         100 :   arg3 = reinterpret_cast< GDALBuildVRTOptions * >(argp3);
   63463         100 :   if (swig_obj[3]) {
   63464         100 :     {
   63465             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63466             :       /* callback_func typemap */
   63467             :       
   63468             :       /* In some cases 0 is passed instead of None. */
   63469             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63470         100 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63471             :       {
   63472           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63473             :         {
   63474           0 :           swig_obj[3] = Py_None;
   63475             :         }
   63476             :       }
   63477             :       
   63478         100 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63479           1 :         void* cbfunction = NULL;
   63480           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63481             :             (void**)&cbfunction,
   63482             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63483             :             SWIG_POINTER_EXCEPTION | 0 ));
   63484             :         
   63485           1 :         if ( cbfunction == GDALTermProgress ) {
   63486             :           arg4 = GDALTermProgress;
   63487             :         } else {
   63488           1 :           if (!PyCallable_Check(swig_obj[3])) {
   63489           0 :             PyErr_SetString( PyExc_RuntimeError,
   63490             :               "Object given is not a Python function" );
   63491           0 :             SWIG_fail;
   63492             :           }
   63493           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   63494           1 :           arg4 = PyProgressProxy;
   63495             :         }
   63496             :         
   63497             :       }
   63498             :       
   63499             :     }
   63500             :   }
   63501         100 :   if (swig_obj[4]) {
   63502         100 :     {
   63503             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63504         100 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63505             :     }
   63506             :   }
   63507         100 :   {
   63508         100 :     if (!arg1) {
   63509         100 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63510             :     }
   63511             :   }
   63512         100 :   {
   63513         100 :     const int bLocalUseExceptions = GetUseExceptions();
   63514         100 :     if ( bLocalUseExceptions ) {
   63515          85 :       pushErrorHandler();
   63516             :     }
   63517         100 :     {
   63518         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63519         100 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_names((char const *)arg1,arg2,arg3,arg4,arg5);
   63520         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63521             :     }
   63522         100 :     if ( bLocalUseExceptions ) {
   63523          85 :       popErrorHandler();
   63524             :     }
   63525             : #ifndef SED_HACKS
   63526             :     if ( bLocalUseExceptions ) {
   63527             :       CPLErr eclass = CPLGetLastErrorType();
   63528             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63529             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63530             :       }
   63531             :     }
   63532             : #endif
   63533             :   }
   63534         100 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63535         100 :   {
   63536             :     /* %typemap(freearg) (const char *utf8_path) */
   63537         100 :     GDALPythonFreeCStr(arg1, bToFree1);
   63538             :   }
   63539         100 :   {
   63540             :     /* %typemap(freearg) char **dict */
   63541         100 :     CSLDestroy( arg2 );
   63542             :   }
   63543         100 :   {
   63544             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63545             :     
   63546         100 :     CPLFree(psProgressInfo);
   63547             :     
   63548             :   }
   63549         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; } }
   63550             :   return resultobj;
   63551           0 : fail:
   63552           0 :   {
   63553             :     /* %typemap(freearg) (const char *utf8_path) */
   63554           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63555             :   }
   63556           0 :   {
   63557             :     /* %typemap(freearg) char **dict */
   63558           0 :     CSLDestroy( arg2 );
   63559             :   }
   63560           0 :   {
   63561             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63562             :     
   63563           0 :     CPLFree(psProgressInfo);
   63564             :     
   63565             :   }
   63566             :   return NULL;
   63567             : }
   63568             : 
   63569             : 
   63570          23 : SWIGINTERN PyObject *_wrap_new_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63571          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63572          23 :   char **arg1 = (char **) 0 ;
   63573          23 :   PyObject *swig_obj[1] ;
   63574          23 :   GDALTileIndexOptions *result = 0 ;
   63575             :   
   63576          23 :   if (!args) SWIG_fail;
   63577          23 :   swig_obj[0] = args;
   63578          23 :   {
   63579             :     /* %typemap(in) char **dict */
   63580          23 :     arg1 = NULL;
   63581          23 :     if ( PySequence_Check( swig_obj[0] ) ) {
   63582          23 :       int bErr = FALSE;
   63583          23 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   63584          23 :       if ( bErr )
   63585             :       {
   63586           0 :         SWIG_fail;
   63587             :       }
   63588             :     }
   63589           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   63590           0 :       int bErr = FALSE;
   63591           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   63592           0 :       if ( bErr )
   63593             :       {
   63594           0 :         SWIG_fail;
   63595             :       }
   63596             :     }
   63597             :     else {
   63598           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63599           0 :       SWIG_fail;
   63600             :     }
   63601             :   }
   63602          23 :   {
   63603          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63604          23 :     if ( bLocalUseExceptions ) {
   63605          23 :       pushErrorHandler();
   63606             :     }
   63607          23 :     {
   63608          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63609          23 :       result = (GDALTileIndexOptions *)new_GDALTileIndexOptions(arg1);
   63610          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63611             :     }
   63612          23 :     if ( bLocalUseExceptions ) {
   63613          23 :       popErrorHandler();
   63614             :     }
   63615             : #ifndef SED_HACKS
   63616             :     if ( bLocalUseExceptions ) {
   63617             :       CPLErr eclass = CPLGetLastErrorType();
   63618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63620             :       }
   63621             :     }
   63622             : #endif
   63623             :   }
   63624          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_NEW |  0 );
   63625          23 :   {
   63626             :     /* %typemap(freearg) char **dict */
   63627          23 :     CSLDestroy( arg1 );
   63628             :   }
   63629          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; } }
   63630             :   return resultobj;
   63631           0 : fail:
   63632           0 :   {
   63633             :     /* %typemap(freearg) char **dict */
   63634           0 :     CSLDestroy( arg1 );
   63635             :   }
   63636             :   return NULL;
   63637             : }
   63638             : 
   63639             : 
   63640          23 : SWIGINTERN PyObject *_wrap_delete_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63641          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63642          23 :   GDALTileIndexOptions *arg1 = (GDALTileIndexOptions *) 0 ;
   63643          23 :   void *argp1 = 0 ;
   63644          23 :   int res1 = 0 ;
   63645          23 :   PyObject *swig_obj[1] ;
   63646             :   
   63647          23 :   if (!args) SWIG_fail;
   63648          23 :   swig_obj[0] = args;
   63649          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_DISOWN |  0 );
   63650          23 :   if (!SWIG_IsOK(res1)) {
   63651           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTileIndexOptions" "', argument " "1"" of type '" "GDALTileIndexOptions *""'"); 
   63652             :   }
   63653          23 :   arg1 = reinterpret_cast< GDALTileIndexOptions * >(argp1);
   63654          23 :   {
   63655          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63656          23 :     if ( bLocalUseExceptions ) {
   63657          23 :       pushErrorHandler();
   63658             :     }
   63659          23 :     {
   63660          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63661          23 :       delete_GDALTileIndexOptions(arg1);
   63662          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63663             :     }
   63664          23 :     if ( bLocalUseExceptions ) {
   63665          23 :       popErrorHandler();
   63666             :     }
   63667             : #ifndef SED_HACKS
   63668             :     if ( bLocalUseExceptions ) {
   63669             :       CPLErr eclass = CPLGetLastErrorType();
   63670             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63671             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63672             :       }
   63673             :     }
   63674             : #endif
   63675             :   }
   63676          23 :   resultobj = SWIG_Py_Void();
   63677          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; } }
   63678             :   return resultobj;
   63679             : fail:
   63680             :   return NULL;
   63681             : }
   63682             : 
   63683             : 
   63684         277 : SWIGINTERN PyObject *GDALTileIndexOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63685         277 :   PyObject *obj;
   63686         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63687         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTileIndexOptions, SWIG_NewClientData(obj));
   63688         277 :   return SWIG_Py_Void();
   63689             : }
   63690             : 
   63691          23 : SWIGINTERN PyObject *GDALTileIndexOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63692          23 :   return SWIG_Python_InitShadowInstance(args);
   63693             : }
   63694             : 
   63695          23 : SWIGINTERN PyObject *_wrap_TileIndexInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63696          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63697          23 :   char *arg1 = (char *) 0 ;
   63698          23 :   char **arg2 = (char **) 0 ;
   63699          23 :   GDALTileIndexOptions *arg3 = (GDALTileIndexOptions *) 0 ;
   63700          23 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   63701          23 :   void *arg5 = (void *) NULL ;
   63702          23 :   int bToFree1 = 0 ;
   63703          23 :   void *argp3 = 0 ;
   63704          23 :   int res3 = 0 ;
   63705          23 :   PyObject *swig_obj[5] ;
   63706          23 :   GDALDatasetShadow *result = 0 ;
   63707             :   
   63708             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63709          23 :   PyProgressData *psProgressInfo;
   63710          23 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63711          23 :   psProgressInfo->nLastReported = -1;
   63712          23 :   psProgressInfo->psPyCallback = NULL;
   63713          23 :   psProgressInfo->psPyCallbackData = NULL;
   63714          23 :   arg5 = psProgressInfo;
   63715          23 :   if (!SWIG_Python_UnpackTuple(args, "TileIndexInternalNames", 3, 5, swig_obj)) SWIG_fail;
   63716          23 :   {
   63717             :     /* %typemap(in) (const char *utf8_path) */
   63718          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63719             :     {
   63720          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63721             :     }
   63722             :     else
   63723             :     {
   63724           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63725             :       
   63726             :     }
   63727          23 :     if (arg1 == NULL)
   63728             :     {
   63729           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63730           0 :       SWIG_fail;
   63731             :     }
   63732             :   }
   63733          23 :   {
   63734             :     /* %typemap(in) char **dict */
   63735          23 :     arg2 = NULL;
   63736          23 :     if ( PySequence_Check( swig_obj[1] ) ) {
   63737          23 :       int bErr = FALSE;
   63738          23 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   63739          23 :       if ( bErr )
   63740             :       {
   63741           0 :         SWIG_fail;
   63742             :       }
   63743             :     }
   63744           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   63745           0 :       int bErr = FALSE;
   63746           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   63747           0 :       if ( bErr )
   63748             :       {
   63749           0 :         SWIG_fail;
   63750             :       }
   63751             :     }
   63752             :     else {
   63753           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63754           0 :       SWIG_fail;
   63755             :     }
   63756             :   }
   63757          23 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTileIndexOptions, 0 |  0 );
   63758          23 :   if (!SWIG_IsOK(res3)) {
   63759           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TileIndexInternalNames" "', argument " "3"" of type '" "GDALTileIndexOptions *""'"); 
   63760             :   }
   63761          23 :   arg3 = reinterpret_cast< GDALTileIndexOptions * >(argp3);
   63762          23 :   if (swig_obj[3]) {
   63763          23 :     {
   63764             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63765             :       /* callback_func typemap */
   63766             :       
   63767             :       /* In some cases 0 is passed instead of None. */
   63768             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63769          23 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63770             :       {
   63771           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63772             :         {
   63773           0 :           swig_obj[3] = Py_None;
   63774             :         }
   63775             :       }
   63776             :       
   63777          23 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63778           0 :         void* cbfunction = NULL;
   63779           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63780             :             (void**)&cbfunction,
   63781             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63782             :             SWIG_POINTER_EXCEPTION | 0 ));
   63783             :         
   63784           0 :         if ( cbfunction == GDALTermProgress ) {
   63785             :           arg4 = GDALTermProgress;
   63786             :         } else {
   63787           0 :           if (!PyCallable_Check(swig_obj[3])) {
   63788           0 :             PyErr_SetString( PyExc_RuntimeError,
   63789             :               "Object given is not a Python function" );
   63790           0 :             SWIG_fail;
   63791             :           }
   63792           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   63793           0 :           arg4 = PyProgressProxy;
   63794             :         }
   63795             :         
   63796             :       }
   63797             :       
   63798             :     }
   63799             :   }
   63800          23 :   if (swig_obj[4]) {
   63801          23 :     {
   63802             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63803          23 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63804             :     }
   63805             :   }
   63806          23 :   {
   63807          23 :     if (!arg1) {
   63808          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63809             :     }
   63810             :   }
   63811          23 :   {
   63812          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63813          23 :     if ( bLocalUseExceptions ) {
   63814          23 :       pushErrorHandler();
   63815             :     }
   63816          23 :     {
   63817          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63818          23 :       result = (GDALDatasetShadow *)wrapper_TileIndex_names((char const *)arg1,arg2,arg3,arg4,arg5);
   63819          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63820             :     }
   63821          23 :     if ( bLocalUseExceptions ) {
   63822          23 :       popErrorHandler();
   63823             :     }
   63824             : #ifndef SED_HACKS
   63825             :     if ( bLocalUseExceptions ) {
   63826             :       CPLErr eclass = CPLGetLastErrorType();
   63827             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63828             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63829             :       }
   63830             :     }
   63831             : #endif
   63832             :   }
   63833          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63834          23 :   {
   63835             :     /* %typemap(freearg) (const char *utf8_path) */
   63836          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   63837             :   }
   63838          23 :   {
   63839             :     /* %typemap(freearg) char **dict */
   63840          23 :     CSLDestroy( arg2 );
   63841             :   }
   63842          23 :   {
   63843             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63844             :     
   63845          23 :     CPLFree(psProgressInfo);
   63846             :     
   63847             :   }
   63848          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; } }
   63849             :   return resultobj;
   63850           0 : fail:
   63851           0 :   {
   63852             :     /* %typemap(freearg) (const char *utf8_path) */
   63853           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63854             :   }
   63855           0 :   {
   63856             :     /* %typemap(freearg) char **dict */
   63857           0 :     CSLDestroy( arg2 );
   63858             :   }
   63859           0 :   {
   63860             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63861             :     
   63862           0 :     CPLFree(psProgressInfo);
   63863             :     
   63864             :   }
   63865             :   return NULL;
   63866             : }
   63867             : 
   63868             : 
   63869         108 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63870         108 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63871         108 :   char **arg1 = (char **) 0 ;
   63872         108 :   PyObject *swig_obj[1] ;
   63873         108 :   GDALMultiDimTranslateOptions *result = 0 ;
   63874             :   
   63875         108 :   if (!args) SWIG_fail;
   63876         108 :   swig_obj[0] = args;
   63877         108 :   {
   63878             :     /* %typemap(in) char **dict */
   63879         108 :     arg1 = NULL;
   63880         108 :     if ( PySequence_Check( swig_obj[0] ) ) {
   63881         108 :       int bErr = FALSE;
   63882         108 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   63883         108 :       if ( bErr )
   63884             :       {
   63885           0 :         SWIG_fail;
   63886             :       }
   63887             :     }
   63888           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   63889           0 :       int bErr = FALSE;
   63890           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   63891           0 :       if ( bErr )
   63892             :       {
   63893           0 :         SWIG_fail;
   63894             :       }
   63895             :     }
   63896             :     else {
   63897           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63898           0 :       SWIG_fail;
   63899             :     }
   63900             :   }
   63901         108 :   {
   63902         108 :     const int bLocalUseExceptions = GetUseExceptions();
   63903         108 :     if ( bLocalUseExceptions ) {
   63904          29 :       pushErrorHandler();
   63905             :     }
   63906         108 :     {
   63907         108 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63908         108 :       result = (GDALMultiDimTranslateOptions *)new_GDALMultiDimTranslateOptions(arg1);
   63909         108 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63910             :     }
   63911         108 :     if ( bLocalUseExceptions ) {
   63912          29 :       popErrorHandler();
   63913             :     }
   63914             : #ifndef SED_HACKS
   63915             :     if ( bLocalUseExceptions ) {
   63916             :       CPLErr eclass = CPLGetLastErrorType();
   63917             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63918             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63919             :       }
   63920             :     }
   63921             : #endif
   63922             :   }
   63923         108 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_NEW |  0 );
   63924         108 :   {
   63925             :     /* %typemap(freearg) char **dict */
   63926         108 :     CSLDestroy( arg1 );
   63927             :   }
   63928         108 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   63929             :   return resultobj;
   63930           0 : fail:
   63931           0 :   {
   63932             :     /* %typemap(freearg) char **dict */
   63933           0 :     CSLDestroy( arg1 );
   63934             :   }
   63935             :   return NULL;
   63936             : }
   63937             : 
   63938             : 
   63939         108 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63940         108 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63941         108 :   GDALMultiDimTranslateOptions *arg1 = (GDALMultiDimTranslateOptions *) 0 ;
   63942         108 :   void *argp1 = 0 ;
   63943         108 :   int res1 = 0 ;
   63944         108 :   PyObject *swig_obj[1] ;
   63945             :   
   63946         108 :   if (!args) SWIG_fail;
   63947         108 :   swig_obj[0] = args;
   63948         108 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   63949         108 :   if (!SWIG_IsOK(res1)) {
   63950           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimTranslateOptions" "', argument " "1"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   63951             :   }
   63952         108 :   arg1 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp1);
   63953         108 :   {
   63954         108 :     const int bLocalUseExceptions = GetUseExceptions();
   63955         108 :     if ( bLocalUseExceptions ) {
   63956          29 :       pushErrorHandler();
   63957             :     }
   63958         108 :     {
   63959         108 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63960         108 :       delete_GDALMultiDimTranslateOptions(arg1);
   63961         108 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63962             :     }
   63963         108 :     if ( bLocalUseExceptions ) {
   63964          29 :       popErrorHandler();
   63965             :     }
   63966             : #ifndef SED_HACKS
   63967             :     if ( bLocalUseExceptions ) {
   63968             :       CPLErr eclass = CPLGetLastErrorType();
   63969             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63970             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63971             :       }
   63972             :     }
   63973             : #endif
   63974             :   }
   63975         108 :   resultobj = SWIG_Py_Void();
   63976         108 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   63977             :   return resultobj;
   63978             : fail:
   63979             :   return NULL;
   63980             : }
   63981             : 
   63982             : 
   63983         277 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63984         277 :   PyObject *obj;
   63985         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63986         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_NewClientData(obj));
   63987         277 :   return SWIG_Py_Void();
   63988             : }
   63989             : 
   63990         108 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63991         108 :   return SWIG_Python_InitShadowInstance(args);
   63992             : }
   63993             : 
   63994         108 : SWIGINTERN PyObject *_wrap_wrapper_GDALMultiDimTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63995         108 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63996         108 :   char *arg1 = (char *) 0 ;
   63997         108 :   int arg2 ;
   63998         108 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   63999         108 :   GDALMultiDimTranslateOptions *arg4 = (GDALMultiDimTranslateOptions *) 0 ;
   64000         108 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   64001         108 :   void *arg6 = (void *) NULL ;
   64002         108 :   int bToFree1 = 0 ;
   64003         108 :   void *argp4 = 0 ;
   64004         108 :   int res4 = 0 ;
   64005         108 :   PyObject *swig_obj[5] ;
   64006         108 :   GDALDatasetShadow *result = 0 ;
   64007             :   
   64008             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   64009         108 :   PyProgressData *psProgressInfo;
   64010         108 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   64011         108 :   psProgressInfo->nLastReported = -1;
   64012         108 :   psProgressInfo->psPyCallback = NULL;
   64013         108 :   psProgressInfo->psPyCallbackData = NULL;
   64014         108 :   arg6 = psProgressInfo;
   64015         108 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALMultiDimTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   64016         108 :   {
   64017             :     /* %typemap(in) (const char *utf8_path) */
   64018         108 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   64019             :     {
   64020          10 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   64021             :     }
   64022             :     else
   64023             :     {
   64024          98 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   64025             :       
   64026             :     }
   64027         108 :     if (arg1 == NULL)
   64028             :     {
   64029           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   64030           0 :       SWIG_fail;
   64031             :     }
   64032             :   }
   64033         108 :   {
   64034             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   64035         108 :     if ( !PySequence_Check(swig_obj[1]) ) {
   64036           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   64037           0 :       SWIG_fail;
   64038             :     }
   64039         108 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   64040         108 :     if( size > (Py_ssize_t)INT_MAX ) {
   64041           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   64042           0 :       SWIG_fail;
   64043             :     }
   64044         108 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   64045           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   64046           0 :       SWIG_fail;
   64047             :     }
   64048         108 :     arg2 = (int)size;
   64049         108 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   64050         108 :     if( !arg3) {
   64051           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   64052           0 :       SWIG_fail;
   64053             :     }
   64054             :     
   64055         216 :     for( int i = 0; i<arg2; i++ ) {
   64056         108 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   64057         108 :       GDALDatasetShadow* rawobjectpointer = NULL;
   64058         108 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   64059         108 :       if (!rawobjectpointer) {
   64060           0 :         Py_DECREF(o);
   64061           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   64062           0 :         SWIG_fail;
   64063             :       }
   64064         108 :       arg3[i] = rawobjectpointer;
   64065         108 :       Py_DECREF(o);
   64066             :       
   64067             :     }
   64068             :   }
   64069         108 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALMultiDimTranslateOptions, 0 |  0 );
   64070         108 :   if (!SWIG_IsOK(res4)) {
   64071           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALMultiDimTranslateDestName" "', argument " "4"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   64072             :   }
   64073         108 :   arg4 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp4);
   64074         108 :   if (swig_obj[3]) {
   64075         108 :     {
   64076             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   64077             :       /* callback_func typemap */
   64078             :       
   64079             :       /* In some cases 0 is passed instead of None. */
   64080             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   64081         108 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   64082             :       {
   64083           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   64084             :         {
   64085           0 :           swig_obj[3] = Py_None;
   64086             :         }
   64087             :       }
   64088             :       
   64089         108 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   64090           0 :         void* cbfunction = NULL;
   64091           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   64092             :             (void**)&cbfunction,
   64093             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   64094             :             SWIG_POINTER_EXCEPTION | 0 ));
   64095             :         
   64096           0 :         if ( cbfunction == GDALTermProgress ) {
   64097             :           arg5 = GDALTermProgress;
   64098             :         } else {
   64099           0 :           if (!PyCallable_Check(swig_obj[3])) {
   64100           0 :             PyErr_SetString( PyExc_RuntimeError,
   64101             :               "Object given is not a Python function" );
   64102           0 :             SWIG_fail;
   64103             :           }
   64104           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   64105           0 :           arg5 = PyProgressProxy;
   64106             :         }
   64107             :         
   64108             :       }
   64109             :       
   64110             :     }
   64111             :   }
   64112         108 :   if (swig_obj[4]) {
   64113         108 :     {
   64114             :       /* %typemap(in) ( void* callback_data=NULL)  */
   64115         108 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   64116             :     }
   64117             :   }
   64118         108 :   {
   64119         108 :     if (!arg1) {
   64120         108 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   64121             :     }
   64122             :   }
   64123         108 :   {
   64124         108 :     const int bLocalUseExceptions = GetUseExceptions();
   64125         108 :     if ( bLocalUseExceptions ) {
   64126          29 :       pushErrorHandler();
   64127             :     }
   64128         108 :     {
   64129         108 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   64130         108 :       result = (GDALDatasetShadow *)wrapper_GDALMultiDimTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   64131         108 :       SWIG_PYTHON_THREAD_END_ALLOW;
   64132             :     }
   64133         108 :     if ( bLocalUseExceptions ) {
   64134          29 :       popErrorHandler();
   64135             :     }
   64136             : #ifndef SED_HACKS
   64137             :     if ( bLocalUseExceptions ) {
   64138             :       CPLErr eclass = CPLGetLastErrorType();
   64139             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   64140             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   64141             :       }
   64142             :     }
   64143             : #endif
   64144             :   }
   64145         108 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   64146         108 :   {
   64147             :     /* %typemap(freearg) (const char *utf8_path) */
   64148         108 :     GDALPythonFreeCStr(arg1, bToFree1);
   64149             :   }
   64150         108 :   {
   64151             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   64152         108 :     CPLFree( arg3 );
   64153             :   }
   64154         108 :   {
   64155             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   64156             :     
   64157         108 :     CPLFree(psProgressInfo);
   64158             :     
   64159             :   }
   64160         126 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   64161             :   return resultobj;
   64162           0 : fail:
   64163           0 :   {
   64164             :     /* %typemap(freearg) (const char *utf8_path) */
   64165           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   64166             :   }
   64167           0 :   {
   64168             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   64169           0 :     CPLFree( arg3 );
   64170             :   }
   64171           0 :   {
   64172             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   64173             :     
   64174           0 :     CPLFree(psProgressInfo);
   64175             :     
   64176             :   }
   64177             :   return NULL;
   64178             : }
   64179             : 
   64180             : 
   64181             : static PyMethodDef SwigMethods[] = {
   64182             :    { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
   64183             :    { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
   64184             :    { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
   64185             :    { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
   64186             :    { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
   64187             :    { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
   64188             :    { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
   64189             :    { "VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, "VSIFReadL(unsigned int nMembSize, unsigned int nMembCount, VSILFILE fp) -> unsigned int"},
   64190             :    { "VSIGetMemFileBuffer_unsafe", _wrap_VSIGetMemFileBuffer_unsafe, METH_O, "VSIGetMemFileBuffer_unsafe(char const * utf8_path)"},
   64191             :    { "Debug", _wrap_Debug, METH_VARARGS, "Debug(char const * msg_class, char const * message)"},
   64192             :    { "SetErrorHandler", _wrap_SetErrorHandler, METH_VARARGS, "SetErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   64193             :    { "SetCurrentErrorHandlerCatchDebug", _wrap_SetCurrentErrorHandlerCatchDebug, METH_O, "SetCurrentErrorHandlerCatchDebug(int bCatchDebug)"},
   64194             :    { "PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, "PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   64195             :    { "PopErrorHandler", _wrap_PopErrorHandler, METH_NOARGS, "PopErrorHandler()"},
   64196             :    { "Error", _wrap_Error, METH_VARARGS, "Error(CPLErr msg_class=CE_Failure, int err_code=0, char const * msg=\"error\")"},
   64197             :    { "GOA2GetAuthorizationURL", _wrap_GOA2GetAuthorizationURL, METH_O, "GOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *"},
   64198             :    { "GOA2GetRefreshToken", _wrap_GOA2GetRefreshToken, METH_VARARGS, "GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *"},
   64199             :    { "GOA2GetAccessToken", _wrap_GOA2GetAccessToken, METH_VARARGS, "GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *"},
   64200             :    { "ErrorReset", _wrap_ErrorReset, METH_NOARGS, "ErrorReset()"},
   64201             :    { "wrapper_EscapeString", (PyCFunction)(void(*)(void))_wrap_wrapper_EscapeString, METH_VARARGS|METH_KEYWORDS, "wrapper_EscapeString(int len, int scheme=CPLES_SQL) -> retStringAndCPLFree *"},
   64202             :    { "EscapeBinary", (PyCFunction)(void(*)(void))_wrap_EscapeBinary, METH_VARARGS|METH_KEYWORDS, "EscapeBinary(int len, int scheme=CPLES_SQL)"},
   64203             :    { "GetLastErrorNo", _wrap_GetLastErrorNo, METH_NOARGS, "GetLastErrorNo() -> int"},
   64204             :    { "GetLastErrorType", _wrap_GetLastErrorType, METH_NOARGS, "GetLastErrorType() -> int"},
   64205             :    { "GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_NOARGS, "GetLastErrorMsg() -> char const *"},
   64206             :    { "GetErrorCounter", _wrap_GetErrorCounter, METH_NOARGS, "GetErrorCounter() -> unsigned int"},
   64207             :    { "VSIGetLastErrorNo", _wrap_VSIGetLastErrorNo, METH_NOARGS, "VSIGetLastErrorNo() -> int"},
   64208             :    { "VSIGetLastErrorMsg", _wrap_VSIGetLastErrorMsg, METH_NOARGS, "VSIGetLastErrorMsg() -> char const *"},
   64209             :    { "VSIErrorReset", _wrap_VSIErrorReset, METH_NOARGS, "VSIErrorReset()"},
   64210             :    { "PushFinderLocation", _wrap_PushFinderLocation, METH_O, "PushFinderLocation(char const * utf8_path)"},
   64211             :    { "PopFinderLocation", _wrap_PopFinderLocation, METH_NOARGS, "PopFinderLocation()"},
   64212             :    { "FinderClean", _wrap_FinderClean, METH_NOARGS, "FinderClean()"},
   64213             :    { "FindFile", _wrap_FindFile, METH_VARARGS, "FindFile(char const * pszClass, char const * utf8_path) -> char const *"},
   64214             :    { "ReadDir", _wrap_ReadDir, METH_VARARGS, "ReadDir(char const * utf8_path, int nMaxFiles=0) -> char **"},
   64215             :    { "ReadDirRecursive", _wrap_ReadDirRecursive, METH_O, "ReadDirRecursive(char const * utf8_path) -> char **"},
   64216             :    { "OpenDir", _wrap_OpenDir, METH_VARARGS, "OpenDir(char const * utf8_path, int nRecurseDepth=-1, char ** options=None) -> VSIDIR *"},
   64217             :    { "DirEntry_name_get", _wrap_DirEntry_name_get, METH_O, "DirEntry_name_get(DirEntry self) -> char *"},
   64218             :    { "DirEntry_mode_get", _wrap_DirEntry_mode_get, METH_O, "DirEntry_mode_get(DirEntry self) -> int"},
   64219             :    { "DirEntry_size_get", _wrap_DirEntry_size_get, METH_O, "DirEntry_size_get(DirEntry self) -> GIntBig"},
   64220             :    { "DirEntry_mtime_get", _wrap_DirEntry_mtime_get, METH_O, "DirEntry_mtime_get(DirEntry self) -> GIntBig"},
   64221             :    { "DirEntry_modeKnown_get", _wrap_DirEntry_modeKnown_get, METH_O, "DirEntry_modeKnown_get(DirEntry self) -> bool"},
   64222             :    { "DirEntry_sizeKnown_get", _wrap_DirEntry_sizeKnown_get, METH_O, "DirEntry_sizeKnown_get(DirEntry self) -> bool"},
   64223             :    { "DirEntry_mtimeKnown_get", _wrap_DirEntry_mtimeKnown_get, METH_O, "DirEntry_mtimeKnown_get(DirEntry self) -> bool"},
   64224             :    { "DirEntry_extra_get", _wrap_DirEntry_extra_get, METH_O, "DirEntry_extra_get(DirEntry self) -> char **"},
   64225             :    { "new_DirEntry", _wrap_new_DirEntry, METH_O, "new_DirEntry(DirEntry entryIn) -> DirEntry"},
   64226             :    { "delete_DirEntry", _wrap_delete_DirEntry, METH_O, "delete_DirEntry(DirEntry self)"},
   64227             :    { "DirEntry_IsDirectory", _wrap_DirEntry_IsDirectory, METH_O, "DirEntry_IsDirectory(DirEntry self) -> bool"},
   64228             :    { "DirEntry_swigregister", DirEntry_swigregister, METH_O, NULL},
   64229             :    { "DirEntry_swiginit", DirEntry_swiginit, METH_VARARGS, NULL},
   64230             :    { "GetNextDirEntry", _wrap_GetNextDirEntry, METH_O, "GetNextDirEntry(VSIDIR * dir) -> DirEntry"},
   64231             :    { "CloseDir", _wrap_CloseDir, METH_O, "CloseDir(VSIDIR * dir)"},
   64232             :    { "SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, "\n"
   64233             :     "SetConfigOption(char const * pszKey, char const * pszValue)\n"
   64234             :     "\n"
   64235             :     "\n"
   64236             :     "Set the value of a configuration option for all threads.\n"
   64237             :     "See :cpp:func:`CPLSetConfigOption`.\n"
   64238             :     "\n"
   64239             :     "Parameters\n"
   64240             :     "----------\n"
   64241             :     "pszKey : str\n"
   64242             :     "    name of the configuration option\n"
   64243             :     "pszValue : str\n"
   64244             :     "    value of the configuration option\n"
   64245             :     "\n"
   64246             :     "See Also\n"
   64247             :     "--------\n"
   64248             :     ":py:func:`SetThreadLocalConfigOption`\n"
   64249             :     ":py:func:`config_option`\n"
   64250             :     ":py:func:`config_options`\n"
   64251             :     "\n"
   64252             :     "\n"
   64253             :     ""},
   64254             :    { "SetThreadLocalConfigOption", _wrap_SetThreadLocalConfigOption, METH_VARARGS, "\n"
   64255             :     "SetThreadLocalConfigOption(char const * pszKey, char const * pszValue)\n"
   64256             :     "\n"
   64257             :     "\n"
   64258             :     "Set the value of a configuration option for the current thread.\n"
   64259             :     "See :cpp:func:`CPLSetThreadLocalConfigOption`.\n"
   64260             :     "\n"
   64261             :     "Parameters\n"
   64262             :     "----------\n"
   64263             :     "pszKey : str\n"
   64264             :     "    name of the configuration option\n"
   64265             :     "pszValue : str\n"
   64266             :     "    value of the configuration option\n"
   64267             :     "\n"
   64268             :     "See Also\n"
   64269             :     "--------\n"
   64270             :     ":py:func:`SetConfigOption`\n"
   64271             :     ":py:func:`config_option`\n"
   64272             :     ":py:func:`config_options`\n"
   64273             :     "\n"
   64274             :     ""},
   64275             :    { "GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, "\n"
   64276             :     "GetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   64277             :     "\n"
   64278             :     "\n"
   64279             :     "Return the value of a configuration option.\n"
   64280             :     "See :cpp:func:`CPLGetConfigOption`.\n"
   64281             :     "\n"
   64282             :     "Parameters\n"
   64283             :     "----------\n"
   64284             :     "pszKey : str\n"
   64285             :     "    name of the configuration option\n"
   64286             :     "pszDefault : str, optional\n"
   64287             :     "    default value to return if the option has not been set\n"
   64288             :     "\n"
   64289             :     "Returns\n"
   64290             :     "-------\n"
   64291             :     "str\n"
   64292             :     "\n"
   64293             :     "See Also\n"
   64294             :     "--------\n"
   64295             :     ":py:func:`GetConfigOptions`\n"
   64296             :     ":py:func:`GetThreadLocalConfigOption`\n"
   64297             :     "\n"
   64298             :     ""},
   64299             :    { "GetGlobalConfigOption", _wrap_GetGlobalConfigOption, METH_VARARGS, "\n"
   64300             :     "GetGlobalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   64301             :     "\n"
   64302             :     "\n"
   64303             :     "Return the value of a global (not thread-local) configuration option.\n"
   64304             :     "See :cpp:func:`CPLGetGlobalConfigOption`.\n"
   64305             :     "\n"
   64306             :     "Parameters\n"
   64307             :     "----------\n"
   64308             :     "pszKey : str\n"
   64309             :     "    name of the configuration option\n"
   64310             :     "pszDefault : str, optional\n"
   64311             :     "    default value to return if the option has not been set\n"
   64312             :     "\n"
   64313             :     "Returns\n"
   64314             :     "-------\n"
   64315             :     "str\n"
   64316             :     "\n"
   64317             :     ""},
   64318             :    { "GetThreadLocalConfigOption", _wrap_GetThreadLocalConfigOption, METH_VARARGS, "\n"
   64319             :     "GetThreadLocalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   64320             :     "\n"
   64321             :     "\n"
   64322             :     "Return the value of a thread-local configuration option.\n"
   64323             :     "See :cpp:func:`CPLGetThreadLocalConfigOption`.\n"
   64324             :     "\n"
   64325             :     "Parameters\n"
   64326             :     "----------\n"
   64327             :     "pszKey : str\n"
   64328             :     "    name of the configuration option\n"
   64329             :     "pszDefault : str, optional\n"
   64330             :     "    default value to return if the option has not been set\n"
   64331             :     "\n"
   64332             :     "Returns\n"
   64333             :     "-------\n"
   64334             :     "str\n"
   64335             :     "\n"
   64336             :     "\n"
   64337             :     ""},
   64338             :    { "GetConfigOptions", _wrap_GetConfigOptions, METH_NOARGS, "\n"
   64339             :     "GetConfigOptions() -> char **\n"
   64340             :     "\n"
   64341             :     "\n"
   64342             :     "Return a dictionary of currently set configuration options.\n"
   64343             :     "See :cpp:func:`CPLGetConfigOptions`.\n"
   64344             :     "\n"
   64345             :     "Returns\n"
   64346             :     "-------\n"
   64347             :     "dict\n"
   64348             :     "\n"
   64349             :     "Examples\n"
   64350             :     "--------\n"
   64351             :     ">>> with gdal.config_options({'A': '3', 'B': '4'}):\n"
   64352             :     "...     gdal.SetConfigOption('C', '5')\n"
   64353             :     "...     gdal.GetConfigOptions()\n"
   64354             :     "...\n"
   64355             :     "{'C': '5', 'A': '3', 'B': '4'}\n"
   64356             :     "\n"
   64357             :     "See Also\n"
   64358             :     "--------\n"
   64359             :     ":py:func:`GetConfigOption`\n"
   64360             :     ":py:func:`GetGlobalConfigOptions`\n"
   64361             :     "\n"
   64362             :     ""},
   64363             :    { "SetPathSpecificOption", _wrap_SetPathSpecificOption, METH_VARARGS, "SetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   64364             :    { "SetCredential", _wrap_SetCredential, METH_VARARGS, "SetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   64365             :    { "GetCredential", _wrap_GetCredential, METH_VARARGS, "GetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   64366             :    { "GetPathSpecificOption", _wrap_GetPathSpecificOption, METH_VARARGS, "GetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   64367             :    { "ClearCredentials", _wrap_ClearCredentials, METH_VARARGS, "ClearCredentials(char const * pszPathPrefix=None)"},
   64368             :    { "ClearPathSpecificOptions", _wrap_ClearPathSpecificOptions, METH_VARARGS, "ClearPathSpecificOptions(char const * pszPathPrefix=None)"},
   64369             :    { "CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_O, "CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *"},
   64370             :    { "CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, "CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *"},
   64371             :    { "FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, "FileFromMemBuffer(char const * utf8_path, GIntBig nBytes) -> VSI_RETVAL"},
   64372             :    { "Unlink", _wrap_Unlink, METH_O, "Unlink(char const * utf8_path) -> VSI_RETVAL"},
   64373             :    { "UnlinkBatch", _wrap_UnlinkBatch, METH_O, "UnlinkBatch(char ** files) -> bool"},
   64374             :    { "HasThreadSupport", _wrap_HasThreadSupport, METH_NOARGS, "HasThreadSupport() -> int"},
   64375             :    { "GetCurrentThreadCount", _wrap_GetCurrentThreadCount, METH_NOARGS, "GetCurrentThreadCount() -> int"},
   64376             :    { "Mkdir", _wrap_Mkdir, METH_VARARGS, "Mkdir(char const * utf8_path, int mode) -> VSI_RETVAL"},
   64377             :    { "Rmdir", _wrap_Rmdir, METH_O, "Rmdir(char const * utf8_path) -> VSI_RETVAL"},
   64378             :    { "MkdirRecursive", _wrap_MkdirRecursive, METH_VARARGS, "MkdirRecursive(char const * utf8_path, int mode) -> VSI_RETVAL"},
   64379             :    { "RmdirRecursive", _wrap_RmdirRecursive, METH_O, "RmdirRecursive(char const * utf8_path) -> VSI_RETVAL"},
   64380             :    { "Rename", _wrap_Rename, METH_VARARGS, "Rename(char const * old_path, char const * new_path) -> VSI_RETVAL"},
   64381             :    { "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"},
   64382             :    { "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"},
   64383             :    { "AbortPendingUploads", _wrap_AbortPendingUploads, METH_O, "AbortPendingUploads(char const * utf8_path) -> bool"},
   64384             :    { "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"},
   64385             :    { "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)"},
   64386             :    { "MoveFile", _wrap_MoveFile, METH_VARARGS, "MoveFile(char const * pszSource, char const * pszTarget) -> int"},
   64387             :    { "GetActualURL", _wrap_GetActualURL, METH_O, "GetActualURL(char const * utf8_path) -> char const *"},
   64388             :    { "GetSignedURL", _wrap_GetSignedURL, METH_VARARGS, "GetSignedURL(char const * utf8_path, char ** options=None) -> retStringAndCPLFree *"},
   64389             :    { "GetFileSystemsPrefixes", _wrap_GetFileSystemsPrefixes, METH_NOARGS, "GetFileSystemsPrefixes() -> char **"},
   64390             :    { "GetFileSystemOptions", _wrap_GetFileSystemOptions, METH_O, "GetFileSystemOptions(char const * utf8_path) -> char const *"},
   64391             :    { "VSILFILE_swigregister", VSILFILE_swigregister, METH_O, NULL},
   64392             :    { "StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_O, "StatBuf_mode_get(StatBuf self) -> int"},
   64393             :    { "StatBuf_size_get", _wrap_StatBuf_size_get, METH_O, "StatBuf_size_get(StatBuf self) -> GIntBig"},
   64394             :    { "StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_O, "StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   64395             :    { "new_StatBuf", _wrap_new_StatBuf, METH_O, "new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   64396             :    { "delete_StatBuf", _wrap_delete_StatBuf, METH_O, "delete_StatBuf(StatBuf self)"},
   64397             :    { "StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_O, "StatBuf_IsDirectory(StatBuf self) -> int"},
   64398             :    { "StatBuf_swigregister", StatBuf_swigregister, METH_O, NULL},
   64399             :    { "StatBuf_swiginit", StatBuf_swiginit, METH_VARARGS, NULL},
   64400             :    { "VSIStatL", _wrap_VSIStatL, METH_VARARGS, "VSIStatL(char const * utf8_path, int nFlags=0) -> int"},
   64401             :    { "GetFileMetadata", _wrap_GetFileMetadata, METH_VARARGS, "GetFileMetadata(char const * utf8_path, char const * domain, char ** options=None) -> char **"},
   64402             :    { "SetFileMetadata", _wrap_SetFileMetadata, METH_VARARGS, "SetFileMetadata(char const * utf8_path, char ** metadata, char const * domain, char ** options=None) -> bool"},
   64403             :    { "VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, "VSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE"},
   64404             :    { "VSIFOpenExL", _wrap_VSIFOpenExL, METH_VARARGS, "VSIFOpenExL(char const * utf8_path, char const * pszMode, int bSetError=FALSE, char ** options=None) -> VSILFILE"},
   64405             :    { "VSIFEofL", _wrap_VSIFEofL, METH_O, "VSIFEofL(VSILFILE fp) -> int"},
   64406             :    { "VSIFErrorL", _wrap_VSIFErrorL, METH_O, "VSIFErrorL(VSILFILE fp) -> int"},
   64407             :    { "VSIFClearErrL", _wrap_VSIFClearErrL, METH_O, "VSIFClearErrL(VSILFILE fp)"},
   64408             :    { "VSIFFlushL", _wrap_VSIFFlushL, METH_O, "VSIFFlushL(VSILFILE fp) -> int"},
   64409             :    { "VSIFCloseL", _wrap_VSIFCloseL, METH_O, "VSIFCloseL(VSILFILE fp) -> VSI_RETVAL"},
   64410             :    { "VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, "VSIFSeekL(VSILFILE fp, GIntBig offset, int whence) -> int"},
   64411             :    { "VSIFTellL", _wrap_VSIFTellL, METH_O, "VSIFTellL(VSILFILE fp) -> GIntBig"},
   64412             :    { "VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, "VSIFTruncateL(VSILFILE fp, GIntBig length) -> int"},
   64413             :    { "VSISupportsSparseFiles", _wrap_VSISupportsSparseFiles, METH_O, "VSISupportsSparseFiles(char const * utf8_path) -> int"},
   64414             :    { "VSIFGetRangeStatusL", _wrap_VSIFGetRangeStatusL, METH_VARARGS, "VSIFGetRangeStatusL(VSILFILE fp, GIntBig offset, GIntBig length) -> int"},
   64415             :    { "VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, "VSIFWriteL(int nLen, int size, int memb, VSILFILE fp) -> int"},
   64416             :    { "CPLReadLineL", _wrap_CPLReadLineL, METH_O, "CPLReadLineL(VSILFILE fp) -> char const *"},
   64417             :    { "VSICurlClearCache", _wrap_VSICurlClearCache, METH_NOARGS, "VSICurlClearCache()"},
   64418             :    { "VSICurlPartialClearCache", _wrap_VSICurlPartialClearCache, METH_O, "VSICurlPartialClearCache(char const * utf8_path)"},
   64419             :    { "NetworkStatsReset", _wrap_NetworkStatsReset, METH_NOARGS, "NetworkStatsReset()"},
   64420             :    { "NetworkStatsGetAsSerializedJSON", _wrap_NetworkStatsGetAsSerializedJSON, METH_VARARGS, "NetworkStatsGetAsSerializedJSON(char ** options=None) -> retStringAndCPLFree *"},
   64421             :    { "ParseCommandLine", _wrap_ParseCommandLine, METH_O, "ParseCommandLine(char const * utf8_path) -> char **"},
   64422             :    { "GetNumCPUs", _wrap_GetNumCPUs, METH_NOARGS, "\n"
   64423             :     "GetNumCPUs() -> int\n"
   64424             :     "\n"
   64425             :     "\n"
   64426             :     "Return the number of processors detected by GDAL.\n"
   64427             :     "\n"
   64428             :     "Returns\n"
   64429             :     "-------\n"
   64430             :     "int\n"
   64431             :     "\n"
   64432             :     ""},
   64433             :    { "GetUsablePhysicalRAM", _wrap_GetUsablePhysicalRAM, METH_NOARGS, "GetUsablePhysicalRAM() -> GIntBig"},
   64434             :    { "MultipartUploadGetCapabilities", _wrap_MultipartUploadGetCapabilities, METH_O, "MultipartUploadGetCapabilities(char const * pszFilename)"},
   64435             :    { "MultipartUploadStart", _wrap_MultipartUploadStart, METH_VARARGS, "MultipartUploadStart(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   64436             :    { "MultipartUploadAddPart", _wrap_MultipartUploadAddPart, METH_VARARGS, "MultipartUploadAddPart(char const * pszFilename, char const * pszUploadId, int nPartNumber, GUIntBig nFileOffset, size_t nDataLength, char ** options=None) -> retStringAndCPLFree *"},
   64437             :    { "MultipartUploadEnd", _wrap_MultipartUploadEnd, METH_VARARGS, "MultipartUploadEnd(char const * pszFilename, char const * pszUploadId, char ** partIds, GUIntBig nTotalSize, char ** options=None) -> bool"},
   64438             :    { "MultipartUploadAbort", _wrap_MultipartUploadAbort, METH_VARARGS, "MultipartUploadAbort(char const * pszFilename, char const * pszUploadId, char ** options=None) -> bool"},
   64439             :    { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
   64440             :    { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
   64441             :    { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
   64442             :    { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
   64443             :    { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
   64444             :    { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
   64445             :     "MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
   64446             :     "MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
   64447             :     ""},
   64448             :    { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
   64449             :    { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
   64450             :    { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
   64451             :    { "Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_O, "\n"
   64452             :     "Driver_ShortName_get(Driver self) -> char const *\n"
   64453             :     "\n"
   64454             :     "The short name of a :py:class:`Driver` that can be passed to\n"
   64455             :     ":py:func:`GetDriverByName`.\n"
   64456             :     "See :cpp:func:`GDALGetDriverShortName`.\n"
   64457             :     "\n"
   64458             :     ""},
   64459             :    { "Driver_LongName_get", _wrap_Driver_LongName_get, METH_O, "\n"
   64460             :     "Driver_LongName_get(Driver self) -> char const *\n"
   64461             :     "\n"
   64462             :     "The long name of the driver.\n"
   64463             :     "See :cpp:func:`GDALGetDriverLongName`.\n"
   64464             :     "\n"
   64465             :     ""},
   64466             :    { "Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_O, "\n"
   64467             :     "Driver_HelpTopic_get(Driver self) -> char const *\n"
   64468             :     "\n"
   64469             :     "The URL for driver documentation, relative to the GDAL documentation directory.\n"
   64470             :     "See :cpp:func:`GDALGetDriverHelpTopic`.\n"
   64471             :     "\n"
   64472             :     ""},
   64473             :    { "Driver_Create", (PyCFunction)(void(*)(void))_wrap_Driver_Create, METH_VARARGS|METH_KEYWORDS, "\n"
   64474             :     "Driver_Create(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType=GDT_Byte, char ** options=None) -> Dataset\n"
   64475             :     "\n"
   64476             :     "\n"
   64477             :     "Create a new :py:class:`Dataset` with this driver.\n"
   64478             :     "See :cpp:func:`GDALDriver::Create`.\n"
   64479             :     "\n"
   64480             :     "Parameters\n"
   64481             :     "----------\n"
   64482             :     "utf8_path : str\n"
   64483             :     "   Path of the dataset to create.\n"
   64484             :     "xsize : int\n"
   64485             :     "   Width of created raster in pixels. Set to zero for vector datasets.\n"
   64486             :     "ysize : int\n"
   64487             :     "   Height of created raster in pixels. Set to zero for vector datasets.\n"
   64488             :     "bands : int, default = 1\n"
   64489             :     "    Number of bands. Set to zero for vector datasets.\n"
   64490             :     "eType : int/NumPy dtype, default = :py:const:`GDT_Byte`\n"
   64491             :     "    Raster data type. Set to :py:const:`GDT_Unknown` for vector datasets.\n"
   64492             :     "options : list/dict\n"
   64493             :     "    List of driver-specific options\n"
   64494             :     "\n"
   64495             :     "Returns\n"
   64496             :     "-------\n"
   64497             :     "Dataset\n"
   64498             :     "\n"
   64499             :     "Examples\n"
   64500             :     "--------\n"
   64501             :     ">>> with gdal.GetDriverByName('GTiff').Create('test.tif', 12, 4, 2, gdal.GDT_Float32, {'COMPRESS': 'DEFLATE'}) as ds:\n"
   64502             :     "...     print(gdal.Info(ds))\n"
   64503             :     "...\n"
   64504             :     "Driver: GTiff/GeoTIFF\n"
   64505             :     "Files: test.tif\n"
   64506             :     "Size is 12, 4\n"
   64507             :     "Image Structure Metadata:\n"
   64508             :     "  INTERLEAVE=PIXEL\n"
   64509             :     "Corner Coordinates:\n"
   64510             :     "Upper Left  (    0.0,    0.0)\n"
   64511             :     "Lower Left  (    0.0,    4.0)\n"
   64512             :     "Upper Right (   12.0,    0.0)\n"
   64513             :     "Lower Right (   12.0,    4.0)\n"
   64514             :     "Center      (    6.0,    2.0)\n"
   64515             :     "Band 1 Block=12x4 Type=Float32, ColorInterp=Gray\n"
   64516             :     "Band 2 Block=12x4 Type=Float32, ColorInterp=Undefined\n"
   64517             :     "\n"
   64518             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown) as ds:\n"
   64519             :     "...     print(gdal.VectorInfo(ds))\n"
   64520             :     "...\n"
   64521             :     "INFO: Open of `test.shp'\n"
   64522             :     "      using driver `ESRI Shapefile' successful.\n"
   64523             :     "\n"
   64524             :     ""},
   64525             :    { "Driver_CreateVector", (PyCFunction)(void(*)(void))_wrap_Driver_CreateVector, METH_VARARGS|METH_KEYWORDS, "\n"
   64526             :     "Driver_CreateVector(Driver self, char const * utf8_path, char ** options=None) -> Dataset\n"
   64527             :     "\n"
   64528             :     "\n"
   64529             :     "Create a new vector :py:class:`Dataset` with this driver.\n"
   64530             :     "This method is an alias for ``Create(name, 0, 0, 0, gdal.GDT_Unknown)``.\n"
   64531             :     "\n"
   64532             :     "Parameters\n"
   64533             :     "----------\n"
   64534             :     "utf8_path : str\n"
   64535             :     "   Path of the dataset to create.\n"
   64536             :     "\n"
   64537             :     "Returns\n"
   64538             :     "-------\n"
   64539             :     "Dataset\n"
   64540             :     "\n"
   64541             :     "Examples\n"
   64542             :     "--------\n"
   64543             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').CreateVector('test.shp') as ds:\n"
   64544             :     "...     print(ds.GetLayerCount())\n"
   64545             :     "... \n"
   64546             :     "0\n"
   64547             :     "\n"
   64548             :     "\n"
   64549             :     ""},
   64550             :    { "Driver_CreateMultiDimensional", (PyCFunction)(void(*)(void))_wrap_Driver_CreateMultiDimensional, METH_VARARGS|METH_KEYWORDS, "\n"
   64551             :     "Driver_CreateMultiDimensional(Driver self, char const * utf8_path, char ** root_group_options=None, char ** options=None) -> Dataset\n"
   64552             :     "\n"
   64553             :     "\n"
   64554             :     "Create a new multidimensional dataset.\n"
   64555             :     "See :cpp:func:`GDALDriver::CreateMultiDimensional`.\n"
   64556             :     "\n"
   64557             :     "Parameters\n"
   64558             :     "----------\n"
   64559             :     "utf8_path : str\n"
   64560             :     "   Path of the dataset to create.\n"
   64561             :     "root_group_options : dict/list\n"
   64562             :     "   Driver-specific options regarding the creation of the\n"
   64563             :     "   root group.\n"
   64564             :     "options : list/dict\n"
   64565             :     "   List of driver-specific options regarding the creation\n"
   64566             :     "   of the Dataset.\n"
   64567             :     "\n"
   64568             :     "Returns\n"
   64569             :     "-------\n"
   64570             :     "Dataset\n"
   64571             :     "\n"
   64572             :     "Examples\n"
   64573             :     "--------\n"
   64574             :     ".. testsetup::\n"
   64575             :     "   >>> if gdal.GetDriverByName('netCDF') is None:\n"
   64576             :     "   ...     pytest.skip()\n"
   64577             :     "\n"
   64578             :     ">>> with gdal.GetDriverByName('netCDF').CreateMultiDimensional('test.nc') as ds:\n"
   64579             :     "...     gdal.MultiDimInfo(ds)\n"
   64580             :     "...\n"
   64581             :     "{'type': 'group', 'driver': 'netCDF', 'name': '/', 'attributes': {'Conventions': 'CF-1.6'}, 'structural_info': {'NC_FORMAT': 'NETCDF4'}}\n"
   64582             :     "\n"
   64583             :     "\n"
   64584             :     ""},
   64585             :    { "Driver_CreateCopy", (PyCFunction)(void(*)(void))_wrap_Driver_CreateCopy, METH_VARARGS|METH_KEYWORDS, "\n"
   64586             :     "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"
   64587             :     "\n"
   64588             :     "\n"
   64589             :     "Create a copy of a :py:class:`Dataset`.\n"
   64590             :     "See :cpp:func:`GDALDriver::CreateCopy`.\n"
   64591             :     "\n"
   64592             :     "Parameters\n"
   64593             :     "----------\n"
   64594             :     "utf8_path : str\n"
   64595             :     "   Path of the dataset to create.\n"
   64596             :     "src : Dataset\n"
   64597             :     "   The Dataset being duplicated.\n"
   64598             :     "strict : bool, default=1\n"
   64599             :     "   Indicates whether the copy must be strictly equivalent or if\n"
   64600             :     "   it may be adapted as needed for the output format.\n"
   64601             :     "options : list/dict\n"
   64602             :     "   List of driver-specific options\n"
   64603             :     "callback : function, optional\n"
   64604             :     "   A progress callback function\n"
   64605             :     "callback_data: optional\n"
   64606             :     "   Optional data to be passed to callback function\n"
   64607             :     "\n"
   64608             :     "Returns\n"
   64609             :     "-------\n"
   64610             :     "Dataset\n"
   64611             :     "\n"
   64612             :     ""},
   64613             :    { "Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, "\n"
   64614             :     "Driver_Delete(Driver self, char const * utf8_path) -> CPLErr\n"
   64615             :     "\n"
   64616             :     "Delete a :py:class:`Dataset`.\n"
   64617             :     "See :cpp:func:`GDALDriver::Delete`.\n"
   64618             :     "\n"
   64619             :     "Parameters\n"
   64620             :     "----------\n"
   64621             :     "utf8_path : str\n"
   64622             :     "   Path of the dataset to delete.\n"
   64623             :     "\n"
   64624             :     "Returns\n"
   64625             :     "-------\n"
   64626             :     "int:\n"
   64627             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64628             :     "\n"
   64629             :     ""},
   64630             :    { "Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, "\n"
   64631             :     "Driver_Rename(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   64632             :     "\n"
   64633             :     "Rename a :py:class:`Dataset`.\n"
   64634             :     "See :cpp:func:`GDALDriver::Rename`.\n"
   64635             :     "\n"
   64636             :     "Parameters\n"
   64637             :     "----------\n"
   64638             :     "newName : str\n"
   64639             :     "    new path for the dataset\n"
   64640             :     "oldName : str\n"
   64641             :     "    old path for the dataset\n"
   64642             :     "\n"
   64643             :     "Returns\n"
   64644             :     "-------\n"
   64645             :     "int:\n"
   64646             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64647             :     "\n"
   64648             :     ""},
   64649             :    { "Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, "\n"
   64650             :     "Driver_CopyFiles(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   64651             :     "\n"
   64652             :     "Copy all the files associated with a :py:class:`Dataset`.\n"
   64653             :     "\n"
   64654             :     "Parameters\n"
   64655             :     "----------\n"
   64656             :     "newName : str\n"
   64657             :     "    new path for the dataset\n"
   64658             :     "oldName : str\n"
   64659             :     "    old path for the dataset\n"
   64660             :     "\n"
   64661             :     "Returns\n"
   64662             :     "-------\n"
   64663             :     "int:\n"
   64664             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64665             :     "\n"
   64666             :     ""},
   64667             :    { "Driver_HasOpenOption", _wrap_Driver_HasOpenOption, METH_VARARGS, "\n"
   64668             :     "Driver_HasOpenOption(Driver self, char const * openOptionName) -> bool\n"
   64669             :     "\n"
   64670             :     "\n"
   64671             :     "Reports whether the driver supports a specified open option.\n"
   64672             :     "\n"
   64673             :     "Parameters\n"
   64674             :     "----------\n"
   64675             :     "openOptionName : str\n"
   64676             :     "   The name of the option to test\n"
   64677             :     "\n"
   64678             :     "Returns\n"
   64679             :     "-------\n"
   64680             :     "bool:\n"
   64681             :     "   ``True``, if the option is supported by this driver, ``False`` otherwise.\n"
   64682             :     "\n"
   64683             :     "Examples\n"
   64684             :     "--------\n"
   64685             :     ">>> gdal.GetDriverByName('GPKG').HasOpenOption('PRELUDE_STATEMENTS')\n"
   64686             :     "True\n"
   64687             :     ">>> gdal.GetDriverByName('GPKG').HasOpenOption('CLOSING_STATEMENTS')\n"
   64688             :     "False\n"
   64689             :     "\n"
   64690             :     "\n"
   64691             :     ""},
   64692             :    { "Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, "\n"
   64693             :     "Driver_TestCapability(Driver self, char const * cap) -> bool\n"
   64694             :     "\n"
   64695             :     "\n"
   64696             :     "Check whether the driver supports a specified capability\n"
   64697             :     "(:py:const:`ogr.ODrCCreateDataSource` or\n"
   64698             :     ":py:const:`ogr.ODrCDeleteDataSource`)`.\n"
   64699             :     "\n"
   64700             :     "Parameters\n"
   64701             :     "----------\n"
   64702             :     "cap : str\n"
   64703             :     "    The name of the capability to test\n"
   64704             :     "\n"
   64705             :     "Returns\n"
   64706             :     "-------\n"
   64707             :     "bool:\n"
   64708             :     "   ``True`` if the driver supports the capability, ``False`` otherwise.\n"
   64709             :     "\n"
   64710             :     "Examples\n"
   64711             :     "--------\n"
   64712             :     ">>> gdal.GetDriverByName('ESRI Shapefile').TestCapability(ogr.ODrCCreateDataSource)\n"
   64713             :     "True\n"
   64714             :     ">>> gdal.GetDriverByName('GTiff').TestCapability(ogr.ODrCCreateDataSource)\n"
   64715             :     "True\n"
   64716             :     "\n"
   64717             :     "\n"
   64718             :     ""},
   64719             :    { "Driver_Register", _wrap_Driver_Register, METH_O, "\n"
   64720             :     "Driver_Register(Driver self) -> int\n"
   64721             :     "\n"
   64722             :     "Register the driver for use.\n"
   64723             :     "See :cpp:func:`GDALDriverManager::RegisterDriver`.\n"
   64724             :     "\n"
   64725             :     ""},
   64726             :    { "Driver_Deregister", _wrap_Driver_Deregister, METH_O, "\n"
   64727             :     "Driver_Deregister(Driver self)\n"
   64728             :     "\n"
   64729             :     "Deregister the driver.\n"
   64730             :     "See :cpp:func:`GDALDriverManager::DeregisterDriver`.\n"
   64731             :     "\n"
   64732             :     ""},
   64733             :    { "Driver_swigregister", Driver_swigregister, METH_O, NULL},
   64734             :    { "ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, "ColorEntry_c1_set(ColorEntry self, short c1)"},
   64735             :    { "ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_O, "ColorEntry_c1_get(ColorEntry self) -> short"},
   64736             :    { "ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, "ColorEntry_c2_set(ColorEntry self, short c2)"},
   64737             :    { "ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_O, "ColorEntry_c2_get(ColorEntry self) -> short"},
   64738             :    { "ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, "ColorEntry_c3_set(ColorEntry self, short c3)"},
   64739             :    { "ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_O, "ColorEntry_c3_get(ColorEntry self) -> short"},
   64740             :    { "ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, "ColorEntry_c4_set(ColorEntry self, short c4)"},
   64741             :    { "ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_O, "ColorEntry_c4_get(ColorEntry self) -> short"},
   64742             :    { "ColorEntry_swigregister", ColorEntry_swigregister, METH_O, NULL},
   64743             :    { "GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, "GCP_GCPX_set(GCP self, double GCPX)"},
   64744             :    { "GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_O, "GCP_GCPX_get(GCP self) -> double"},
   64745             :    { "GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, "GCP_GCPY_set(GCP self, double GCPY)"},
   64746             :    { "GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_O, "GCP_GCPY_get(GCP self) -> double"},
   64747             :    { "GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, "GCP_GCPZ_set(GCP self, double GCPZ)"},
   64748             :    { "GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_O, "GCP_GCPZ_get(GCP self) -> double"},
   64749             :    { "GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, "GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   64750             :    { "GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_O, "GCP_GCPPixel_get(GCP self) -> double"},
   64751             :    { "GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, "GCP_GCPLine_set(GCP self, double GCPLine)"},
   64752             :    { "GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_O, "GCP_GCPLine_get(GCP self) -> double"},
   64753             :    { "GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, "GCP_Info_set(GCP self, char * Info)"},
   64754             :    { "GCP_Info_get", _wrap_GCP_Info_get, METH_O, "GCP_Info_get(GCP self) -> char *"},
   64755             :    { "GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, "GCP_Id_set(GCP self, char * Id)"},
   64756             :    { "GCP_Id_get", _wrap_GCP_Id_get, METH_O, "GCP_Id_get(GCP self) -> char *"},
   64757             :    { "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"},
   64758             :    { "delete_GCP", _wrap_delete_GCP, METH_O, "delete_GCP(GCP self)"},
   64759             :    { "GCP_swigregister", GCP_swigregister, METH_O, NULL},
   64760             :    { "GCP_swiginit", GCP_swiginit, METH_VARARGS, NULL},
   64761             :    { "GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_O, "GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   64762             :    { "GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, "GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   64763             :    { "GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_O, "GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   64764             :    { "GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, "GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   64765             :    { "GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_O, "GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   64766             :    { "GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, "GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   64767             :    { "GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_O, "GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   64768             :    { "GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, "GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   64769             :    { "GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_O, "GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   64770             :    { "GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, "GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   64771             :    { "GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_O, "GDAL_GCP_Info_get(GCP gcp) -> char const *"},
   64772             :    { "GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, "GDAL_GCP_Info_set(GCP gcp, char const * pszInfo)"},
   64773             :    { "GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_O, "GDAL_GCP_Id_get(GCP gcp) -> char const *"},
   64774             :    { "GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, "GDAL_GCP_Id_set(GCP gcp, char const * pszId)"},
   64775             :    { "GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, "GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE"},
   64776             :    { "GCPsToHomography", _wrap_GCPsToHomography, METH_O, "GCPsToHomography(int nGCPs) -> RETURN_NONE"},
   64777             :    { "delete_VirtualMem", _wrap_delete_VirtualMem, METH_O, "delete_VirtualMem(VirtualMem self)"},
   64778             :    { "VirtualMem_GetAddr", _wrap_VirtualMem_GetAddr, METH_O, "VirtualMem_GetAddr(VirtualMem self)"},
   64779             :    { "VirtualMem_Pin", _wrap_VirtualMem_Pin, METH_VARARGS, "VirtualMem_Pin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0)"},
   64780             :    { "VirtualMem_swigregister", VirtualMem_swigregister, METH_O, NULL},
   64781             :    { "delete_AsyncReader", _wrap_delete_AsyncReader, METH_O, "delete_AsyncReader(AsyncReader self)"},
   64782             :    { "AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, "AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   64783             :    { "AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_O, "AsyncReader_GetBuffer(AsyncReader self)"},
   64784             :    { "AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, "AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   64785             :    { "AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_O, "AsyncReader_UnlockBuffer(AsyncReader self)"},
   64786             :    { "AsyncReader_swigregister", AsyncReader_swigregister, METH_O, NULL},
   64787             :    { "Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_O, "\n"
   64788             :     "Dataset_RasterXSize_get(Dataset self) -> int\n"
   64789             :     "\n"
   64790             :     "\n"
   64791             :     "Raster width in pixels. See :cpp:func:`GDALGetRasterXSize`.\n"
   64792             :     "\n"
   64793             :     "\n"
   64794             :     ""},
   64795             :    { "Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_O, "\n"
   64796             :     "Dataset_RasterYSize_get(Dataset self) -> int\n"
   64797             :     "\n"
   64798             :     "\n"
   64799             :     "Raster height in pixels. See :cpp:func:`GDALGetRasterYSize`.\n"
   64800             :     "\n"
   64801             :     "\n"
   64802             :     ""},
   64803             :    { "Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_O, "\n"
   64804             :     "Dataset_RasterCount_get(Dataset self) -> int\n"
   64805             :     "\n"
   64806             :     "\n"
   64807             :     "The number of bands in this dataset.\n"
   64808             :     "\n"
   64809             :     "\n"
   64810             :     ""},
   64811             :    { "delete_Dataset", _wrap_delete_Dataset, METH_O, "delete_Dataset(Dataset self)"},
   64812             :    { "Dataset_MarkSuppressOnClose", _wrap_Dataset_MarkSuppressOnClose, METH_O, "Dataset_MarkSuppressOnClose(Dataset self)"},
   64813             :    { "Dataset_Close", _wrap_Dataset_Close, METH_O, "\n"
   64814             :     "Dataset_Close(Dataset self) -> CPLErr\n"
   64815             :     "\n"
   64816             :     "Closes opened dataset and releases allocated resources.\n"
   64817             :     "\n"
   64818             :     "This method can be used to force the dataset to close\n"
   64819             :     "when one more references to the dataset are still\n"
   64820             :     "reachable. If :py:meth:`Close` is never called, the dataset will\n"
   64821             :     "be closed automatically during garbage collection.\n"
   64822             :     "\n"
   64823             :     "In most cases, it is preferable to open or create a dataset\n"
   64824             :     "using a context manager instead of calling :py:meth:`Close`\n"
   64825             :     "directly.\n"
   64826             :     "\n"
   64827             :     "\n"
   64828             :     ""},
   64829             :    { "Dataset__RunCloseWithoutDestroying", _wrap_Dataset__RunCloseWithoutDestroying, METH_O, "Dataset__RunCloseWithoutDestroying(Dataset self) -> CPLErr"},
   64830             :    { "Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_O, "\n"
   64831             :     "Dataset_GetDriver(Dataset self) -> Driver\n"
   64832             :     "\n"
   64833             :     "\n"
   64834             :     "Fetch the driver used to open or create this :py:class:`Dataset`.\n"
   64835             :     "\n"
   64836             :     "\n"
   64837             :     ""},
   64838             :    { "Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, "\n"
   64839             :     "Dataset_GetRasterBand(Dataset self, int nBand) -> Band\n"
   64840             :     "\n"
   64841             :     "\n"
   64842             :     "Fetch a :py:class:`Band` band from a :py:class:`Dataset`. See :cpp:func:`GDALGetRasterBand`.\n"
   64843             :     "\n"
   64844             :     "Parameters\n"
   64845             :     "-----------\n"
   64846             :     "nBand : int\n"
   64847             :     "    the index of the band to fetch, from 1 to :py:attr:`RasterCount`\n"
   64848             :     "\n"
   64849             :     "Returns\n"
   64850             :     "--------\n"
   64851             :     "Band:\n"
   64852             :     "    the :py:class:`Band`, or ``None`` on error.\n"
   64853             :     "\n"
   64854             :     "\n"
   64855             :     ""},
   64856             :    { "Dataset_IsThreadSafe", _wrap_Dataset_IsThreadSafe, METH_VARARGS, "Dataset_IsThreadSafe(Dataset self, int nScopeFlags) -> bool"},
   64857             :    { "Dataset_GetThreadSafeDataset", _wrap_Dataset_GetThreadSafeDataset, METH_VARARGS, "Dataset_GetThreadSafeDataset(Dataset self, int nScopeFlags) -> Dataset"},
   64858             :    { "Dataset_GetRootGroup", _wrap_Dataset_GetRootGroup, METH_O, "\n"
   64859             :     "Dataset_GetRootGroup(Dataset self) -> Group\n"
   64860             :     "\n"
   64861             :     "\n"
   64862             :     "Return the root :py:class:`Group` of this dataset.\n"
   64863             :     "Only value for multidimensional datasets.\n"
   64864             :     "\n"
   64865             :     "Returns\n"
   64866             :     "-------\n"
   64867             :     "Group\n"
   64868             :     "\n"
   64869             :     "\n"
   64870             :     ""},
   64871             :    { "Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_O, "\n"
   64872             :     "Dataset_GetProjection(Dataset self) -> char const *\n"
   64873             :     "\n"
   64874             :     "\n"
   64875             :     "Return a WKT representation of the dataset spatial reference.\n"
   64876             :     "Equivalent to :py:meth:`GetProjectionRef`.\n"
   64877             :     "\n"
   64878             :     "Returns\n"
   64879             :     "-------\n"
   64880             :     "str\n"
   64881             :     "\n"
   64882             :     "\n"
   64883             :     ""},
   64884             :    { "Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_O, "\n"
   64885             :     "Dataset_GetProjectionRef(Dataset self) -> char const *\n"
   64886             :     "\n"
   64887             :     "\n"
   64888             :     "Return a WKT representation of the dataset spatial reference.\n"
   64889             :     "\n"
   64890             :     "Returns\n"
   64891             :     "-------\n"
   64892             :     "str\n"
   64893             :     "\n"
   64894             :     "\n"
   64895             :     ""},
   64896             :    { "Dataset_GetRefCount", _wrap_Dataset_GetRefCount, METH_O, "Dataset_GetRefCount(Dataset self) -> int"},
   64897             :    { "Dataset_GetSummaryRefCount", _wrap_Dataset_GetSummaryRefCount, METH_O, "Dataset_GetSummaryRefCount(Dataset self) -> int"},
   64898             :    { "Dataset_GetSpatialRef", _wrap_Dataset_GetSpatialRef, METH_O, "\n"
   64899             :     "Dataset_GetSpatialRef(Dataset self) -> SpatialReference\n"
   64900             :     "\n"
   64901             :     "\n"
   64902             :     "Fetch the spatial reference for this dataset.\n"
   64903             :     "\n"
   64904             :     "Returns\n"
   64905             :     "--------\n"
   64906             :     "osr.SpatialReference\n"
   64907             :     "\n"
   64908             :     "\n"
   64909             :     ""},
   64910             :    { "Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, "\n"
   64911             :     "Dataset_SetProjection(Dataset self, char const * prj) -> CPLErr\n"
   64912             :     "\n"
   64913             :     "\n"
   64914             :     "Set the spatial reference system for this dataset.\n"
   64915             :     "\n"
   64916             :     "See :cpp:func:`GDALDataset::SetProjection`.\n"
   64917             :     "\n"
   64918             :     "Parameters\n"
   64919             :     "----------\n"
   64920             :     "prj:\n"
   64921             :     "   The projection string in OGC WKT or PROJ.4 format\n"
   64922             :     "\n"
   64923             :     "Returns\n"
   64924             :     "-------\n"
   64925             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64926             :     "\n"
   64927             :     "\n"
   64928             :     ""},
   64929             :    { "Dataset_SetSpatialRef", _wrap_Dataset_SetSpatialRef, METH_VARARGS, "\n"
   64930             :     "Dataset_SetSpatialRef(Dataset self, SpatialReference srs) -> CPLErr\n"
   64931             :     "\n"
   64932             :     "\n"
   64933             :     "Set the spatial reference system for this dataset.\n"
   64934             :     "\n"
   64935             :     "Parameters\n"
   64936             :     "----------\n"
   64937             :     "srs : SpatialReference\n"
   64938             :     "\n"
   64939             :     "Returns\n"
   64940             :     "-------\n"
   64941             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64942             :     "\n"
   64943             :     "\n"
   64944             :     ""},
   64945             :    { "Dataset_GetGeoTransform", (PyCFunction)(void(*)(void))_wrap_Dataset_GetGeoTransform, METH_VARARGS|METH_KEYWORDS, "\n"
   64946             :     "Dataset_GetGeoTransform(Dataset self, int * can_return_null=None)\n"
   64947             :     "\n"
   64948             :     "\n"
   64949             :     "Fetch the affine transformation coefficients.\n"
   64950             :     "\n"
   64951             :     "See :cpp:func:`GDALGetGeoTransform`.\n"
   64952             :     "\n"
   64953             :     "Parameters\n"
   64954             :     "-----------\n"
   64955             :     "can_return_null : bool, default=False\n"
   64956             :     "    if ``True``, return ``None`` instead of the default transformation\n"
   64957             :     "    if the transformation for this :py:class:`Dataset` has not been defined.\n"
   64958             :     "\n"
   64959             :     "Returns\n"
   64960             :     "-------\n"
   64961             :     "tuple:\n"
   64962             :     "    a 6-member tuple representing the transformation coefficients\n"
   64963             :     "\n"
   64964             :     "\n"
   64965             :     "\n"
   64966             :     ""},
   64967             :    { "Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, "\n"
   64968             :     "Dataset_SetGeoTransform(Dataset self, double [6] argin) -> CPLErr\n"
   64969             :     "\n"
   64970             :     "\n"
   64971             :     "Set the affine transformation coefficients.\n"
   64972             :     "\n"
   64973             :     "See :py:meth:`GetGeoTransform` for details on the meaning of the coefficients.\n"
   64974             :     "\n"
   64975             :     "Parameters\n"
   64976             :     "----------\n"
   64977             :     "argin : tuple\n"
   64978             :     "\n"
   64979             :     "Returns\n"
   64980             :     "-------\n"
   64981             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64982             :     "\n"
   64983             :     "\n"
   64984             :     ""},
   64985             :    { "Dataset_GetExtent", (PyCFunction)(void(*)(void))_wrap_Dataset_GetExtent, METH_VARARGS|METH_KEYWORDS, "\n"
   64986             :     "Dataset_GetExtent(Dataset self, SpatialReference srs=None)\n"
   64987             :     "\n"
   64988             :     "Get the extent of the dataset.\n"
   64989             :     "\n"
   64990             :     "See :cpp:func:`GDALDataset::GetExtent`\n"
   64991             :     "\n"
   64992             :     ".. versionadded:: 3.12\n"
   64993             :     "\n"
   64994             :     ".. warning:: Check the return order of the bounds.\n"
   64995             :     "\n"
   64996             :     "Parameters\n"
   64997             :     "----------\n"
   64998             :     "srs : osr.SpatialReference, default=None\n"
   64999             :     "   Optional spatial reference in which the bounds should be \n"
   65000             :     "   returned\n"
   65001             :     "\n"
   65002             :     "Returns\n"
   65003             :     "-------\n"
   65004             :     "tuple or None\n"
   65005             :     "    tuple of (minx, maxx, miny, maxy) or None if the extent cannot be\n"
   65006             :     "    determined in the specified spatial reference system\n"
   65007             :     "\n"
   65008             :     "Examples\n"
   65009             :     "--------\n"
   65010             :     ">>> # Get extent in native SRS (NAD27 / UTM 11N)\n"
   65011             :     ">>> with gdal.Open('byte.tif') as ds:\n"
   65012             :     "...     ds.GetExtent()\n"
   65013             :     "(440720.0, 441920.0, 3750120.0, 3751320.0)\n"
   65014             :     "\n"
   65015             :     ">>> # Get extent in US National Atlas Equal Area\n"
   65016             :     ">>> with gdal.Open('byte.tif') as ds:\n"
   65017             :     "...     ds.GetExtent(osr.SpatialReference(epsg=9311))\n"
   65018             :     "... \n"
   65019             :     "(-1621603.0, -1620214.9, -1064263.1, -1062837.1)\n"
   65020             :     "\n"
   65021             :     "See Also\n"
   65022             :     "--------\n"
   65023             :     ":py:meth:`GetExtentWGS84LongLat`\n"
   65024             :     "\n"
   65025             :     "\n"
   65026             :     ""},
   65027             :    { "Dataset_GetExtentWGS84LongLat", _wrap_Dataset_GetExtentWGS84LongLat, METH_O, "\n"
   65028             :     "Dataset_GetExtentWGS84LongLat(Dataset self)\n"
   65029             :     "\n"
   65030             :     "\n"
   65031             :     "Return the extent of the dataset in WGS84, with the x-axis representing\n"
   65032             :     "longitude and the y-axis representing latitude.\n"
   65033             :     "\n"
   65034             :     "See :cpp:func:`GDALDataset::GetExtentWGS84LongLat`\n"
   65035             :     "\n"
   65036             :     ".. versionadded:: 3.12\n"
   65037             :     "\n"
   65038             :     ".. warning:: Check the return order of the bounds.\n"
   65039             :     "\n"
   65040             :     "Returns\n"
   65041             :     "--------\n"
   65042             :     "tuple or None\n"
   65043             :     "    tuple of (minlon, maxlon, minlat, maxlat) or None if the extent cannot be\n"
   65044             :     "    determined in WGS84\n"
   65045             :     "\n"
   65046             :     "Examples\n"
   65047             :     "--------\n"
   65048             :     ">>> with gdal.Open('byte.tif') as ds:\n"
   65049             :     "...     ds.GetExtentWGS84LongLat()\n"
   65050             :     "... \n"
   65051             :     "(-117.642, -117.629, 33.892, 33.902)\n"
   65052             :     "\n"
   65053             :     "See Also\n"
   65054             :     "--------\n"
   65055             :     ":py:meth:`GetExtent`\n"
   65056             :     "\n"
   65057             :     "\n"
   65058             :     "\n"
   65059             :     ""},
   65060             :    { "Dataset_BuildOverviews", (PyCFunction)(void(*)(void))_wrap_Dataset_BuildOverviews, METH_VARARGS|METH_KEYWORDS, "\n"
   65061             :     "Dataset_BuildOverviews(Dataset self, char const * resampling=\"NEAREST\", int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int\n"
   65062             :     "\n"
   65063             :     "\n"
   65064             :     "Build raster overview(s) for all bands.\n"
   65065             :     "\n"
   65066             :     "See :cpp:func:`GDALDataset::BuildOverviews`\n"
   65067             :     "\n"
   65068             :     "Parameters\n"
   65069             :     "----------\n"
   65070             :     "resampling : str, optional\n"
   65071             :     "             The resampling method to use. See :cpp:func:`GDALDataset::BuildOverviews`.\n"
   65072             :     "overviewlist : list\n"
   65073             :     "             A list of overview levels (decimation factors) to build, or an\n"
   65074             :     "             empty list to clear existing overviews.\n"
   65075             :     "callback : function, optional\n"
   65076             :     "             A progress callback function\n"
   65077             :     "callback_data: optional\n"
   65078             :     "             Optional data to be passed to callback function\n"
   65079             :     "options : dict/list, optional\n"
   65080             :     "             A dict or list of key=value options\n"
   65081             :     "\n"
   65082             :     "Returns\n"
   65083             :     "-------\n"
   65084             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   65085             :     "\n"
   65086             :     "Examples\n"
   65087             :     "--------\n"
   65088             :     ">>> import numpy as np\n"
   65089             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 12, 12)\n"
   65090             :     ">>> ds.GetRasterBand(1).WriteArray(np.arange(12*12).reshape((12, 12)))\n"
   65091             :     "0\n"
   65092             :     ">>> ds.BuildOverviews('AVERAGE', [2, 4])\n"
   65093             :     "0\n"
   65094             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   65095             :     "2\n"
   65096             :     ">>> ds.BuildOverviews(overviewlist=[])\n"
   65097             :     "0\n"
   65098             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   65099             :     "0\n"
   65100             :     "\n"
   65101             :     ""},
   65102             :    { "Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_O, "\n"
   65103             :     "Dataset_GetGCPCount(Dataset self) -> int\n"
   65104             :     "\n"
   65105             :     "\n"
   65106             :     "Get number of GCPs. See :cpp:func:`GDALGetGCPCount`.\n"
   65107             :     "\n"
   65108             :     "Returns\n"
   65109             :     "--------\n"
   65110             :     "int\n"
   65111             :     "\n"
   65112             :     "\n"
   65113             :     ""},
   65114             :    { "Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_O, "\n"
   65115             :     "Dataset_GetGCPProjection(Dataset self) -> char const *\n"
   65116             :     "\n"
   65117             :     "\n"
   65118             :     "Return a WKT representation of the GCP spatial reference.\n"
   65119             :     "\n"
   65120             :     "Returns\n"
   65121             :     "--------\n"
   65122             :     "string\n"
   65123             :     "\n"
   65124             :     "\n"
   65125             :     ""},
   65126             :    { "Dataset_GetGCPSpatialRef", _wrap_Dataset_GetGCPSpatialRef, METH_O, "\n"
   65127             :     "Dataset_GetGCPSpatialRef(Dataset self) -> SpatialReference\n"
   65128             :     "\n"
   65129             :     "\n"
   65130             :     "Get output spatial reference system for GCPs.\n"
   65131             :     "\n"
   65132             :     "See :cpp:func:`GDALGetGCPSpatialRef`\n"
   65133             :     "\n"
   65134             :     "\n"
   65135             :     ""},
   65136             :    { "Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_O, "\n"
   65137             :     "Dataset_GetGCPs(Dataset self)\n"
   65138             :     "\n"
   65139             :     "\n"
   65140             :     "Get the GCPs. See :cpp:func:`GDALGetGCPs`.\n"
   65141             :     "\n"
   65142             :     "Returns\n"
   65143             :     "--------\n"
   65144             :     "tuple\n"
   65145             :     "    a tuple of :py:class:`GCP` objects.\n"
   65146             :     "\n"
   65147             :     "\n"
   65148             :     ""},
   65149             :    { "Dataset__SetGCPs", _wrap_Dataset__SetGCPs, METH_VARARGS, "\n"
   65150             :     "Dataset__SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr\n"
   65151             :     "\n"
   65152             :     "\n"
   65153             :     ""},
   65154             :    { "Dataset__SetGCPs2", _wrap_Dataset__SetGCPs2, METH_VARARGS, "Dataset__SetGCPs2(Dataset self, int nGCPs, SpatialReference hSRS) -> CPLErr"},
   65155             :    { "Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_O, "\n"
   65156             :     "Dataset_FlushCache(Dataset self) -> CPLErr\n"
   65157             :     "\n"
   65158             :     "\n"
   65159             :     "Flush all write-cached data to disk.\n"
   65160             :     "\n"
   65161             :     "See :cpp:func:`GDALDataset::FlushCache`.\n"
   65162             :     "\n"
   65163             :     "Returns\n"
   65164             :     "-------\n"
   65165             :     "int\n"
   65166             :     "    `gdal.CE_None` in case of success\n"
   65167             :     "\n"
   65168             :     ""},
   65169             :    { "Dataset_AddBand", (PyCFunction)(void(*)(void))_wrap_Dataset_AddBand, METH_VARARGS|METH_KEYWORDS, "\n"
   65170             :     "Dataset_AddBand(Dataset self, GDALDataType datatype=GDT_Byte, char ** options=None) -> CPLErr\n"
   65171             :     "\n"
   65172             :     "\n"
   65173             :     "Adds a band to a :py:class:`Dataset`.\n"
   65174             :     "\n"
   65175             :     "Not supported by all drivers.\n"
   65176             :     "\n"
   65177             :     "Parameters\n"
   65178             :     "-----------\n"
   65179             :     "datatype: int\n"
   65180             :     "    the data type of the pixels in the new band\n"
   65181             :     "options: dict/list\n"
   65182             :     "    an optional dict or list of format-specific ``NAME=VALUE`` option strings.\n"
   65183             :     "\n"
   65184             :     "Returns\n"
   65185             :     "-------\n"
   65186             :     "int:\n"
   65187             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65188             :     "\n"
   65189             :     "Examples\n"
   65190             :     "--------\n"
   65191             :     ">>> ds=gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   65192             :     ">>> ds.RasterCount\n"
   65193             :     "1\n"
   65194             :     ">>> ds.AddBand(gdal.GDT_Float32)\n"
   65195             :     "0\n"
   65196             :     ">>> ds.RasterCount\n"
   65197             :     "2\n"
   65198             :     "\n"
   65199             :     ""},
   65200             :    { "Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, "\n"
   65201             :     "Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr\n"
   65202             :     "\n"
   65203             :     "\n"
   65204             :     "Adds a mask band to the dataset.\n"
   65205             :     "\n"
   65206             :     "See :cpp:func:`GDALDataset::CreateMaskBand`.\n"
   65207             :     "\n"
   65208             :     "Parameters\n"
   65209             :     "----------\n"
   65210             :     "flags : int\n"
   65211             :     "\n"
   65212             :     "Returns\n"
   65213             :     "-------\n"
   65214             :     "int\n"
   65215             :     "    :py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   65216             :     "\n"
   65217             :     "\n"
   65218             :     ""},
   65219             :    { "Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_O, "\n"
   65220             :     "Dataset_GetFileList(Dataset self) -> char **\n"
   65221             :     "\n"
   65222             :     "\n"
   65223             :     "Returns a list of files believed to be part of this dataset.\n"
   65224             :     "See :cpp:func:`GDALGetFileList`.\n"
   65225             :     "\n"
   65226             :     "\n"
   65227             :     ""},
   65228             :    { "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"},
   65229             :    { "Dataset_AdviseRead", _wrap_Dataset_AdviseRead, METH_VARARGS, "\n"
   65230             :     "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"
   65231             :     "\n"
   65232             :     "\n"
   65233             :     "Advise driver of upcoming read requests.\n"
   65234             :     "\n"
   65235             :     "See :cpp:func:`GDALDataset::AdviseRead`.\n"
   65236             :     "\n"
   65237             :     "\n"
   65238             :     ""},
   65239             :    { "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"},
   65240             :    { "Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, "Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   65241             :    { "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"},
   65242             :    { "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"},
   65243             :    { "Dataset_CreateLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CreateLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   65244             :     "Dataset_CreateLayer(Dataset self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer\n"
   65245             :     "\n"
   65246             :     "\n"
   65247             :     "Create a new layer in a vector Dataset.\n"
   65248             :     "\n"
   65249             :     "Parameters\n"
   65250             :     "----------\n"
   65251             :     "name : string\n"
   65252             :     "       the name for the new layer.  This should ideally not\n"
   65253             :     "       match any existing layer on the datasource.\n"
   65254             :     "srs : osr.SpatialReference, default=None\n"
   65255             :     "      the coordinate system to use for the new layer, or ``None`` if\n"
   65256             :     "      no coordinate system is available.\n"
   65257             :     "geom_type : int, default = :py:const:`ogr.wkbUnknown`\n"
   65258             :     "      geometry type for the layer.  Use :py:const:`ogr.wkbUnknown` if there\n"
   65259             :     "      are no constraints on the types geometry to be written.\n"
   65260             :     "options : dict/list, optional\n"
   65261             :     "      Driver-specific dict or list of name=value options\n"
   65262             :     "\n"
   65263             :     "Returns\n"
   65264             :     "-------\n"
   65265             :     "ogr.Layer or ``None`` on failure.\n"
   65266             :     "\n"
   65267             :     "\n"
   65268             :     "Examples\n"
   65269             :     "--------\n"
   65270             :     ">>> ds = gdal.GetDriverByName('GPKG').Create('test.gpkg', 0, 0)\n"
   65271             :     ">>> ds.GetLayerCount()\n"
   65272             :     "0\n"
   65273             :     ">>> lyr = ds.CreateLayer('poly', geom_type=ogr.wkbPolygon)\n"
   65274             :     ">>> ds.GetLayerCount()\n"
   65275             :     "1\n"
   65276             :     "\n"
   65277             :     "\n"
   65278             :     ""},
   65279             :    { "Dataset_CreateLayerFromGeomFieldDefn", _wrap_Dataset_CreateLayerFromGeomFieldDefn, METH_VARARGS, "Dataset_CreateLayerFromGeomFieldDefn(Dataset self, char const * name, GeomFieldDefn geom_field, char ** options=None) -> Layer"},
   65280             :    { "Dataset_CopyLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CopyLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   65281             :     "Dataset_CopyLayer(Dataset self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\n"
   65282             :     "\n"
   65283             :     "\n"
   65284             :     "Duplicate an existing :py:class:`ogr.Layer`.\n"
   65285             :     "\n"
   65286             :     "See :cpp:func:`GDALDataset::CopyLayer`.\n"
   65287             :     "\n"
   65288             :     "Parameters\n"
   65289             :     "----------\n"
   65290             :     "src_layer : ogr.Layer\n"
   65291             :     "            source layer\n"
   65292             :     "new_name : str\n"
   65293             :     "           name of the layer to create\n"
   65294             :     "options : dict/list\n"
   65295             :     "          a dict or list of name=value driver-specific creation options\n"
   65296             :     "\n"
   65297             :     "Returns\n"
   65298             :     "-------\n"
   65299             :     "ogr.Layer, or ``None`` if an error occurs\n"
   65300             :     "\n"
   65301             :     ""},
   65302             :    { "Dataset_DeleteLayer", _wrap_Dataset_DeleteLayer, METH_VARARGS, "Dataset_DeleteLayer(Dataset self, int index) -> OGRErr"},
   65303             :    { "Dataset_IsLayerPrivate", _wrap_Dataset_IsLayerPrivate, METH_VARARGS, "\n"
   65304             :     "Dataset_IsLayerPrivate(Dataset self, int index) -> bool\n"
   65305             :     "\n"
   65306             :     "\n"
   65307             :     "Parameters\n"
   65308             :     "----------\n"
   65309             :     "index : int\n"
   65310             :     "        Index o layer to check\n"
   65311             :     "\n"
   65312             :     "Returns\n"
   65313             :     "-------\n"
   65314             :     "bool\n"
   65315             :     "     ``True`` if the layer is a private or system table, ``False`` otherwise\n"
   65316             :     "\n"
   65317             :     "\n"
   65318             :     "\n"
   65319             :     ""},
   65320             :    { "Dataset_GetNextFeature", (PyCFunction)(void(*)(void))_wrap_Dataset_GetNextFeature, METH_VARARGS|METH_KEYWORDS, "\n"
   65321             :     "Dataset_GetNextFeature(Dataset self, bool include_layer=True, bool include_pct=False, GDALProgressFunc callback=0, void * callback_data=None) -> Feature\n"
   65322             :     "\n"
   65323             :     "\n"
   65324             :     "Fetch the next available feature from this dataset.\n"
   65325             :     "\n"
   65326             :     "This method is intended for the few drivers where\n"
   65327             :     ":py:meth:`OGRLayer.GetNextFeature` is not efficient, but in general\n"
   65328             :     ":py:meth:`OGRLayer.GetNextFeature` is a more natural API.\n"
   65329             :     "\n"
   65330             :     "See :cpp:func:`GDALDataset::GetNextFeature`.\n"
   65331             :     "\n"
   65332             :     "Returns\n"
   65333             :     "-------\n"
   65334             :     "ogr.Feature\n"
   65335             :     "\n"
   65336             :     "\n"
   65337             :     ""},
   65338             :    { "Dataset_TestCapability", _wrap_Dataset_TestCapability, METH_VARARGS, "\n"
   65339             :     "Dataset_TestCapability(Dataset self, char const * cap) -> bool\n"
   65340             :     "\n"
   65341             :     "\n"
   65342             :     "Test if a capability is available.\n"
   65343             :     "\n"
   65344             :     "Parameters\n"
   65345             :     "----------\n"
   65346             :     "cap : str\n"
   65347             :     "   Name of the capability (e.g., :py:const:`ogr.ODsCTransactions`)\n"
   65348             :     "\n"
   65349             :     "Returns\n"
   65350             :     "-------\n"
   65351             :     "bool\n"
   65352             :     "    ``True`` if the capability is available, ``False`` if invalid or unavailable\n"
   65353             :     "\n"
   65354             :     "Examples\n"
   65355             :     "--------\n"
   65356             :     ">>> ds = gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown)\n"
   65357             :     ">>> ds.TestCapability(ogr.ODsCTransactions)\n"
   65358             :     "False\n"
   65359             :     ">>> ds.TestCapability(ogr.ODsCMeasuredGeometries)\n"
   65360             :     "True\n"
   65361             :     ">>> ds.TestCapability(gdal.GDsCAddRelationship)\n"
   65362             :     "False\n"
   65363             :     "\n"
   65364             :     "\n"
   65365             :     ""},
   65366             :    { "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"},
   65367             :    { "Dataset_ReleaseResultSet", _wrap_Dataset_ReleaseResultSet, METH_VARARGS, "Dataset_ReleaseResultSet(Dataset self, Layer layer)"},
   65368             :    { "Dataset_GetStyleTable", _wrap_Dataset_GetStyleTable, METH_O, "\n"
   65369             :     "Dataset_GetStyleTable(Dataset self) -> StyleTable\n"
   65370             :     "\n"
   65371             :     "\n"
   65372             :     "Returns dataset style table.\n"
   65373             :     "\n"
   65374             :     "Returns\n"
   65375             :     "-------\n"
   65376             :     "ogr.StyleTable\n"
   65377             :     "\n"
   65378             :     "\n"
   65379             :     ""},
   65380             :    { "Dataset_SetStyleTable", _wrap_Dataset_SetStyleTable, METH_VARARGS, "\n"
   65381             :     "Dataset_SetStyleTable(Dataset self, StyleTable table)\n"
   65382             :     "\n"
   65383             :     "\n"
   65384             :     "Set dataset style table\n"
   65385             :     "\n"
   65386             :     "Parameters\n"
   65387             :     "----------\n"
   65388             :     "table : ogr.StyleTable\n"
   65389             :     "\n"
   65390             :     ""},
   65391             :    { "Dataset_GetLayerByIndex", _wrap_Dataset_GetLayerByIndex, METH_VARARGS, "\n"
   65392             :     "Dataset_GetLayerByIndex(Dataset self, int index=0) -> Layer\n"
   65393             :     "\n"
   65394             :     "\n"
   65395             :     "Fetch a layer by index.\n"
   65396             :     "\n"
   65397             :     "Parameters\n"
   65398             :     "----------\n"
   65399             :     "index : int\n"
   65400             :     "    A layer number between 0 and ``GetLayerCount() - 1``\n"
   65401             :     "\n"
   65402             :     "Returns\n"
   65403             :     "-------\n"
   65404             :     "ogr.Layer\n"
   65405             :     "\n"
   65406             :     "\n"
   65407             :     ""},
   65408             :    { "Dataset_GetLayerByName", _wrap_Dataset_GetLayerByName, METH_VARARGS, "Dataset_GetLayerByName(Dataset self, char const * layer_name) -> Layer"},
   65409             :    { "Dataset_ResetReading", _wrap_Dataset_ResetReading, METH_O, "\n"
   65410             :     "Dataset_ResetReading(Dataset self)\n"
   65411             :     "\n"
   65412             :     "\n"
   65413             :     "Reset feature reading to start on the first feature.\n"
   65414             :     "\n"
   65415             :     "This affects :py:meth:`GetNextFeature`.\n"
   65416             :     "\n"
   65417             :     "Depending on drivers, this may also have the side effect of calling\n"
   65418             :     ":py:meth:`OGRLayer.ResetReading` on the layers of this dataset.\n"
   65419             :     "\n"
   65420             :     "\n"
   65421             :     ""},
   65422             :    { "Dataset_GetLayerCount", _wrap_Dataset_GetLayerCount, METH_O, "\n"
   65423             :     "Dataset_GetLayerCount(Dataset self) -> int\n"
   65424             :     "\n"
   65425             :     "\n"
   65426             :     "Get the number of layers in this dataset.\n"
   65427             :     "\n"
   65428             :     "Returns\n"
   65429             :     "-------\n"
   65430             :     "int\n"
   65431             :     "\n"
   65432             :     "\n"
   65433             :     ""},
   65434             :    { "Dataset_AbortSQL", _wrap_Dataset_AbortSQL, METH_O, "\n"
   65435             :     "Dataset_AbortSQL(Dataset self) -> OGRErr\n"
   65436             :     "\n"
   65437             :     "\n"
   65438             :     "Abort any SQL statement running in the data store.\n"
   65439             :     "\n"
   65440             :     "Not implemented by all drivers. See :cpp:func:`GDALDataset::AbortSQL`.\n"
   65441             :     "\n"
   65442             :     "Returns\n"
   65443             :     "-------\n"
   65444             :     ":py:const:`ogr.OGRERR_NONE` on success or :py:const:`ogr.OGRERR_UNSUPPORTED_OPERATION` if AbortSQL is not supported for this dataset.\n"
   65445             :     "\n"
   65446             :     ""},
   65447             :    { "Dataset_StartTransaction", (PyCFunction)(void(*)(void))_wrap_Dataset_StartTransaction, METH_VARARGS|METH_KEYWORDS, "\n"
   65448             :     "Dataset_StartTransaction(Dataset self, int force=FALSE) -> OGRErr\n"
   65449             :     "\n"
   65450             :     "\n"
   65451             :     "Creates a transaction. See :cpp:func:`GDALDataset::StartTransaction`.\n"
   65452             :     "\n"
   65453             :     "Returns\n"
   65454             :     "-------\n"
   65455             :     "int\n"
   65456             :     "    If starting the transaction fails, will return\n"
   65457             :     "    :py:const:`ogr.OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   65458             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   65459             :     "\n"
   65460             :     "\n"
   65461             :     ""},
   65462             :    { "Dataset_CommitTransaction", _wrap_Dataset_CommitTransaction, METH_O, "\n"
   65463             :     "Dataset_CommitTransaction(Dataset self) -> OGRErr\n"
   65464             :     "\n"
   65465             :     "Commits a transaction, for `Datasets` that support transactions.\n"
   65466             :     "\n"
   65467             :     "See :cpp:func:`GDALDataset::CommitTransaction`.\n"
   65468             :     "\n"
   65469             :     ""},
   65470             :    { "Dataset_RollbackTransaction", _wrap_Dataset_RollbackTransaction, METH_O, "\n"
   65471             :     "Dataset_RollbackTransaction(Dataset self) -> OGRErr\n"
   65472             :     "\n"
   65473             :     "\n"
   65474             :     "Roll back a Dataset to its state before the start of the current transaction.\n"
   65475             :     "\n"
   65476             :     "For datasets that support transactions.\n"
   65477             :     "\n"
   65478             :     "Returns\n"
   65479             :     "-------\n"
   65480             :     "int\n"
   65481             :     "    If no transaction is active, or the rollback fails, will return\n"
   65482             :     "    :py:const:`OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   65483             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   65484             :     "\n"
   65485             :     "\n"
   65486             :     ""},
   65487             :    { "Dataset_ClearStatistics", _wrap_Dataset_ClearStatistics, METH_O, "\n"
   65488             :     "Dataset_ClearStatistics(Dataset self)\n"
   65489             :     "\n"
   65490             :     "\n"
   65491             :     "Clear statistics\n"
   65492             :     "\n"
   65493             :     "See :cpp:func:`GDALDataset::ClearStatistics`.\n"
   65494             :     "\n"
   65495             :     "\n"
   65496             :     ""},
   65497             :    { "Dataset_GetFieldDomainNames", _wrap_Dataset_GetFieldDomainNames, METH_VARARGS, "\n"
   65498             :     "Dataset_GetFieldDomainNames(Dataset self, char ** options=None) -> char **\n"
   65499             :     "\n"
   65500             :     "\n"
   65501             :     "Get a list of the names of all field domains stored in the dataset.\n"
   65502             :     "\n"
   65503             :     "Parameters\n"
   65504             :     "----------\n"
   65505             :     "options: dict/list, optional\n"
   65506             :     "         Driver-specific options determining how attributes should\n"
   65507             :     "         be retrieved.\n"
   65508             :     "\n"
   65509             :     "Returns\n"
   65510             :     "-------\n"
   65511             :     "list, or ``None`` if no field domains are stored in the dataset.\n"
   65512             :     "\n"
   65513             :     ""},
   65514             :    { "Dataset_GetFieldDomain", _wrap_Dataset_GetFieldDomain, METH_VARARGS, "\n"
   65515             :     "Dataset_GetFieldDomain(Dataset self, char const * name) -> FieldDomain\n"
   65516             :     "\n"
   65517             :     "\n"
   65518             :     "Get a field domain from its name.\n"
   65519             :     "\n"
   65520             :     "Parameters\n"
   65521             :     "----------\n"
   65522             :     "name: str\n"
   65523             :     "      The name of the field domain\n"
   65524             :     "\n"
   65525             :     "Returns\n"
   65526             :     "-------\n"
   65527             :     "ogr.FieldDomain, or ``None`` if it is not found.\n"
   65528             :     "\n"
   65529             :     ""},
   65530             :    { "Dataset_AddFieldDomain", _wrap_Dataset_AddFieldDomain, METH_VARARGS, "\n"
   65531             :     "Dataset_AddFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   65532             :     "\n"
   65533             :     "\n"
   65534             :     "Add a :py:class:`ogr.FieldDomain` to the dataset.\n"
   65535             :     "\n"
   65536             :     "Only a few drivers support this operation. See :cpp:func:`GDALDataset::AddFieldDomain`.\n"
   65537             :     "\n"
   65538             :     "Parameters\n"
   65539             :     "----------\n"
   65540             :     "fieldDomain : ogr.FieldDomain\n"
   65541             :     "              The field domain to add\n"
   65542             :     "\n"
   65543             :     "Returns\n"
   65544             :     "--------\n"
   65545             :     "bool:\n"
   65546             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   65547             :     "\n"
   65548             :     "\n"
   65549             :     "\n"
   65550             :     ""},
   65551             :    { "Dataset_DeleteFieldDomain", _wrap_Dataset_DeleteFieldDomain, METH_VARARGS, "\n"
   65552             :     "Dataset_DeleteFieldDomain(Dataset self, char const * name) -> bool\n"
   65553             :     "\n"
   65554             :     "\n"
   65555             :     "Removes a field domain from the Dataset.\n"
   65556             :     "\n"
   65557             :     "Parameters\n"
   65558             :     "----------\n"
   65559             :     "name : str\n"
   65560             :     "       Name of the field domain to delete\n"
   65561             :     "\n"
   65562             :     "Returns\n"
   65563             :     "-------\n"
   65564             :     "bool\n"
   65565             :     "     ``True`` if the field domain was removed, otherwise ``False``.\n"
   65566             :     "\n"
   65567             :     "\n"
   65568             :     ""},
   65569             :    { "Dataset_UpdateFieldDomain", _wrap_Dataset_UpdateFieldDomain, METH_VARARGS, "\n"
   65570             :     "Dataset_UpdateFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   65571             :     "\n"
   65572             :     "\n"
   65573             :     "Update an existing field domain by replacing its definition.\n"
   65574             :     "\n"
   65575             :     "The existing field domain with matching name will be replaced.\n"
   65576             :     "\n"
   65577             :     "Requires the :py:const:`ogr.ODsCUpdateFieldDomain` datasset capability.\n"
   65578             :     "\n"
   65579             :     "Parameters\n"
   65580             :     "----------\n"
   65581             :     "fieldDomain : ogr.FieldDomain\n"
   65582             :     "    Updated field domain.\n"
   65583             :     "\n"
   65584             :     "Returns\n"
   65585             :     "-------\n"
   65586             :     "bool\n"
   65587             :     "    ``True`` in case of success\n"
   65588             :     "\n"
   65589             :     "\n"
   65590             :     ""},
   65591             :    { "Dataset_GetRelationshipNames", _wrap_Dataset_GetRelationshipNames, METH_VARARGS, "\n"
   65592             :     "Dataset_GetRelationshipNames(Dataset self, char ** options=None) -> char **\n"
   65593             :     "\n"
   65594             :     "\n"
   65595             :     "Get a list of the names of all relationships stored in the dataset.\n"
   65596             :     "\n"
   65597             :     "Parameters\n"
   65598             :     "----------\n"
   65599             :     "options : dict/list, optional\n"
   65600             :     "    driver-specific options determining how the relationships should be retrieved\n"
   65601             :     "\n"
   65602             :     "\n"
   65603             :     ""},
   65604             :    { "Dataset_GetRelationship", _wrap_Dataset_GetRelationship, METH_VARARGS, "\n"
   65605             :     "Dataset_GetRelationship(Dataset self, char const * name) -> Relationship\n"
   65606             :     "\n"
   65607             :     "\n"
   65608             :     "Get a relationship from its name.\n"
   65609             :     "\n"
   65610             :     "Returns\n"
   65611             :     "-------\n"
   65612             :     "Relationship, or ``None`` if not found.\n"
   65613             :     "\n"
   65614             :     ""},
   65615             :    { "Dataset_AddRelationship", _wrap_Dataset_AddRelationship, METH_VARARGS, "\n"
   65616             :     "Dataset_AddRelationship(Dataset self, Relationship relationship) -> bool\n"
   65617             :     "\n"
   65618             :     "\n"
   65619             :     "Add a :py:class:`Relationship` to the dataset.\n"
   65620             :     "\n"
   65621             :     "See :cpp:func:`GDALDataset::AddRelationship`.\n"
   65622             :     "\n"
   65623             :     "Parameters\n"
   65624             :     "----------\n"
   65625             :     "relationship : Relationship\n"
   65626             :     "               The relationship to add\n"
   65627             :     "\n"
   65628             :     "Returns\n"
   65629             :     "-------\n"
   65630             :     "bool:\n"
   65631             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   65632             :     "\n"
   65633             :     "\n"
   65634             :     ""},
   65635             :    { "Dataset_DeleteRelationship", _wrap_Dataset_DeleteRelationship, METH_VARARGS, "\n"
   65636             :     "Dataset_DeleteRelationship(Dataset self, char const * name) -> bool\n"
   65637             :     "\n"
   65638             :     "\n"
   65639             :     "Removes a relationship from the Dataset.\n"
   65640             :     "\n"
   65641             :     "Parameters\n"
   65642             :     "----------\n"
   65643             :     "name : str\n"
   65644             :     "       Name of the relationship to remove.\n"
   65645             :     "\n"
   65646             :     "Returns\n"
   65647             :     "-------\n"
   65648             :     "bool\n"
   65649             :     "     ``True`` if the relationship  was removed, otherwise ``False``.\n"
   65650             :     "\n"
   65651             :     "\n"
   65652             :     "\n"
   65653             :     ""},
   65654             :    { "Dataset_UpdateRelationship", _wrap_Dataset_UpdateRelationship, METH_VARARGS, "\n"
   65655             :     "Dataset_UpdateRelationship(Dataset self, Relationship relationship) -> bool\n"
   65656             :     "\n"
   65657             :     "\n"
   65658             :     "Update an existing relationship by replacing its definition.\n"
   65659             :     "\n"
   65660             :     "The existing relationship with matching name will be replaced.\n"
   65661             :     "\n"
   65662             :     "Requires the :py:const:`gdal.GDsCUpdateFieldDomain` dataset capability.\n"
   65663             :     "\n"
   65664             :     "Parameters\n"
   65665             :     "----------\n"
   65666             :     "relationship : Relationship\n"
   65667             :     "    Updated relationship\n"
   65668             :     "\n"
   65669             :     "Returns\n"
   65670             :     "-------\n"
   65671             :     "bool\n"
   65672             :     "    ``True`` in case of success\n"
   65673             :     "\n"
   65674             :     "\n"
   65675             :     ""},
   65676             :    { "Dataset_AsMDArray", _wrap_Dataset_AsMDArray, METH_VARARGS, "Dataset_AsMDArray(Dataset self, char ** options=None) -> MDArray"},
   65677             :    { "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"},
   65678             :    { "Dataset_swigregister", Dataset_swigregister, METH_O, NULL},
   65679             :    { "new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_NOARGS, "new_RasterAttributeTable() -> RasterAttributeTable"},
   65680             :    { "delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_O, "delete_RasterAttributeTable(RasterAttributeTable self)"},
   65681             :    { "RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_O, "\n"
   65682             :     "RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable\n"
   65683             :     "\n"
   65684             :     "\n"
   65685             :     "Create a copy of the RAT.\n"
   65686             :     "\n"
   65687             :     "Returns\n"
   65688             :     "-------\n"
   65689             :     "GDALRasterAttributeTable\n"
   65690             :     "\n"
   65691             :     "\n"
   65692             :     ""},
   65693             :    { "RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_O, "\n"
   65694             :     "RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int\n"
   65695             :     "\n"
   65696             :     "\n"
   65697             :     "Return the number of columns in the RAT. \n"
   65698             :     "\n"
   65699             :     "See :cpp:func:`GDALRasterAttributeTable::GetColumnCount`.\n"
   65700             :     "\n"
   65701             :     "Returns\n"
   65702             :     "-------\n"
   65703             :     "int\n"
   65704             :     "    The number of columns in the RAT\n"
   65705             :     "\n"
   65706             :     "Examples\n"
   65707             :     "--------\n"
   65708             :     ">>> with gdal.Open('testrat.tif') as ds:\n"
   65709             :     "...     ds.GetRasterBand(1).GetDefaultRAT().GetColumnCount()\n"
   65710             :     "... \n"
   65711             :     "9\n"
   65712             :     "\n"
   65713             :     "\n"
   65714             :     ""},
   65715             :    { "RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, "\n"
   65716             :     "RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char const *\n"
   65717             :     "\n"
   65718             :     "\n"
   65719             :     "Get the name of a specified column (0-indexed).\n"
   65720             :     "\n"
   65721             :     "See :cpp:func:`GDALRasterAttributeTable::GetNameOfCol`.\n"
   65722             :     "\n"
   65723             :     "Parameters\n"
   65724             :     "----------\n"
   65725             :     "iCol : int\n"
   65726             :     "    The index of the column (starting at 0)\n"
   65727             :     "\n"
   65728             :     "Returns\n"
   65729             :     "-------\n"
   65730             :     "str\n"
   65731             :     "    The name of the column\n"
   65732             :     "\n"
   65733             :     "Examples\n"
   65734             :     "--------\n"
   65735             :     ">>> ds = gdal.Open('testrat.tif')\n"
   65736             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65737             :     ">>> [rat.GetNameOfCol(i) for i in range(rat.GetColumnCount())]\n"
   65738             :     "['VALUE', 'COUNT', 'CLASS', 'Red', 'Green', 'Blue', 'OtherInt', 'OtherReal', 'OtherStr']\n"
   65739             :     "\n"
   65740             :     "\n"
   65741             :     ""},
   65742             :    { "RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, "\n"
   65743             :     "RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage\n"
   65744             :     "\n"
   65745             :     "\n"
   65746             :     "Return the usage of a column in the RAT.\n"
   65747             :     "\n"
   65748             :     "See :cpp:func:`GDALRasterAttributeTable::GetUsageOfCol`.\n"
   65749             :     "\n"
   65750             :     "Parameters\n"
   65751             :     "----------\n"
   65752             :     "iCol : int\n"
   65753             :     "    The index of the column (starting at 0)\n"
   65754             :     "\n"
   65755             :     "Returns\n"
   65756             :     "-------\n"
   65757             :     "int\n"
   65758             :     "    Usage code for the specified column\n"
   65759             :     "\n"
   65760             :     "Examples\n"
   65761             :     "--------\n"
   65762             :     ">>> ds = gdal.Open('testrat.tif')\n"
   65763             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65764             :     ">>> [rat.GetUsageOfCol(i) for i in range(rat.GetColumnCount())]\n"
   65765             :     "[5, 1, 2, 6, 7, 8, 0, 0, 0]\n"
   65766             :     ">>> [rat.GetUsageOfCol(i) == gdal.GFU_Red for i in range(rat.GetColumnCount())]\n"
   65767             :     "[False, False, False, True, False, False, False, False, False]\n"
   65768             :     "\n"
   65769             :     "\n"
   65770             :     ""},
   65771             :    { "RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, "\n"
   65772             :     "RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType\n"
   65773             :     "\n"
   65774             :     "\n"
   65775             :     "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"
   65776             :     "\n"
   65777             :     "See :cpp:func:`GDALRasterAttributeTable::GetTypeOfCol`.\n"
   65778             :     "\n"
   65779             :     "Parameters\n"
   65780             :     "----------\n"
   65781             :     "iCol : int\n"
   65782             :     "    The index of the column (starting at 0)\n"
   65783             :     "\n"
   65784             :     "Returns\n"
   65785             :     "-------\n"
   65786             :     "int\n"
   65787             :     "    type code for the specified column\n"
   65788             :     "\n"
   65789             :     "Examples\n"
   65790             :     "--------\n"
   65791             :     ">>> ds = gdal.Open('testrat.tif')\n"
   65792             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65793             :     ">>> rat.GetTypeOfCol(2) == gdal.GFT_String\n"
   65794             :     "True\n"
   65795             :     "\n"
   65796             :     "\n"
   65797             :     ""},
   65798             :    { "RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, "\n"
   65799             :     "RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int\n"
   65800             :     "\n"
   65801             :     "\n"
   65802             :     "Return the first column of a specified usage the a RAT.\n"
   65803             :     "\n"
   65804             :     "See :cpp:func:`GDALRasterAttributeTable::GetColOfUsage`.\n"
   65805             :     "\n"
   65806             :     "Parameters\n"
   65807             :     "----------\n"
   65808             :     "eUsage : int\n"
   65809             :     "    Usage code such as :py:const:`gdal.GFU_Red`.\n"
   65810             :     "\n"
   65811             :     "Returns\n"
   65812             :     "-------\n"
   65813             :     "int\n"
   65814             :     "    Index of the column, or -1 if no such column can be found.\n"
   65815             :     "\n"
   65816             :     "Examples\n"
   65817             :     "--------\n"
   65818             :     ">>> ds = gdal.Open('testrat.tif')\n"
   65819             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65820             :     ">>> rat.GetColOfUsage(gdal.GFU_Name)\n"
   65821             :     "2\n"
   65822             :     ">>> rat.GetColOfUsage(gdal.GFU_RedMin)\n"
   65823             :     "-1\n"
   65824             :     "\n"
   65825             :     "\n"
   65826             :     ""},
   65827             :    { "RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_O, "\n"
   65828             :     "RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int\n"
   65829             :     "\n"
   65830             :     "\n"
   65831             :     "Return the number of rows in the RAT. \n"
   65832             :     "\n"
   65833             :     "See :cpp:func:`GDALRasterAttributeTable::GetRowCount`.\n"
   65834             :     "\n"
   65835             :     "Returns\n"
   65836             :     "-------\n"
   65837             :     "int\n"
   65838             :     "    The number of rows in the RAT\n"
   65839             :     "\n"
   65840             :     "Examples\n"
   65841             :     "--------\n"
   65842             :     ">>> with gdal.Open('testrat.tif') as ds:\n"
   65843             :     "...     ds.GetRasterBand(1).GetDefaultRAT().GetRowCount()\n"
   65844             :     "... \n"
   65845             :     "2\n"
   65846             :     "\n"
   65847             :     "\n"
   65848             :     ""},
   65849             :    { "RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, "\n"
   65850             :     "RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *\n"
   65851             :     "\n"
   65852             :     "\n"
   65853             :     "Get the value of a single cell in the RAT.\n"
   65854             :     "\n"
   65855             :     "Parameters\n"
   65856             :     "----------\n"
   65857             :     "iRow : int\n"
   65858             :     "    Row index (0-based)\n"
   65859             :     "iCol : int\n"
   65860             :     "    Column index (0-based)\n"
   65861             :     "\n"
   65862             :     ""},
   65863             :    { "RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, "\n"
   65864             :     "RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int\n"
   65865             :     "\n"
   65866             :     "\n"
   65867             :     "Get the value of a single cell in the RAT.\n"
   65868             :     "\n"
   65869             :     "Parameters\n"
   65870             :     "----------\n"
   65871             :     "iRow : int\n"
   65872             :     "    Row index (0-based)\n"
   65873             :     "iCol : int\n"
   65874             :     "    Column index (0-based)\n"
   65875             :     "\n"
   65876             :     ""},
   65877             :    { "RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, "\n"
   65878             :     "RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double\n"
   65879             :     "\n"
   65880             :     "\n"
   65881             :     "Get the value of a single cell in the RAT.\n"
   65882             :     "\n"
   65883             :     "Parameters\n"
   65884             :     "----------\n"
   65885             :     "iRow : int\n"
   65886             :     "    Row index (0-based)\n"
   65887             :     "iCol : int\n"
   65888             :     "    Column index (0-based)\n"
   65889             :     "\n"
   65890             :     ""},
   65891             :    { "RasterAttributeTable_ReadValuesIOAsString", _wrap_RasterAttributeTable_ReadValuesIOAsString, METH_VARARGS, "\n"
   65892             :     "RasterAttributeTable_ReadValuesIOAsString(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
   65893             :     "\n"
   65894             :     "\n"
   65895             :     "Read a single column of a RAT into a list of strings.\n"
   65896             :     "\n"
   65897             :     "Parameters\n"
   65898             :     "----------\n"
   65899             :     "iField : int\n"
   65900             :     "    The index of the column (starting at 0)\n"
   65901             :     "iStartRow : int, default = 0\n"
   65902             :     "    The index of the first row to read (starting at 0)\n"
   65903             :     "iLength : int, default = None\n"
   65904             :     "    The number of rows to read \n"
   65905             :     "\n"
   65906             :     "Returns\n"
   65907             :     "-------\n"
   65908             :     "list\n"
   65909             :     "\n"
   65910             :     "Examples\n"
   65911             :     "--------\n"
   65912             :     ">>> ds = gdal.Open('testrat.tif')\n"
   65913             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65914             :     ">>> rat.ReadValuesIOAsString(2, 0, 2)\n"
   65915             :     "['my class', 'my class2']\n"
   65916             :     "\n"
   65917             :     "See Also\n"
   65918             :     "--------\n"
   65919             :     ":py:meth:`ReadAsArray`\n"
   65920             :     "\n"
   65921             :     "\n"
   65922             :     ""},
   65923             :    { "RasterAttributeTable_ReadValuesIOAsInteger", _wrap_RasterAttributeTable_ReadValuesIOAsInteger, METH_VARARGS, "\n"
   65924             :     "RasterAttributeTable_ReadValuesIOAsInteger(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
   65925             :     "\n"
   65926             :     "\n"
   65927             :     "Read a single column of a RAT into a list of ints.\n"
   65928             :     "\n"
   65929             :     "Parameters\n"
   65930             :     "----------\n"
   65931             :     "iField : int\n"
   65932             :     "    The index of the column (starting at 0)\n"
   65933             :     "iStartRow : int, default = 0\n"
   65934             :     "    The index of the first row to read (starting at 0)\n"
   65935             :     "iLength : int, default = None\n"
   65936             :     "    The number of rows to read \n"
   65937             :     "\n"
   65938             :     "Returns\n"
   65939             :     "-------\n"
   65940             :     "list\n"
   65941             :     "\n"
   65942             :     "Examples\n"
   65943             :     "--------\n"
   65944             :     ">>> ds = gdal.Open('testrat.tif')\n"
   65945             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65946             :     ">>> rat.ReadValuesIOAsInteger(3, 0, 2)\n"
   65947             :     "[26, 26]\n"
   65948             :     "\n"
   65949             :     "See Also\n"
   65950             :     "--------\n"
   65951             :     ":py:meth:`ReadAsArray`\n"
   65952             :     "\n"
   65953             :     "\n"
   65954             :     ""},
   65955             :    { "RasterAttributeTable_ReadValuesIOAsDouble", _wrap_RasterAttributeTable_ReadValuesIOAsDouble, METH_VARARGS, "\n"
   65956             :     "RasterAttributeTable_ReadValuesIOAsDouble(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
   65957             :     "\n"
   65958             :     "\n"
   65959             :     "Read a single column of a RAT into a list of floats.\n"
   65960             :     "\n"
   65961             :     "Parameters\n"
   65962             :     "----------\n"
   65963             :     "iField : int\n"
   65964             :     "    The index of the column (starting at 0)\n"
   65965             :     "iStartRow : int, default = 0\n"
   65966             :     "    The index of the first row to read (starting at 0)\n"
   65967             :     "iLength : int, default = None\n"
   65968             :     "    The number of rows to read \n"
   65969             :     "\n"
   65970             :     "Returns\n"
   65971             :     "-------\n"
   65972             :     "list\n"
   65973             :     "\n"
   65974             :     "Examples\n"
   65975             :     "--------\n"
   65976             :     ">>> ds = gdal.Open('testrat.tif')\n"
   65977             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65978             :     ">>> rat.ReadValuesIOAsDouble(3, 0, 2)\n"
   65979             :     "[26.0, 26.0]\n"
   65980             :     "\n"
   65981             :     "See Also\n"
   65982             :     "--------\n"
   65983             :     ":py:meth:`ReadAsArray`\n"
   65984             :     "\n"
   65985             :     "\n"
   65986             :     ""},
   65987             :    { "RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, "\n"
   65988             :     "RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue)\n"
   65989             :     "\n"
   65990             :     "\n"
   65991             :     "Set the value of a single cell in the RAT.\n"
   65992             :     "\n"
   65993             :     "If ``iRow`` is equal to the number of rows in the table, the table\n"
   65994             :     "size will be increased by one. However, it is more efficient to\n"
   65995             :     "call :py:meth:`SetRowCount` before repeated insertions.\n"
   65996             :     "\n"
   65997             :     "Parameters\n"
   65998             :     "----------\n"
   65999             :     "iRow : int\n"
   66000             :     "    Row index (0-based)\n"
   66001             :     "iCol : int\n"
   66002             :     "    Column index (0-based)\n"
   66003             :     "pszValue : str\n"
   66004             :     "    Cell value\n"
   66005             :     "\n"
   66006             :     ""},
   66007             :    { "RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, "\n"
   66008             :     "RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)\n"
   66009             :     "\n"
   66010             :     "\n"
   66011             :     "Set the value of a single cell in the RAT.\n"
   66012             :     "\n"
   66013             :     "If ``iRow`` is equal to the number of rows in the table, the table\n"
   66014             :     "size will be increased by one. However, it is more efficient to\n"
   66015             :     "call :py:meth:`SetRowCount` before repeated insertions.\n"
   66016             :     "\n"
   66017             :     "Parameters\n"
   66018             :     "----------\n"
   66019             :     "iRow : int\n"
   66020             :     "    Row index (0-based)\n"
   66021             :     "iCol : int\n"
   66022             :     "    Column index (0-based)\n"
   66023             :     "nValue : int\n"
   66024             :     "    Cell value\n"
   66025             :     "\n"
   66026             :     ""},
   66027             :    { "RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, "\n"
   66028             :     "RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)\n"
   66029             :     "\n"
   66030             :     "\n"
   66031             :     "Set the value of a single cell in the RAT.\n"
   66032             :     "\n"
   66033             :     "If ``iRow`` is equal to the number of rows in the table, the table\n"
   66034             :     "size will be increased by one. However, it is more efficient to\n"
   66035             :     "call :py:meth:`SetRowCount` before repeated insertions.\n"
   66036             :     "\n"
   66037             :     "Parameters\n"
   66038             :     "----------\n"
   66039             :     "iRow : int\n"
   66040             :     "    Row index (0-based)\n"
   66041             :     "iCol : int\n"
   66042             :     "    Column index (0-based)\n"
   66043             :     "dfValue : float\n"
   66044             :     "    Cell value\n"
   66045             :     "\n"
   66046             :     ""},
   66047             :    { "RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, "\n"
   66048             :     "RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)\n"
   66049             :     "\n"
   66050             :     "\n"
   66051             :     "Resizes the table to include the indicated number of rows. Newly created\n"
   66052             :     "rows will be initialized to '' for strings and zero for numeric fields.\n"
   66053             :     "\n"
   66054             :     "See :cpp:func:`GDALRasterAttributeTable::SetRowCount`.\n"
   66055             :     "\n"
   66056             :     "Parameters\n"
   66057             :     "----------\n"
   66058             :     "nCount : int\n"
   66059             :     "   The number of rows in the resized table\n"
   66060             :     "\n"
   66061             :     "\n"
   66062             :     ""},
   66063             :    { "RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, "\n"
   66064             :     "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int\n"
   66065             :     "\n"
   66066             :     "\n"
   66067             :     "Create a new column in the RAT.\n"
   66068             :     "\n"
   66069             :     "If the table already has rows, all row values for the new column will\n"
   66070             :     "be initialized to the default value ('', or zero).  The new column is\n"
   66071             :     "always created as the last column.\n"
   66072             :     "\n"
   66073             :     "Parameters\n"
   66074             :     "----------\n"
   66075             :     "pszName : str\n"
   66076             :     "    Name of the new column\n"
   66077             :     "eType : int\n"
   66078             :     "    Data type of the new column (one of :py:const:`GFT_Integer`, :py:const:`GFT_Real`, or :py:const:`GFT_String`).\n"
   66079             :     "eUsage : int\n"
   66080             :     "    Usage of the new column (see :cpp:enum:`GDALRATFieldUsage`)\n"
   66081             :     "\n"
   66082             :     "Returns\n"
   66083             :     "-------\n"
   66084             :     "int:\n"
   66085             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66086             :     "\n"
   66087             :     "\n"
   66088             :     ""},
   66089             :    { "RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_O, "\n"
   66090             :     "RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool\n"
   66091             :     "\n"
   66092             :     "\n"
   66093             :     "Get linear binning information, if any.\n"
   66094             :     "\n"
   66095             :     "See :cpp:func:`GDALRasterAttributeTable::GetLinearBinning`.\n"
   66096             :     "\n"
   66097             :     "Returns\n"
   66098             :     "-------\n"
   66099             :     "list\n"
   66100             :     "   a three-element list indicating whether linear binning information\n"
   66101             :     "   is available, the minimum value associated with the smallest bin,\n"
   66102             :     "   and the size of each bin.\n"
   66103             :     "\n"
   66104             :     "\n"
   66105             :     ""},
   66106             :    { "RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, "\n"
   66107             :     "RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int\n"
   66108             :     "\n"
   66109             :     "\n"
   66110             :     "Set linear binning information.\n"
   66111             :     "\n"
   66112             :     "This can be used to provide optimized table look-ups (via\n"
   66113             :     ":py:meth:`GetRowOfValue`) when the rows of the table represent\n"
   66114             :     "uniformly sized bins. \n"
   66115             :     "\n"
   66116             :     "It is the responsibility of the user to actually define the \n"
   66117             :     "appropriate bins. If the bins do not correspond to the provided\n"
   66118             :     "binning information, lookup values will be incorrect.\n"
   66119             :     "\n"
   66120             :     "See :cpp:func:`GDALRasterAttributeTable::SetLinearBinning`.\n"
   66121             :     "\n"
   66122             :     "Parameters\n"
   66123             :     "----------\n"
   66124             :     "dfRow0Min : float\n"
   66125             :     "    Minimum value associated with the smallest bin   \n"
   66126             :     "dfBinSize : float\n"
   66127             :     "    Size of each bin\n"
   66128             :     "\n"
   66129             :     ""},
   66130             :    { "RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, "\n"
   66131             :     "RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int\n"
   66132             :     "\n"
   66133             :     "\n"
   66134             :     "Return the index of the row that applies to a specific value,\n"
   66135             :     "or -1 of no such row exists.\n"
   66136             :     "\n"
   66137             :     "See :cpp:func:`GDALRasterAttributeTable::GetRowOfValue`.\n"
   66138             :     "\n"
   66139             :     "Parameters\n"
   66140             :     "----------\n"
   66141             :     "dfValue : float\n"
   66142             :     "    Value for which a row should be found\n"
   66143             :     "\n"
   66144             :     "Returns\n"
   66145             :     "-------\n"
   66146             :     "int\n"
   66147             :     "    Index of the row (0-based), or -1 of no row was found\n"
   66148             :     "\n"
   66149             :     "Examples\n"
   66150             :     "--------\n"
   66151             :     ">>> ds = gdal.Open('testrat.tif')\n"
   66152             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   66153             :     ">>> rat.GetValueAsString(rat.GetRowOfValue(2), 2)\n"
   66154             :     "'my class2'\n"
   66155             :     ">>> rat.GetValueAsString(rat.GetRowOfValue(802), 2)\n"
   66156             :     "''\n"
   66157             :     "\n"
   66158             :     "See Also\n"
   66159             :     "--------\n"
   66160             :     ":py:meth:`SetLinearBinning`\n"
   66161             :     "\n"
   66162             :     "\n"
   66163             :     ""},
   66164             :    { "RasterAttributeTable_ChangesAreWrittenToFile", _wrap_RasterAttributeTable_ChangesAreWrittenToFile, METH_O, "RasterAttributeTable_ChangesAreWrittenToFile(RasterAttributeTable self) -> int"},
   66165             :    { "RasterAttributeTable_DumpReadable", _wrap_RasterAttributeTable_DumpReadable, METH_O, "\n"
   66166             :     "RasterAttributeTable_DumpReadable(RasterAttributeTable self)\n"
   66167             :     "\n"
   66168             :     "\n"
   66169             :     "Return an XML representation of the RAT.\n"
   66170             :     "\n"
   66171             :     "Returns\n"
   66172             :     "-------\n"
   66173             :     "str\n"
   66174             :     "\n"
   66175             :     "\n"
   66176             :     ""},
   66177             :    { "RasterAttributeTable_SetTableType", _wrap_RasterAttributeTable_SetTableType, METH_VARARGS, "\n"
   66178             :     "RasterAttributeTable_SetTableType(RasterAttributeTable self, GDALRATTableType eTableType)\n"
   66179             :     "\n"
   66180             :     "\n"
   66181             :     "Set the type of the RAT (thematic or athematic).\n"
   66182             :     "\n"
   66183             :     "Parameters\n"
   66184             :     "----------\n"
   66185             :     "eTableType : int\n"
   66186             :     "   Table type (:py:const:`GRTT_THEMATIC` or :py:const:`GRTT_ATHEMATIC`)    \n"
   66187             :     "\n"
   66188             :     ""},
   66189             :    { "RasterAttributeTable_GetTableType", _wrap_RasterAttributeTable_GetTableType, METH_O, "\n"
   66190             :     "RasterAttributeTable_GetTableType(RasterAttributeTable self) -> GDALRATTableType\n"
   66191             :     "\n"
   66192             :     "\n"
   66193             :     "Returns the type of the RAT (:py:const:`GRTT_THEMATIC` or :py:const:`GRTT_ATHEMATIC`).\n"
   66194             :     "\n"
   66195             :     "See :cpp:func:`GDALRasterAttributeTable::GetTableType`.\n"
   66196             :     "\n"
   66197             :     "Returns\n"
   66198             :     "-------\n"
   66199             :     "int\n"
   66200             :     "    table type code\n"
   66201             :     "\n"
   66202             :     "\n"
   66203             :     ""},
   66204             :    { "RasterAttributeTable_RemoveStatistics", _wrap_RasterAttributeTable_RemoveStatistics, METH_O, "\n"
   66205             :     "RasterAttributeTable_RemoveStatistics(RasterAttributeTable self)\n"
   66206             :     "\n"
   66207             :     "\n"
   66208             :     "Remove statistics information, such as a histogram, from the RAT.\n"
   66209             :     "\n"
   66210             :     "See :cpp:func:`GDALRasterAttributeTable::RemoveStatistics`.\n"
   66211             :     "\n"
   66212             :     "\n"
   66213             :     ""},
   66214             :    { "RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_O, NULL},
   66215             :    { "RasterAttributeTable_swiginit", RasterAttributeTable_swiginit, METH_VARARGS, NULL},
   66216             :    { "delete_Group", _wrap_delete_Group, METH_O, "delete_Group(Group self)"},
   66217             :    { "Group_GetName", _wrap_Group_GetName, METH_O, "Group_GetName(Group self) -> char const *"},
   66218             :    { "Group_GetFullName", _wrap_Group_GetFullName, METH_O, "Group_GetFullName(Group self) -> char const *"},
   66219             :    { "Group_GetMDArrayNames", _wrap_Group_GetMDArrayNames, METH_VARARGS, "Group_GetMDArrayNames(Group self, char ** options=None) -> char **"},
   66220             :    { "Group_GetMDArrayFullNamesRecursive", _wrap_Group_GetMDArrayFullNamesRecursive, METH_VARARGS, "Group_GetMDArrayFullNamesRecursive(Group self, char ** groupOptions=None, char ** arrayOptions=None) -> char **"},
   66221             :    { "Group_OpenMDArray", _wrap_Group_OpenMDArray, METH_VARARGS, "Group_OpenMDArray(Group self, char const * name, char ** options=None) -> MDArray"},
   66222             :    { "Group_OpenMDArrayFromFullname", _wrap_Group_OpenMDArrayFromFullname, METH_VARARGS, "Group_OpenMDArrayFromFullname(Group self, char const * name, char ** options=None) -> MDArray"},
   66223             :    { "Group_ResolveMDArray", _wrap_Group_ResolveMDArray, METH_VARARGS, "Group_ResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) -> MDArray"},
   66224             :    { "Group_GetGroupNames", _wrap_Group_GetGroupNames, METH_VARARGS, "Group_GetGroupNames(Group self, char ** options=None) -> char **"},
   66225             :    { "Group_OpenGroup", _wrap_Group_OpenGroup, METH_VARARGS, "Group_OpenGroup(Group self, char const * name, char ** options=None) -> Group"},
   66226             :    { "Group_OpenGroupFromFullname", _wrap_Group_OpenGroupFromFullname, METH_VARARGS, "Group_OpenGroupFromFullname(Group self, char const * name, char ** options=None) -> Group"},
   66227             :    { "Group_GetVectorLayerNames", _wrap_Group_GetVectorLayerNames, METH_VARARGS, "Group_GetVectorLayerNames(Group self, char ** options=None) -> char **"},
   66228             :    { "Group_OpenVectorLayer", _wrap_Group_OpenVectorLayer, METH_VARARGS, "Group_OpenVectorLayer(Group self, char const * name, char ** options=None) -> Layer"},
   66229             :    { "Group_GetDimensions", _wrap_Group_GetDimensions, METH_VARARGS, "Group_GetDimensions(Group self, char ** options=None)"},
   66230             :    { "Group_GetAttribute", _wrap_Group_GetAttribute, METH_VARARGS, "Group_GetAttribute(Group self, char const * name) -> Attribute"},
   66231             :    { "Group_GetAttributes", _wrap_Group_GetAttributes, METH_VARARGS, "Group_GetAttributes(Group self, char ** options=None)"},
   66232             :    { "Group_GetStructuralInfo", _wrap_Group_GetStructuralInfo, METH_O, "Group_GetStructuralInfo(Group self) -> char **"},
   66233             :    { "Group_CreateGroup", (PyCFunction)(void(*)(void))_wrap_Group_CreateGroup, METH_VARARGS|METH_KEYWORDS, "Group_CreateGroup(Group self, char const * name, char ** options=None) -> Group"},
   66234             :    { "Group_DeleteGroup", _wrap_Group_DeleteGroup, METH_VARARGS, "Group_DeleteGroup(Group self, char const * name, char ** options=None) -> CPLErr"},
   66235             :    { "Group_CreateDimension", (PyCFunction)(void(*)(void))_wrap_Group_CreateDimension, METH_VARARGS|METH_KEYWORDS, "\n"
   66236             :     "Group_CreateDimension(Group self, char const * name, char const * dim_type, char const * direction, GUIntBig size, char ** options=None) -> Dimension\n"
   66237             :     "\n"
   66238             :     "\n"
   66239             :     "Create a dimension within a :py:class:`Group`.\n"
   66240             :     "\n"
   66241             :     "See :cpp:func:`GDALGroup::CreateDimension`.\n"
   66242             :     "\n"
   66243             :     "Parameters\n"
   66244             :     "----------\n"
   66245             :     "name : str\n"
   66246             :     "    Dimension name\n"
   66247             :     "dim_type : str\n"
   66248             :     "    Dimension type (might be empty, and ignored by drivers)\n"
   66249             :     "direction: str\n"
   66250             :     "    Dimension direction (might be empty, and ignored by drivers)\n"
   66251             :     "size : int\n"
   66252             :     "    Number of values indexed by this dimension. Should be > 0\n"
   66253             :     "options: dict/list\n"
   66254             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66255             :     "\n"
   66256             :     "Returns\n"
   66257             :     "-------\n"
   66258             :     "\n"
   66259             :     "Dimension:\n"
   66260             :     "    the new :py:class:`Dimension` or ``None`` on failure.\n"
   66261             :     "\n"
   66262             :     "Examples\n"
   66263             :     "--------\n"
   66264             :     "\n"
   66265             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66266             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66267             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66268             :     ">>> dim_band = rg.CreateDimension('band', None, None, 3)\n"
   66269             :     ">>> dim_x = rg.CreateDimension('X', None, None, 2)\n"
   66270             :     ">>> dim_x.GetFullName()\n"
   66271             :     "'/X'\n"
   66272             :     ">>> lat = rg.CreateDimension('latitude', gdal.DIM_TYPE_HORIZONTAL_X, None, 2)\n"
   66273             :     ">>> lat.GetType()\n"
   66274             :     "'HORIZONTAL_X'\n"
   66275             :     "\n"
   66276             :     ""},
   66277             :    { "Group_CreateMDArray", _wrap_Group_CreateMDArray, METH_VARARGS, "\n"
   66278             :     "Group_CreateMDArray(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> MDArray\n"
   66279             :     "\n"
   66280             :     "\n"
   66281             :     "Create a multidimensional array within a group.\n"
   66282             :     "\n"
   66283             :     "It is recommended that the GDALDimension objects passed in ``dimensions``\n"
   66284             :     "belong to this group, either by retrieving them with :py:meth:`GetDimensions`\n"
   66285             :     "or creating a new one with :py:meth:`CreateDimension`.\n"
   66286             :     "\n"
   66287             :     "See :cpp:func:`GDALGroup::CreateMDArray`.\n"
   66288             :     "\n"
   66289             :     "Parameters\n"
   66290             :     "----------\n"
   66291             :     "name : str\n"
   66292             :     "    name\n"
   66293             :     "dimensions : list\n"
   66294             :     "    List of dimensions, ordered from the slowest varying\n"
   66295             :     "    dimension first to the fastest varying dimension last.\n"
   66296             :     "    Might be empty for a scalar array (if supported by driver)\n"
   66297             :     "data_type: :py:class:`ExtendedDataType`\n"
   66298             :     "    Array data type\n"
   66299             :     "options: dict/list\n"
   66300             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66301             :     "\n"
   66302             :     "Returns\n"
   66303             :     "-------\n"
   66304             :     "\n"
   66305             :     "MDArray:\n"
   66306             :     "    the new :py:class:`MDArray` or ``None`` on failure.\n"
   66307             :     "\n"
   66308             :     "Examples\n"
   66309             :     "--------\n"
   66310             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66311             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66312             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66313             :     ">>> dimX = rg.CreateDimension('X', None, None, 3)\n"
   66314             :     ">>> ar = rg.CreateMDArray('ar', [dimX], gdal.ExtendedDataType.Create(gdal.GDT_Byte))\n"
   66315             :     "\n"
   66316             :     "\n"
   66317             :     ""},
   66318             :    { "Group_DeleteMDArray", _wrap_Group_DeleteMDArray, METH_VARARGS, "Group_DeleteMDArray(Group self, char const * name, char ** options=None) -> CPLErr"},
   66319             :    { "Group_CreateAttribute", _wrap_Group_CreateAttribute, METH_VARARGS, "\n"
   66320             :     "Group_CreateAttribute(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   66321             :     "\n"
   66322             :     "\n"
   66323             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   66324             :     "\n"
   66325             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   66326             :     "\n"
   66327             :     "Parameters\n"
   66328             :     "----------\n"
   66329             :     "name : str\n"
   66330             :     "    name\n"
   66331             :     "dimensions : list\n"
   66332             :     "    List of dimensions, ordered from the slowest varying\n"
   66333             :     "    dimension first to the fastest varying dimension last.\n"
   66334             :     "    Might be empty for a scalar array (if supported by driver)\n"
   66335             :     "data_type: :py:class:`ExtendedDataType`\n"
   66336             :     "    Attribute data type\n"
   66337             :     "options: dict/list\n"
   66338             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66339             :     "\n"
   66340             :     "Returns\n"
   66341             :     "-------\n"
   66342             :     "\n"
   66343             :     "Attribute:\n"
   66344             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   66345             :     "\n"
   66346             :     "Examples\n"
   66347             :     "--------\n"
   66348             :     "\n"
   66349             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66350             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66351             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66352             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   66353             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66354             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66355             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   66356             :     "\n"
   66357             :     "\n"
   66358             :     ""},
   66359             :    { "Group_DeleteAttribute", _wrap_Group_DeleteAttribute, METH_VARARGS, "Group_DeleteAttribute(Group self, char const * name, char ** options=None) -> CPLErr"},
   66360             :    { "Group_Rename", _wrap_Group_Rename, METH_VARARGS, "Group_Rename(Group self, char const * newName) -> CPLErr"},
   66361             :    { "Group_SubsetDimensionFromSelection", _wrap_Group_SubsetDimensionFromSelection, METH_VARARGS, "Group_SubsetDimensionFromSelection(Group self, char const * selection, char ** options=None) -> Group"},
   66362             :    { "Group_GetDataTypeCount", _wrap_Group_GetDataTypeCount, METH_O, "Group_GetDataTypeCount(Group self) -> size_t"},
   66363             :    { "Group_GetDataType", _wrap_Group_GetDataType, METH_VARARGS, "Group_GetDataType(Group self, size_t idx) -> ExtendedDataType"},
   66364             :    { "Group_swigregister", Group_swigregister, METH_O, NULL},
   66365             :    { "Statistics_min_get", _wrap_Statistics_min_get, METH_O, "Statistics_min_get(Statistics self) -> double"},
   66366             :    { "Statistics_max_get", _wrap_Statistics_max_get, METH_O, "Statistics_max_get(Statistics self) -> double"},
   66367             :    { "Statistics_mean_get", _wrap_Statistics_mean_get, METH_O, "Statistics_mean_get(Statistics self) -> double"},
   66368             :    { "Statistics_std_dev_get", _wrap_Statistics_std_dev_get, METH_O, "Statistics_std_dev_get(Statistics self) -> double"},
   66369             :    { "Statistics_valid_count_get", _wrap_Statistics_valid_count_get, METH_O, "Statistics_valid_count_get(Statistics self) -> GIntBig"},
   66370             :    { "delete_Statistics", _wrap_delete_Statistics, METH_O, "delete_Statistics(Statistics self)"},
   66371             :    { "new_Statistics", _wrap_new_Statistics, METH_NOARGS, "new_Statistics() -> Statistics"},
   66372             :    { "Statistics_swigregister", Statistics_swigregister, METH_O, NULL},
   66373             :    { "Statistics_swiginit", Statistics_swiginit, METH_VARARGS, NULL},
   66374             :    { "delete_MDArray", _wrap_delete_MDArray, METH_O, "delete_MDArray(MDArray self)"},
   66375             :    { "MDArray_GetName", _wrap_MDArray_GetName, METH_O, "MDArray_GetName(MDArray self) -> char const *"},
   66376             :    { "MDArray_GetFullName", _wrap_MDArray_GetFullName, METH_O, "MDArray_GetFullName(MDArray self) -> char const *"},
   66377             :    { "MDArray_GetTotalElementsCount", _wrap_MDArray_GetTotalElementsCount, METH_O, "MDArray_GetTotalElementsCount(MDArray self) -> GUIntBig"},
   66378             :    { "MDArray_GetDimensionCount", _wrap_MDArray_GetDimensionCount, METH_O, "MDArray_GetDimensionCount(MDArray self) -> size_t"},
   66379             :    { "MDArray_GetDimensions", _wrap_MDArray_GetDimensions, METH_O, "MDArray_GetDimensions(MDArray self)"},
   66380             :    { "MDArray_GetCoordinateVariables", _wrap_MDArray_GetCoordinateVariables, METH_O, "MDArray_GetCoordinateVariables(MDArray self)"},
   66381             :    { "MDArray_GetBlockSize", _wrap_MDArray_GetBlockSize, METH_O, "MDArray_GetBlockSize(MDArray self)"},
   66382             :    { "MDArray_GetProcessingChunkSize", _wrap_MDArray_GetProcessingChunkSize, METH_VARARGS, "MDArray_GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory)"},
   66383             :    { "MDArray_GetDataType", _wrap_MDArray_GetDataType, METH_O, "MDArray_GetDataType(MDArray self) -> ExtendedDataType"},
   66384             :    { "MDArray_GetStructuralInfo", _wrap_MDArray_GetStructuralInfo, METH_O, "MDArray_GetStructuralInfo(MDArray self) -> char **"},
   66385             :    { "MDArray_Resize", _wrap_MDArray_Resize, METH_VARARGS, "MDArray_Resize(MDArray self, int newDimensions, char ** options=None) -> CPLErr"},
   66386             :    { "MDArray_Read", _wrap_MDArray_Read, METH_VARARGS, "MDArray_Read(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype) -> CPLErr"},
   66387             :    { "MDArray_WriteStringArray", _wrap_MDArray_WriteStringArray, METH_VARARGS, "MDArray_WriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) -> CPLErr"},
   66388             :    { "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"},
   66389             :    { "MDArray_AdviseRead", _wrap_MDArray_AdviseRead, METH_VARARGS, "MDArray_AdviseRead(MDArray self, int nDims1, int nDims2, char ** options=None) -> CPLErr"},
   66390             :    { "MDArray_GetAttribute", _wrap_MDArray_GetAttribute, METH_VARARGS, "MDArray_GetAttribute(MDArray self, char const * name) -> Attribute"},
   66391             :    { "MDArray_GetAttributes", _wrap_MDArray_GetAttributes, METH_VARARGS, "MDArray_GetAttributes(MDArray self, char ** options=None)"},
   66392             :    { "MDArray_CreateAttribute", _wrap_MDArray_CreateAttribute, METH_VARARGS, "\n"
   66393             :     "MDArray_CreateAttribute(MDArray self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   66394             :     "\n"
   66395             :     "\n"
   66396             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   66397             :     "\n"
   66398             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   66399             :     "\n"
   66400             :     "Parameters\n"
   66401             :     "----------\n"
   66402             :     "name : str\n"
   66403             :     "    name\n"
   66404             :     "dimensions : list\n"
   66405             :     "    List of dimensions, ordered from the slowest varying\n"
   66406             :     "    dimension first to the fastest varying dimension last.\n"
   66407             :     "    Might be empty for a scalar array (if supported by driver)\n"
   66408             :     "data_type: :py:class:`ExtendedDataType`\n"
   66409             :     "    Attribute data type\n"
   66410             :     "options: dict/list\n"
   66411             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66412             :     "\n"
   66413             :     "Returns\n"
   66414             :     "-------\n"
   66415             :     "\n"
   66416             :     "Attribute:\n"
   66417             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   66418             :     "\n"
   66419             :     "Examples\n"
   66420             :     "--------\n"
   66421             :     "\n"
   66422             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66423             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66424             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66425             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   66426             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66427             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66428             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   66429             :     "\n"
   66430             :     "\n"
   66431             :     ""},
   66432             :    { "MDArray_DeleteAttribute", _wrap_MDArray_DeleteAttribute, METH_VARARGS, "MDArray_DeleteAttribute(MDArray self, char const * name, char ** options=None) -> CPLErr"},
   66433             :    { "MDArray_GetNoDataValueAsRaw", _wrap_MDArray_GetNoDataValueAsRaw, METH_O, "MDArray_GetNoDataValueAsRaw(MDArray self) -> CPLErr"},
   66434             :    { "MDArray_GetNoDataValueAsDouble", _wrap_MDArray_GetNoDataValueAsDouble, METH_O, "MDArray_GetNoDataValueAsDouble(MDArray self)"},
   66435             :    { "MDArray_GetNoDataValueAsInt64", _wrap_MDArray_GetNoDataValueAsInt64, METH_O, "MDArray_GetNoDataValueAsInt64(MDArray self)"},
   66436             :    { "MDArray_GetNoDataValueAsUInt64", _wrap_MDArray_GetNoDataValueAsUInt64, METH_O, "MDArray_GetNoDataValueAsUInt64(MDArray self)"},
   66437             :    { "MDArray_GetNoDataValueAsString", _wrap_MDArray_GetNoDataValueAsString, METH_O, "MDArray_GetNoDataValueAsString(MDArray self) -> retStringAndCPLFree *"},
   66438             :    { "MDArray_SetNoDataValueDouble", _wrap_MDArray_SetNoDataValueDouble, METH_VARARGS, "MDArray_SetNoDataValueDouble(MDArray self, double d) -> CPLErr"},
   66439             :    { "MDArray_SetNoDataValueInt64", _wrap_MDArray_SetNoDataValueInt64, METH_VARARGS, "MDArray_SetNoDataValueInt64(MDArray self, GIntBig v) -> CPLErr"},
   66440             :    { "MDArray_SetNoDataValueUInt64", _wrap_MDArray_SetNoDataValueUInt64, METH_VARARGS, "MDArray_SetNoDataValueUInt64(MDArray self, GUIntBig v) -> CPLErr"},
   66441             :    { "MDArray_SetNoDataValueString", _wrap_MDArray_SetNoDataValueString, METH_VARARGS, "MDArray_SetNoDataValueString(MDArray self, char const * nodata) -> CPLErr"},
   66442             :    { "MDArray_SetNoDataValueRaw", _wrap_MDArray_SetNoDataValueRaw, METH_VARARGS, "MDArray_SetNoDataValueRaw(MDArray self, GIntBig nLen) -> CPLErr"},
   66443             :    { "MDArray_DeleteNoDataValue", _wrap_MDArray_DeleteNoDataValue, METH_O, "MDArray_DeleteNoDataValue(MDArray self) -> CPLErr"},
   66444             :    { "MDArray_GetOffset", _wrap_MDArray_GetOffset, METH_O, "MDArray_GetOffset(MDArray self)"},
   66445             :    { "MDArray_GetOffsetStorageType", _wrap_MDArray_GetOffsetStorageType, METH_O, "MDArray_GetOffsetStorageType(MDArray self) -> GDALDataType"},
   66446             :    { "MDArray_GetScale", _wrap_MDArray_GetScale, METH_O, "MDArray_GetScale(MDArray self)"},
   66447             :    { "MDArray_GetScaleStorageType", _wrap_MDArray_GetScaleStorageType, METH_O, "MDArray_GetScaleStorageType(MDArray self) -> GDALDataType"},
   66448             :    { "MDArray_SetOffset", (PyCFunction)(void(*)(void))_wrap_MDArray_SetOffset, METH_VARARGS|METH_KEYWORDS, "MDArray_SetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   66449             :    { "MDArray_SetScale", (PyCFunction)(void(*)(void))_wrap_MDArray_SetScale, METH_VARARGS|METH_KEYWORDS, "MDArray_SetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   66450             :    { "MDArray_SetUnit", _wrap_MDArray_SetUnit, METH_VARARGS, "MDArray_SetUnit(MDArray self, char const * unit) -> CPLErr"},
   66451             :    { "MDArray_GetUnit", _wrap_MDArray_GetUnit, METH_O, "MDArray_GetUnit(MDArray self) -> char const *"},
   66452             :    { "MDArray_SetSpatialRef", _wrap_MDArray_SetSpatialRef, METH_VARARGS, "MDArray_SetSpatialRef(MDArray self, SpatialReference srs) -> OGRErr"},
   66453             :    { "MDArray_GetSpatialRef", _wrap_MDArray_GetSpatialRef, METH_O, "MDArray_GetSpatialRef(MDArray self) -> SpatialReference"},
   66454             :    { "MDArray_GetView", _wrap_MDArray_GetView, METH_VARARGS, "MDArray_GetView(MDArray self, char const * viewExpr) -> MDArray"},
   66455             :    { "MDArray_Transpose", _wrap_MDArray_Transpose, METH_VARARGS, "MDArray_Transpose(MDArray self, int axisMap) -> MDArray"},
   66456             :    { "MDArray_GetUnscaled", _wrap_MDArray_GetUnscaled, METH_O, "MDArray_GetUnscaled(MDArray self) -> MDArray"},
   66457             :    { "MDArray_GetMask", _wrap_MDArray_GetMask, METH_VARARGS, "MDArray_GetMask(MDArray self, char ** options=None) -> MDArray"},
   66458             :    { "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"},
   66459             :    { "MDArray_AsClassicDataset", _wrap_MDArray_AsClassicDataset, METH_VARARGS, "MDArray_AsClassicDataset(MDArray self, size_t iXDim, size_t iYDim, Group hRootGroup=None, char ** options=None) -> Dataset"},
   66460             :    { "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"},
   66461             :    { "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"},
   66462             :    { "MDArray_GetResampled", _wrap_MDArray_GetResampled, METH_VARARGS, "MDArray_GetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) -> MDArray"},
   66463             :    { "MDArray_GetMeshGrid", _wrap_MDArray_GetMeshGrid, METH_VARARGS, "MDArray_GetMeshGrid(int nInputArrays, char ** options=None)"},
   66464             :    { "MDArray_Cache", _wrap_MDArray_Cache, METH_VARARGS, "MDArray_Cache(MDArray self, char ** options=None) -> bool"},
   66465             :    { "MDArray_Rename", _wrap_MDArray_Rename, METH_VARARGS, "MDArray_Rename(MDArray self, char const * newName) -> CPLErr"},
   66466             :    { "MDArray_swigregister", MDArray_swigregister, METH_O, NULL},
   66467             :    { "delete_Attribute", _wrap_delete_Attribute, METH_O, "delete_Attribute(Attribute self)"},
   66468             :    { "Attribute_GetName", _wrap_Attribute_GetName, METH_O, "Attribute_GetName(Attribute self) -> char const *"},
   66469             :    { "Attribute_GetFullName", _wrap_Attribute_GetFullName, METH_O, "Attribute_GetFullName(Attribute self) -> char const *"},
   66470             :    { "Attribute_GetTotalElementsCount", _wrap_Attribute_GetTotalElementsCount, METH_O, "Attribute_GetTotalElementsCount(Attribute self) -> GUIntBig"},
   66471             :    { "Attribute_GetDimensionCount", _wrap_Attribute_GetDimensionCount, METH_O, "Attribute_GetDimensionCount(Attribute self) -> size_t"},
   66472             :    { "Attribute_GetDimensionsSize", _wrap_Attribute_GetDimensionsSize, METH_O, "Attribute_GetDimensionsSize(Attribute self)"},
   66473             :    { "Attribute_GetDataType", _wrap_Attribute_GetDataType, METH_O, "Attribute_GetDataType(Attribute self) -> ExtendedDataType"},
   66474             :    { "Attribute_ReadAsRaw", _wrap_Attribute_ReadAsRaw, METH_O, "Attribute_ReadAsRaw(Attribute self) -> CPLErr"},
   66475             :    { "Attribute_ReadAsString", _wrap_Attribute_ReadAsString, METH_O, "Attribute_ReadAsString(Attribute self) -> char const *"},
   66476             :    { "Attribute_ReadAsInt", _wrap_Attribute_ReadAsInt, METH_O, "Attribute_ReadAsInt(Attribute self) -> int"},
   66477             :    { "Attribute_ReadAsInt64", _wrap_Attribute_ReadAsInt64, METH_O, "Attribute_ReadAsInt64(Attribute self) -> long long"},
   66478             :    { "Attribute_ReadAsDouble", _wrap_Attribute_ReadAsDouble, METH_O, "Attribute_ReadAsDouble(Attribute self) -> double"},
   66479             :    { "Attribute_ReadAsStringArray", _wrap_Attribute_ReadAsStringArray, METH_O, "Attribute_ReadAsStringArray(Attribute self) -> char **"},
   66480             :    { "Attribute_ReadAsIntArray", _wrap_Attribute_ReadAsIntArray, METH_O, "Attribute_ReadAsIntArray(Attribute self)"},
   66481             :    { "Attribute_ReadAsInt64Array", _wrap_Attribute_ReadAsInt64Array, METH_O, "Attribute_ReadAsInt64Array(Attribute self)"},
   66482             :    { "Attribute_ReadAsDoubleArray", _wrap_Attribute_ReadAsDoubleArray, METH_O, "Attribute_ReadAsDoubleArray(Attribute self)"},
   66483             :    { "Attribute_WriteRaw", _wrap_Attribute_WriteRaw, METH_VARARGS, "Attribute_WriteRaw(Attribute self, GIntBig nLen) -> CPLErr"},
   66484             :    { "Attribute_WriteString", _wrap_Attribute_WriteString, METH_VARARGS, "Attribute_WriteString(Attribute self, char const * val) -> CPLErr"},
   66485             :    { "Attribute_WriteStringArray", _wrap_Attribute_WriteStringArray, METH_VARARGS, "Attribute_WriteStringArray(Attribute self, char ** vals) -> CPLErr"},
   66486             :    { "Attribute_WriteInt", _wrap_Attribute_WriteInt, METH_VARARGS, "Attribute_WriteInt(Attribute self, int val) -> CPLErr"},
   66487             :    { "Attribute_WriteInt64", _wrap_Attribute_WriteInt64, METH_VARARGS, "Attribute_WriteInt64(Attribute self, long long val) -> CPLErr"},
   66488             :    { "Attribute_WriteDouble", _wrap_Attribute_WriteDouble, METH_VARARGS, "Attribute_WriteDouble(Attribute self, double val) -> CPLErr"},
   66489             :    { "Attribute_WriteIntArray", _wrap_Attribute_WriteIntArray, METH_VARARGS, "Attribute_WriteIntArray(Attribute self, int nList) -> CPLErr"},
   66490             :    { "Attribute_WriteInt64Array", _wrap_Attribute_WriteInt64Array, METH_VARARGS, "Attribute_WriteInt64Array(Attribute self, int nList) -> CPLErr"},
   66491             :    { "Attribute_WriteDoubleArray", _wrap_Attribute_WriteDoubleArray, METH_VARARGS, "Attribute_WriteDoubleArray(Attribute self, int nList) -> CPLErr"},
   66492             :    { "Attribute_Rename", _wrap_Attribute_Rename, METH_VARARGS, "Attribute_Rename(Attribute self, char const * newName) -> CPLErr"},
   66493             :    { "Attribute_swigregister", Attribute_swigregister, METH_O, NULL},
   66494             :    { "delete_Dimension", _wrap_delete_Dimension, METH_O, "delete_Dimension(Dimension self)"},
   66495             :    { "Dimension_GetName", _wrap_Dimension_GetName, METH_O, "Dimension_GetName(Dimension self) -> char const *"},
   66496             :    { "Dimension_GetFullName", _wrap_Dimension_GetFullName, METH_O, "Dimension_GetFullName(Dimension self) -> char const *"},
   66497             :    { "Dimension_GetType", _wrap_Dimension_GetType, METH_O, "Dimension_GetType(Dimension self) -> char const *"},
   66498             :    { "Dimension_GetDirection", _wrap_Dimension_GetDirection, METH_O, "Dimension_GetDirection(Dimension self) -> char const *"},
   66499             :    { "Dimension_GetSize", _wrap_Dimension_GetSize, METH_O, "Dimension_GetSize(Dimension self) -> GUIntBig"},
   66500             :    { "Dimension_GetIndexingVariable", _wrap_Dimension_GetIndexingVariable, METH_O, "Dimension_GetIndexingVariable(Dimension self) -> MDArray"},
   66501             :    { "Dimension_SetIndexingVariable", _wrap_Dimension_SetIndexingVariable, METH_VARARGS, "Dimension_SetIndexingVariable(Dimension self, MDArray array) -> bool"},
   66502             :    { "Dimension_Rename", _wrap_Dimension_Rename, METH_VARARGS, "Dimension_Rename(Dimension self, char const * newName) -> CPLErr"},
   66503             :    { "Dimension_swigregister", Dimension_swigregister, METH_O, NULL},
   66504             :    { "delete_ExtendedDataType", _wrap_delete_ExtendedDataType, METH_O, "delete_ExtendedDataType(ExtendedDataType self)"},
   66505             :    { "ExtendedDataType_Create", _wrap_ExtendedDataType_Create, METH_O, "ExtendedDataType_Create(GDALDataType dt) -> ExtendedDataType"},
   66506             :    { "ExtendedDataType_CreateString", _wrap_ExtendedDataType_CreateString, METH_VARARGS, "ExtendedDataType_CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) -> ExtendedDataType"},
   66507             :    { "ExtendedDataType_CreateCompound", _wrap_ExtendedDataType_CreateCompound, METH_VARARGS, "ExtendedDataType_CreateCompound(char const * name, size_t nTotalSize, int nComps) -> ExtendedDataType"},
   66508             :    { "ExtendedDataType_GetName", _wrap_ExtendedDataType_GetName, METH_O, "ExtendedDataType_GetName(ExtendedDataType self) -> char const *"},
   66509             :    { "ExtendedDataType_GetClass", _wrap_ExtendedDataType_GetClass, METH_O, "ExtendedDataType_GetClass(ExtendedDataType self) -> GDALExtendedDataTypeClass"},
   66510             :    { "ExtendedDataType_GetNumericDataType", _wrap_ExtendedDataType_GetNumericDataType, METH_O, "ExtendedDataType_GetNumericDataType(ExtendedDataType self) -> GDALDataType"},
   66511             :    { "ExtendedDataType_GetSize", _wrap_ExtendedDataType_GetSize, METH_O, "ExtendedDataType_GetSize(ExtendedDataType self) -> size_t"},
   66512             :    { "ExtendedDataType_GetMaxStringLength", _wrap_ExtendedDataType_GetMaxStringLength, METH_O, "ExtendedDataType_GetMaxStringLength(ExtendedDataType self) -> size_t"},
   66513             :    { "ExtendedDataType_GetSubType", _wrap_ExtendedDataType_GetSubType, METH_O, "ExtendedDataType_GetSubType(ExtendedDataType self) -> GDALExtendedDataTypeSubType"},
   66514             :    { "ExtendedDataType_GetRAT", _wrap_ExtendedDataType_GetRAT, METH_O, "ExtendedDataType_GetRAT(ExtendedDataType self) -> RasterAttributeTable"},
   66515             :    { "ExtendedDataType_GetComponents", _wrap_ExtendedDataType_GetComponents, METH_O, "ExtendedDataType_GetComponents(ExtendedDataType self)"},
   66516             :    { "ExtendedDataType_CanConvertTo", _wrap_ExtendedDataType_CanConvertTo, METH_VARARGS, "ExtendedDataType_CanConvertTo(ExtendedDataType self, ExtendedDataType other) -> bool"},
   66517             :    { "ExtendedDataType_Equals", _wrap_ExtendedDataType_Equals, METH_VARARGS, "ExtendedDataType_Equals(ExtendedDataType self, ExtendedDataType other) -> bool"},
   66518             :    { "ExtendedDataType_swigregister", ExtendedDataType_swigregister, METH_O, NULL},
   66519             :    { "delete_EDTComponent", _wrap_delete_EDTComponent, METH_O, "delete_EDTComponent(EDTComponent self)"},
   66520             :    { "EDTComponent_Create", _wrap_EDTComponent_Create, METH_VARARGS, "EDTComponent_Create(char const * name, size_t offset, ExtendedDataType type) -> EDTComponent"},
   66521             :    { "EDTComponent_GetName", _wrap_EDTComponent_GetName, METH_O, "EDTComponent_GetName(EDTComponent self) -> char const *"},
   66522             :    { "EDTComponent_GetOffset", _wrap_EDTComponent_GetOffset, METH_O, "EDTComponent_GetOffset(EDTComponent self) -> size_t"},
   66523             :    { "EDTComponent_GetType", _wrap_EDTComponent_GetType, METH_O, "EDTComponent_GetType(EDTComponent self) -> ExtendedDataType"},
   66524             :    { "EDTComponent_swigregister", EDTComponent_swigregister, METH_O, NULL},
   66525             :    { "CreateRasterAttributeTableFromMDArrays", _wrap_CreateRasterAttributeTableFromMDArrays, METH_VARARGS, "CreateRasterAttributeTableFromMDArrays(GDALRATTableType eTableType, int nArrays, int nUsages=0) -> RasterAttributeTable"},
   66526             :    { "Band_XSize_get", _wrap_Band_XSize_get, METH_O, "Band_XSize_get(Band self) -> int"},
   66527             :    { "Band_YSize_get", _wrap_Band_YSize_get, METH_O, "Band_YSize_get(Band self) -> int"},
   66528             :    { "Band_DataType_get", _wrap_Band_DataType_get, METH_O, "Band_DataType_get(Band self) -> GDALDataType"},
   66529             :    { "Band_GetDataset", _wrap_Band_GetDataset, METH_O, "\n"
   66530             :     "Band_GetDataset(Band self) -> Dataset\n"
   66531             :     "\n"
   66532             :     "\n"
   66533             :     "Fetch the :py:class:`Dataset` associated with this Band.\n"
   66534             :     "See :cpp:func:`GDALRasterBand::GetDataset`.\n"
   66535             :     "\n"
   66536             :     ""},
   66537             :    { "Band_GetBand", _wrap_Band_GetBand, METH_O, "\n"
   66538             :     "Band_GetBand(Band self) -> int\n"
   66539             :     "\n"
   66540             :     "\n"
   66541             :     "Return the index of this band.\n"
   66542             :     "See :cpp:func:`GDALRasterBand::GetBand`.\n"
   66543             :     "\n"
   66544             :     "Returns\n"
   66545             :     "-------\n"
   66546             :     "int\n"
   66547             :     "    the (1-based) index of this band\n"
   66548             :     "\n"
   66549             :     ""},
   66550             :    { "Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_O, "\n"
   66551             :     "Band_GetBlockSize(Band self)\n"
   66552             :     "\n"
   66553             :     "\n"
   66554             :     "Fetch the natural block size of this band.\n"
   66555             :     "See :cpp:func:`GDALRasterBand::GetBlockSize`.\n"
   66556             :     "\n"
   66557             :     "Returns\n"
   66558             :     "-------\n"
   66559             :     "list\n"
   66560             :     "    list with the x and y dimensions of a block\n"
   66561             :     "\n"
   66562             :     ""},
   66563             :    { "Band_GetActualBlockSize", _wrap_Band_GetActualBlockSize, METH_VARARGS, "\n"
   66564             :     "Band_GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff)\n"
   66565             :     "\n"
   66566             :     "\n"
   66567             :     "Fetch the actual block size for a given block offset.\n"
   66568             :     "See :cpp:func:`GDALRasterBand::GetActualBlockSize`.\n"
   66569             :     "\n"
   66570             :     "Parameters\n"
   66571             :     "----------\n"
   66572             :     "nXBlockOff : int\n"
   66573             :     "    the horizontal block offset for which to calculate the\n"
   66574             :     "    number of valid pixels, with zero indicating the left most block, 1 the next\n"
   66575             :     "    block and so forth.\n"
   66576             :     "nYBlockOff : int\n"
   66577             :     "    the vertical block offset, with zero indicating\n"
   66578             :     "    the top most block, 1 the next block and so forth.\n"
   66579             :     "\n"
   66580             :     "Returns\n"
   66581             :     "-------\n"
   66582             :     "tuple\n"
   66583             :     "    tuple with the x and y dimensions of the block\n"
   66584             :     "\n"
   66585             :     ""},
   66586             :    { "Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_O, "\n"
   66587             :     "Band_GetColorInterpretation(Band self) -> GDALColorInterp\n"
   66588             :     "\n"
   66589             :     "\n"
   66590             :     "Get the :cpp:enum:`GDALColorInterp` value for this band.\n"
   66591             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   66592             :     "\n"
   66593             :     "Returns\n"
   66594             :     "-------\n"
   66595             :     "int\n"
   66596             :     "\n"
   66597             :     ""},
   66598             :    { "Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_O, "\n"
   66599             :     "Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp\n"
   66600             :     "\n"
   66601             :     "\n"
   66602             :     "Return the color interpretation code for this band.\n"
   66603             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   66604             :     "\n"
   66605             :     "Returns\n"
   66606             :     "-------\n"
   66607             :     "int\n"
   66608             :     "    The color interpretation code (default :py:const:`gdal.GCI_Undefined`)\n"
   66609             :     "\n"
   66610             :     "\n"
   66611             :     ""},
   66612             :    { "Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, "\n"
   66613             :     "Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   66614             :     "\n"
   66615             :     "\n"
   66616             :     "Set color interpretation of the band\n"
   66617             :     "See :cpp:func:`GDALRasterBand::SetColorInterpretation`.\n"
   66618             :     "\n"
   66619             :     "Parameters\n"
   66620             :     "----------\n"
   66621             :     "val : int\n"
   66622             :     "    A color interpretation code such as :py:const:`gdal.GCI_RedBand`\n"
   66623             :     "\n"
   66624             :     "Returns\n"
   66625             :     "-------\n"
   66626             :     "int:\n"
   66627             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66628             :     "\n"
   66629             :     ""},
   66630             :    { "Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, "\n"
   66631             :     "Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   66632             :     "\n"
   66633             :     "Deprecated.  Alternate name for :py:meth:`SetColorInterpretation`.\n"
   66634             :     "\n"
   66635             :     ""},
   66636             :    { "Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_O, "Band_GetNoDataValue(Band self)"},
   66637             :    { "Band_GetNoDataValueAsInt64", _wrap_Band_GetNoDataValueAsInt64, METH_O, "\n"
   66638             :     "Band_GetNoDataValueAsInt64(Band self)\n"
   66639             :     "\n"
   66640             :     "\n"
   66641             :     "Fetch the nodata value for this band.\n"
   66642             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsInt64`.\n"
   66643             :     "\n"
   66644             :     "Returns\n"
   66645             :     "-------\n"
   66646             :     "int\n"
   66647             :     "    The nodata value, or ``None`` if it has not been set or\n"
   66648             :     "    the data type of this band is not :py:const:`gdal.GDT_Int64`.\n"
   66649             :     "\n"
   66650             :     "\n"
   66651             :     ""},
   66652             :    { "Band_GetNoDataValueAsUInt64", _wrap_Band_GetNoDataValueAsUInt64, METH_O, "\n"
   66653             :     "Band_GetNoDataValueAsUInt64(Band self)\n"
   66654             :     "\n"
   66655             :     "\n"
   66656             :     "Fetch the nodata value for this band.\n"
   66657             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsUInt64`.\n"
   66658             :     "\n"
   66659             :     "Returns\n"
   66660             :     "-------\n"
   66661             :     "int\n"
   66662             :     "    The nodata value, or ``None`` if it has not been set or\n"
   66663             :     "    the data type of this band is not :py:const:`gdal.GDT_UInt64`.\n"
   66664             :     "\n"
   66665             :     "\n"
   66666             :     ""},
   66667             :    { "Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, "Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   66668             :    { "Band_SetNoDataValueAsInt64", _wrap_Band_SetNoDataValueAsInt64, METH_VARARGS, "Band_SetNoDataValueAsInt64(Band self, GIntBig v) -> CPLErr"},
   66669             :    { "Band_SetNoDataValueAsUInt64", _wrap_Band_SetNoDataValueAsUInt64, METH_VARARGS, "Band_SetNoDataValueAsUInt64(Band self, GUIntBig v) -> CPLErr"},
   66670             :    { "Band_DeleteNoDataValue", _wrap_Band_DeleteNoDataValue, METH_O, "\n"
   66671             :     "Band_DeleteNoDataValue(Band self) -> CPLErr\n"
   66672             :     "\n"
   66673             :     "\n"
   66674             :     "Remove the nodata value for this band.\n"
   66675             :     "\n"
   66676             :     "Returns\n"
   66677             :     "-------\n"
   66678             :     "int:\n"
   66679             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66680             :     "\n"
   66681             :     "\n"
   66682             :     ""},
   66683             :    { "Band_GetUnitType", _wrap_Band_GetUnitType, METH_O, "\n"
   66684             :     "Band_GetUnitType(Band self) -> char const *\n"
   66685             :     "\n"
   66686             :     "\n"
   66687             :     "Return a name for the units of this raster's values.\n"
   66688             :     "See :cpp:func:`GDALRasterBand::GetUnitType`.\n"
   66689             :     "\n"
   66690             :     "Returns\n"
   66691             :     "-------\n"
   66692             :     "str\n"
   66693             :     "\n"
   66694             :     "Examples\n"
   66695             :     "--------\n"
   66696             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   66697             :     ">>> ds.GetRasterBand(1).SetUnitType('ft')\n"
   66698             :     "0\n"
   66699             :     ">>> ds.GetRasterBand(1).GetUnitType()\n"
   66700             :     "'ft'\n"
   66701             :     "\n"
   66702             :     ""},
   66703             :    { "Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, "\n"
   66704             :     "Band_SetUnitType(Band self, char const * val) -> CPLErr\n"
   66705             :     "\n"
   66706             :     "\n"
   66707             :     "Set unit type.\n"
   66708             :     "See :cpp:func:`GDALRasterBand::SetUnitType`.\n"
   66709             :     "\n"
   66710             :     "Parameters\n"
   66711             :     "----------\n"
   66712             :     "val : str\n"
   66713             :     "\n"
   66714             :     "Returns\n"
   66715             :     "-------\n"
   66716             :     "int:\n"
   66717             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66718             :     "\n"
   66719             :     ""},
   66720             :    { "Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_O, "\n"
   66721             :     "Band_GetRasterCategoryNames(Band self) -> char **\n"
   66722             :     "\n"
   66723             :     "\n"
   66724             :     "Fetch the list of category names for this band.\n"
   66725             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   66726             :     "\n"
   66727             :     "Returns\n"
   66728             :     "-------\n"
   66729             :     "list\n"
   66730             :     "    The list of names, or ``None`` if no names exist.\n"
   66731             :     "\n"
   66732             :     "\n"
   66733             :     ""},
   66734             :    { "Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, "\n"
   66735             :     "Band_SetRasterCategoryNames(Band self, char ** names) -> CPLErr\n"
   66736             :     "\n"
   66737             :     "Deprecated.  Alternate name for :py:meth:`SetCategoryNames`.\n"
   66738             :     "\n"
   66739             :     ""},
   66740             :    { "Band_GetMinimum", _wrap_Band_GetMinimum, METH_O, "\n"
   66741             :     "Band_GetMinimum(Band self)\n"
   66742             :     "\n"
   66743             :     "\n"
   66744             :     "Fetch a previously stored maximum value for this band.\n"
   66745             :     "See :cpp:func:`GDALRasterBand::GetMinimum`.\n"
   66746             :     "\n"
   66747             :     "Returns\n"
   66748             :     "-------\n"
   66749             :     "float\n"
   66750             :     "    The stored minimum value, or ``None`` if no value\n"
   66751             :     "    has been stored.\n"
   66752             :     "\n"
   66753             :     "\n"
   66754             :     ""},
   66755             :    { "Band_GetMaximum", _wrap_Band_GetMaximum, METH_O, "\n"
   66756             :     "Band_GetMaximum(Band self)\n"
   66757             :     "\n"
   66758             :     "\n"
   66759             :     "Fetch a previously stored maximum value for this band.\n"
   66760             :     "See :cpp:func:`GDALRasterBand::GetMaximum`.\n"
   66761             :     "\n"
   66762             :     "Returns\n"
   66763             :     "-------\n"
   66764             :     "float\n"
   66765             :     "    The stored maximum value, or ``None`` if no value\n"
   66766             :     "    has been stored.\n"
   66767             :     "\n"
   66768             :     "\n"
   66769             :     ""},
   66770             :    { "Band_GetOffset", _wrap_Band_GetOffset, METH_O, "\n"
   66771             :     "Band_GetOffset(Band self)\n"
   66772             :     "\n"
   66773             :     "\n"
   66774             :     "Fetch the raster value offset.\n"
   66775             :     "See :cpp:func:`GDALRasterBand::GetOffset`.\n"
   66776             :     "\n"
   66777             :     "Returns\n"
   66778             :     "-------\n"
   66779             :     "double\n"
   66780             :     "    The offset value, or ``0.0``.\n"
   66781             :     "\n"
   66782             :     "\n"
   66783             :     ""},
   66784             :    { "Band_GetScale", _wrap_Band_GetScale, METH_O, "\n"
   66785             :     "Band_GetScale(Band self)\n"
   66786             :     "\n"
   66787             :     "\n"
   66788             :     "Fetch the band scale value.\n"
   66789             :     "See :cpp:func:`GDALRasterBand::GetScale`.\n"
   66790             :     "\n"
   66791             :     "Returns\n"
   66792             :     "-------\n"
   66793             :     "double\n"
   66794             :     "    The scale value, or ``1.0``.\n"
   66795             :     "\n"
   66796             :     ""},
   66797             :    { "Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, "\n"
   66798             :     "Band_SetOffset(Band self, double val) -> CPLErr\n"
   66799             :     "\n"
   66800             :     "\n"
   66801             :     "Set scaling offset.\n"
   66802             :     "See :cpp:func:`GDALRasterBand::SetOffset`.\n"
   66803             :     "\n"
   66804             :     "Parameters\n"
   66805             :     "----------\n"
   66806             :     "val : float\n"
   66807             :     "\n"
   66808             :     "Returns\n"
   66809             :     "-------\n"
   66810             :     "int:\n"
   66811             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66812             :     "\n"
   66813             :     "See Also\n"
   66814             :     "--------\n"
   66815             :     ":py:meth:`SetScale`\n"
   66816             :     "\n"
   66817             :     ""},
   66818             :    { "Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, "\n"
   66819             :     "Band_SetScale(Band self, double val) -> CPLErr\n"
   66820             :     "\n"
   66821             :     "Set scaling ratio.\n"
   66822             :     "See :cpp:func:`GDALRasterBand::SetScale`.\n"
   66823             :     "\n"
   66824             :     "Parameters\n"
   66825             :     "----------\n"
   66826             :     "val : float\n"
   66827             :     "\n"
   66828             :     "Returns\n"
   66829             :     "-------\n"
   66830             :     "int:\n"
   66831             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66832             :     "\n"
   66833             :     "See Also\n"
   66834             :     "--------\n"
   66835             :     ":py:meth:`SetOffset`\n"
   66836             :     "\n"
   66837             :     ""},
   66838             :    { "Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, "\n"
   66839             :     "Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr\n"
   66840             :     "\n"
   66841             :     "\n"
   66842             :     "Return the minimum, maximum, mean, and standard deviation of all pixel values\n"
   66843             :     "in this band.\n"
   66844             :     "See :cpp:func:`GDALRasterBand::GetStatistics`\n"
   66845             :     "\n"
   66846             :     "Parameters\n"
   66847             :     "----------\n"
   66848             :     "approx_ok : bool\n"
   66849             :     "    If ``True``, allow overviews or a subset of image tiles to be used in\n"
   66850             :     "    computing the statistics.\n"
   66851             :     "force : bool\n"
   66852             :     "    If ``False``, only return a result if it can be obtained without scanning\n"
   66853             :     "    the image, i.e. from pre-existing metadata.\n"
   66854             :     "\n"
   66855             :     "Returns\n"
   66856             :     "-------\n"
   66857             :     "list\n"
   66858             :     "   a list with the min, max, mean, and standard deviation of values\n"
   66859             :     "   in the Band.\n"
   66860             :     "\n"
   66861             :     "See Also\n"
   66862             :     "--------\n"
   66863             :     ":py:meth:`ComputeBandStats`\n"
   66864             :     ":py:meth:`ComputeRasterMinMax`\n"
   66865             :     ":py:meth:`GetMaximum`\n"
   66866             :     ":py:meth:`GetMinimum`\n"
   66867             :     ":py:meth:`GetStatistics`\n"
   66868             :     "\n"
   66869             :     ""},
   66870             :    { "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"},
   66871             :    { "Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, "\n"
   66872             :     "Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr\n"
   66873             :     "\n"
   66874             :     "\n"
   66875             :     "Set statistics on band.\n"
   66876             :     "See :cpp:func:`GDALRasterBand::SetStatistics`.\n"
   66877             :     "\n"
   66878             :     "Parameters\n"
   66879             :     "----------\n"
   66880             :     "min : float\n"
   66881             :     "max : float\n"
   66882             :     "mean : float\n"
   66883             :     "stdev : float\n"
   66884             :     "\n"
   66885             :     "Returns\n"
   66886             :     "-------\n"
   66887             :     "int:\n"
   66888             :     "   :py:const:`CE_None` on apparent success or :py:const:`CE_Failure` on\n"
   66889             :     "   failure.  This method cannot detect whether metadata will be properly saved and\n"
   66890             :     "   so may return :py:const:`gdal.`CE_None` even if the statistics will never be\n"
   66891             :     "   saved.\n"
   66892             :     "\n"
   66893             :     "See Also\n"
   66894             :     "--------\n"
   66895             :     ":py:meth:`ComputeBandStats`\n"
   66896             :     ":py:meth:`ComputeRasterMinMax`\n"
   66897             :     ":py:meth:`ComputeStatistics`\n"
   66898             :     ":py:meth:`GetMaximum`\n"
   66899             :     ":py:meth:`GetMinimum`\n"
   66900             :     ":py:meth:`GetStatistics`\n"
   66901             :     "\n"
   66902             :     ""},
   66903             :    { "Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_O, "\n"
   66904             :     "Band_GetOverviewCount(Band self) -> int\n"
   66905             :     "\n"
   66906             :     "\n"
   66907             :     "Return the number of overview layers available.\n"
   66908             :     "See :cpp:func:`GDALRasterBand::GetOverviewCount`.\n"
   66909             :     "\n"
   66910             :     "Returns\n"
   66911             :     "-------\n"
   66912             :     "int\n"
   66913             :     "\n"
   66914             :     "\n"
   66915             :     ""},
   66916             :    { "Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, "\n"
   66917             :     "Band_GetOverview(Band self, int i) -> Band\n"
   66918             :     "\n"
   66919             :     "\n"
   66920             :     "Fetch a raster overview.\n"
   66921             :     "See :cpp:func:`GDALRasterBand::GetOverview`.\n"
   66922             :     "\n"
   66923             :     "Parameters\n"
   66924             :     "----------\n"
   66925             :     "i : int\n"
   66926             :     "    Overview index between 0 and ``GetOverviewCount() - 1``.\n"
   66927             :     "\n"
   66928             :     "Returns\n"
   66929             :     "-------\n"
   66930             :     "Band\n"
   66931             :     "\n"
   66932             :     "\n"
   66933             :     ""},
   66934             :    { "Band_GetSampleOverview", _wrap_Band_GetSampleOverview, METH_VARARGS, "Band_GetSampleOverview(Band self, GUIntBig nDesiredSamples) -> Band"},
   66935             :    { "Band_Checksum", (PyCFunction)(void(*)(void))_wrap_Band_Checksum, METH_VARARGS|METH_KEYWORDS, "\n"
   66936             :     "Band_Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int\n"
   66937             :     "\n"
   66938             :     "\n"
   66939             :     "Computes a checksum from a region of a RasterBand.\n"
   66940             :     "See :cpp:func:`GDALChecksumImage`.\n"
   66941             :     "\n"
   66942             :     "Parameters\n"
   66943             :     "----------\n"
   66944             :     "xoff : int, default=0\n"
   66945             :     "   The pixel offset to left side of the region of the band to\n"
   66946             :     "   be read. This would be zero to start from the left side.\n"
   66947             :     "yoff : int, default=0\n"
   66948             :     "   The line offset to top side of the region of the band to\n"
   66949             :     "   be read. This would be zero to start from the top side.\n"
   66950             :     "xsize : int, optional\n"
   66951             :     "     The number of pixels to read in the x direction. By default,\n"
   66952             :     "     equal to the number of columns in the raster.\n"
   66953             :     "ysize : int, optional\n"
   66954             :     "     The number of rows to read in the y direction. By default,\n"
   66955             :     "     equal to the number of bands in the raster.\n"
   66956             :     "\n"
   66957             :     "Returns\n"
   66958             :     "-------\n"
   66959             :     "int\n"
   66960             :     "    checksum value, or -1 in case of error\n"
   66961             :     "\n"
   66962             :     "\n"
   66963             :     ""},
   66964             :    { "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)"},
   66965             :    { "Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, "\n"
   66966             :     "Band_ComputeBandStats(Band self, int samplestep=1)\n"
   66967             :     "\n"
   66968             :     "\n"
   66969             :     "Computes the mean and standard deviation of values in this Band.\n"
   66970             :     "See :cpp:func:`GDALComputeBandStats`.\n"
   66971             :     "\n"
   66972             :     "Parameters\n"
   66973             :     "----------\n"
   66974             :     "samplestep : int, default=1\n"
   66975             :     "    Step between scanlines used to compute statistics.\n"
   66976             :     "\n"
   66977             :     "Returns\n"
   66978             :     "-------\n"
   66979             :     "tuple\n"
   66980             :     "    tuple of length 2 with value of mean and standard deviation\n"
   66981             :     "\n"
   66982             :     "See Also\n"
   66983             :     "--------\n"
   66984             :     ":py:meth:`ComputeRasterMinMax`\n"
   66985             :     ":py:meth:`ComputeStatistics`\n"
   66986             :     ":py:meth:`GetMaximum`\n"
   66987             :     ":py:meth:`GetMinimum`\n"
   66988             :     ":py:meth:`GetStatistics`\n"
   66989             :     ":py:meth:`SetStatistics`\n"
   66990             :     "\n"
   66991             :     ""},
   66992             :    { "Band_Fill", _wrap_Band_Fill, METH_VARARGS, "\n"
   66993             :     "Band_Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr\n"
   66994             :     "\n"
   66995             :     "\n"
   66996             :     "Fill this band with a constant value.\n"
   66997             :     "See :cpp:func:`GDALRasterBand::Fill`.\n"
   66998             :     "\n"
   66999             :     "Parameters\n"
   67000             :     "----------\n"
   67001             :     "real_fill : float\n"
   67002             :     "    real component of the fill value\n"
   67003             :     "imag_fill : float, default = 0.0\n"
   67004             :     "    imaginary component of the fill value\n"
   67005             :     "\n"
   67006             :     "Returns\n"
   67007             :     "-------\n"
   67008             :     "int:\n"
   67009             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67010             :     "\n"
   67011             :     "\n"
   67012             :     ""},
   67013             :    { "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"},
   67014             :    { "Band_FlushCache", _wrap_Band_FlushCache, METH_O, "\n"
   67015             :     "Band_FlushCache(Band self)\n"
   67016             :     "\n"
   67017             :     "\n"
   67018             :     "Flush raster data cache.\n"
   67019             :     "See :cpp:func:`GDALRasterBand::FlushCache`.\n"
   67020             :     "\n"
   67021             :     ""},
   67022             :    { "Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_O, "\n"
   67023             :     "Band_GetRasterColorTable(Band self) -> ColorTable\n"
   67024             :     "\n"
   67025             :     "\n"
   67026             :     "Fetch the color table associated with this band.\n"
   67027             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   67028             :     "\n"
   67029             :     "Returns\n"
   67030             :     "-------\n"
   67031             :     "ColorTable\n"
   67032             :     "    The :py:class:`ColorTable`, or ``None`` if it has not been defined.\n"
   67033             :     "\n"
   67034             :     ""},
   67035             :    { "Band_GetColorTable", _wrap_Band_GetColorTable, METH_O, "\n"
   67036             :     "Band_GetColorTable(Band self) -> ColorTable\n"
   67037             :     "\n"
   67038             :     "\n"
   67039             :     "Get the color table associated with this band.\n"
   67040             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   67041             :     "\n"
   67042             :     "Returns\n"
   67043             :     "-------\n"
   67044             :     "ColorTable or ``None``\n"
   67045             :     "\n"
   67046             :     ""},
   67047             :    { "Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, "\n"
   67048             :     "Band_SetRasterColorTable(Band self, ColorTable arg) -> int\n"
   67049             :     "\n"
   67050             :     "Deprecated. Alternate name for :py:meth:`SetColorTable`.\n"
   67051             :     "\n"
   67052             :     ""},
   67053             :    { "Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, "\n"
   67054             :     "Band_SetColorTable(Band self, ColorTable arg) -> int\n"
   67055             :     "\n"
   67056             :     "\n"
   67057             :     "Set the raster color table.\n"
   67058             :     "See :cpp:func:`GDALRasterBand::SetColorTable`.\n"
   67059             :     "\n"
   67060             :     "Parameters\n"
   67061             :     "----------\n"
   67062             :     "arg : ColorTable\n"
   67063             :     "\n"
   67064             :     "Returns\n"
   67065             :     "-------\n"
   67066             :     "int:\n"
   67067             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67068             :     "\n"
   67069             :     ""},
   67070             :    { "Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_O, "Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   67071             :    { "Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, "Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   67072             :    { "Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_O, "\n"
   67073             :     "Band_GetMaskBand(Band self) -> Band\n"
   67074             :     "\n"
   67075             :     "\n"
   67076             :     "Return the mask band associated with this band.\n"
   67077             :     "See :cpp:func:`GDALRasterBand::GetMaskBand`.\n"
   67078             :     "\n"
   67079             :     "Returns\n"
   67080             :     "-------\n"
   67081             :     "Band\n"
   67082             :     "\n"
   67083             :     "\n"
   67084             :     ""},
   67085             :    { "Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_O, "\n"
   67086             :     "Band_GetMaskFlags(Band self) -> int\n"
   67087             :     "\n"
   67088             :     "\n"
   67089             :     "Return the status flags of the mask band.\n"
   67090             :     "See :cpp:func:`GDALRasterBand::GetMaskFlags`.\n"
   67091             :     "\n"
   67092             :     "Returns\n"
   67093             :     "-------\n"
   67094             :     "int\n"
   67095             :     "\n"
   67096             :     "Examples\n"
   67097             :     "--------\n"
   67098             :     ">>> import numpy as np\n"
   67099             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   67100             :     ">>> band = ds.GetRasterBand(1)\n"
   67101             :     ">>> band.GetMaskFlags() == gdal.GMF_ALL_VALID\n"
   67102             :     "True\n"
   67103             :     ">>> band.SetNoDataValue(22)\n"
   67104             :     "0\n"
   67105             :     ">>> band.WriteArray(np.array([[22]]))\n"
   67106             :     "0\n"
   67107             :     ">>> band.GetMaskBand().ReadAsArray(win_xsize=2,win_ysize=2)\n"
   67108             :     "array([[  0, 255],\n"
   67109             :     "       [255, 255]], dtype=uint8)\n"
   67110             :     ">>> band.GetMaskFlags() == gdal.GMF_NODATA\n"
   67111             :     "True\n"
   67112             :     "\n"
   67113             :     "\n"
   67114             :     ""},
   67115             :    { "Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, "\n"
   67116             :     "Band_CreateMaskBand(Band self, int nFlags) -> CPLErr\n"
   67117             :     "\n"
   67118             :     "\n"
   67119             :     "Add a mask band to the current band.\n"
   67120             :     "See :cpp:func:`GDALRasterBand::CreateMaskBand`.\n"
   67121             :     "\n"
   67122             :     "Parameters\n"
   67123             :     "----------\n"
   67124             :     "nFlags : int\n"
   67125             :     "\n"
   67126             :     "Returns\n"
   67127             :     "-------\n"
   67128             :     "int:\n"
   67129             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67130             :     "\n"
   67131             :     "\n"
   67132             :     ""},
   67133             :    { "Band_IsMaskBand", _wrap_Band_IsMaskBand, METH_O, "\n"
   67134             :     "Band_IsMaskBand(Band self) -> bool\n"
   67135             :     "\n"
   67136             :     "\n"
   67137             :     "Returns whether the band is a mask band.\n"
   67138             :     "See :cpp:func:`GDALRasterBand::IsMaskBand`.\n"
   67139             :     "\n"
   67140             :     "Returns\n"
   67141             :     "-------\n"
   67142             :     "bool\n"
   67143             :     "\n"
   67144             :     ""},
   67145             :    { "Band_GetHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   67146             :     "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"
   67147             :     "\n"
   67148             :     "\n"
   67149             :     "Compute raster histogram.\n"
   67150             :     "See :cpp:func:`GDALRasterBand::GetHistogram`.\n"
   67151             :     "\n"
   67152             :     "Parameters\n"
   67153             :     "----------\n"
   67154             :     "min : float, default=-0.05\n"
   67155             :     "    the lower bound of the histogram\n"
   67156             :     "max : float, default=255.5\n"
   67157             :     "    the upper bound of the histogram\n"
   67158             :     "buckets : int, default=256\n"
   67159             :     "    the number of buckets int he histogram\n"
   67160             :     "include_out_of_range : bool, default=False\n"
   67161             :     "    if ``True``, add out-of-range values into the first and last buckets\n"
   67162             :     "approx_ok : bool, default=True\n"
   67163             :     "    if ``True``, compute an approximate histogram by using subsampling or overviews\n"
   67164             :     "callback : function, optional\n"
   67165             :     "             A progress callback function\n"
   67166             :     "callback_data: optional\n"
   67167             :     "             Optional data to be passed to callback function\n"
   67168             :     "\n"
   67169             :     "Returns\n"
   67170             :     "-------\n"
   67171             :     "list\n"
   67172             :     "    list with length equal to ``buckets``. If ``approx_ok`` is ``False``, each\n"
   67173             :     "    the value of each list item will equal the number of pixels in that bucket.\n"
   67174             :     "\n"
   67175             :     "Examples\n"
   67176             :     "--------\n"
   67177             :     ">>> np.random.seed(123)\n"
   67178             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10, eType=gdal.GDT_Float32)\n"
   67179             :     ">>> ds.WriteArray(np.random.normal(size=100).reshape(10, 10))\n"
   67180             :     "0\n"
   67181             :     ">>> ds.GetRasterBand(1).GetHistogram(min=-3.5, max=3.5, buckets=13, approx_ok=False)\n"
   67182             :     "[0, 2, 1, 6, 17, 18, 13, 14, 16, 8, 5, 0, 0]\n"
   67183             :     "\n"
   67184             :     ""},
   67185             :    { "Band_GetDefaultHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetDefaultHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   67186             :     "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"
   67187             :     "\n"
   67188             :     "\n"
   67189             :     "Fetch the default histogram for this band.\n"
   67190             :     "See :cpp:func:`GDALRasterBand::GetDefaultHistogram`.\n"
   67191             :     "\n"
   67192             :     "Returns\n"
   67193             :     "-------\n"
   67194             :     "list\n"
   67195             :     "    List with the following four elements:\n"
   67196             :     "    - lower bound of histogram\n"
   67197             :     "    - upper bound of histogram\n"
   67198             :     "    - number of buckets in histogram\n"
   67199             :     "    - tuple with counts for each bucket\n"
   67200             :     "\n"
   67201             :     ""},
   67202             :    { "Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, "\n"
   67203             :     "Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr\n"
   67204             :     "\n"
   67205             :     "\n"
   67206             :     "Set default histogram.\n"
   67207             :     "See :cpp:func:`GDALRasterBand::SetDefaultHistogram`.\n"
   67208             :     "\n"
   67209             :     "Parameters\n"
   67210             :     "----------\n"
   67211             :     "min : float\n"
   67212             :     "    minimum value\n"
   67213             :     "max : float\n"
   67214             :     "    maximum value\n"
   67215             :     "buckets_in : list\n"
   67216             :     "    list of pixel counts for each bucket\n"
   67217             :     "\n"
   67218             :     "Returns\n"
   67219             :     "-------\n"
   67220             :     "int:\n"
   67221             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67222             :     "\n"
   67223             :     "See Also\n"
   67224             :     "--------\n"
   67225             :     ":py:meth:`SetHistogram`\n"
   67226             :     "\n"
   67227             :     ""},
   67228             :    { "Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_O, "\n"
   67229             :     "Band_HasArbitraryOverviews(Band self) -> bool\n"
   67230             :     "\n"
   67231             :     "\n"
   67232             :     "Check for arbitrary overviews.\n"
   67233             :     "See :cpp:func:`GDALRasterBand::HasArbitraryOverviews`.\n"
   67234             :     "\n"
   67235             :     "Returns\n"
   67236             :     "-------\n"
   67237             :     "bool\n"
   67238             :     "\n"
   67239             :     ""},
   67240             :    { "Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_O, "\n"
   67241             :     "Band_GetCategoryNames(Band self) -> char **\n"
   67242             :     "\n"
   67243             :     "\n"
   67244             :     "Fetch the list of category names for this raster.\n"
   67245             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   67246             :     "\n"
   67247             :     "Returns\n"
   67248             :     "-------\n"
   67249             :     "list\n"
   67250             :     "    A list of category names, or ``None``\n"
   67251             :     "\n"
   67252             :     ""},
   67253             :    { "Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, "\n"
   67254             :     "Band_SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr\n"
   67255             :     "\n"
   67256             :     "\n"
   67257             :     "Set the category names for this band.\n"
   67258             :     "See :cpp:func:`GDALRasterBand::SetCategoryNames`.\n"
   67259             :     "\n"
   67260             :     "Parameters\n"
   67261             :     "----------\n"
   67262             :     "papszCategoryNames : list\n"
   67263             :     "\n"
   67264             :     "Returns\n"
   67265             :     "-------\n"
   67266             :     "int:\n"
   67267             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67268             :     "\n"
   67269             :     ""},
   67270             :    { "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"},
   67271             :    { "Band_GetVirtualMemAuto", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMemAuto, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem"},
   67272             :    { "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"},
   67273             :    { "Band_GetDataCoverageStatus", _wrap_Band_GetDataCoverageStatus, METH_VARARGS, "\n"
   67274             :     "Band_GetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int\n"
   67275             :     "\n"
   67276             :     "\n"
   67277             :     "Determine whether a sub-window of the Band contains only data, only empty blocks, or a mix of both.\n"
   67278             :     "See :cpp:func:`GDALRasterBand::GetDataCoverageStatus`.\n"
   67279             :     "\n"
   67280             :     "Parameters\n"
   67281             :     "----------\n"
   67282             :     "nXOff : int\n"
   67283             :     "nYOff : int\n"
   67284             :     "nXSize : int\n"
   67285             :     "nYSize : int\n"
   67286             :     "nMaskFlagStop : int, default=0\n"
   67287             :     "\n"
   67288             :     "Returns\n"
   67289             :     "-------\n"
   67290             :     "list\n"
   67291             :     "    First value represents a bitwise-or value of the following constants\n"
   67292             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_DATA`\n"
   67293             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_EMPTY`\n"
   67294             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED`\n"
   67295             :     "    Second value represents the approximate percentage in [0, 100] of pixels in the window that have valid values\n"
   67296             :     "\n"
   67297             :     "Examples\n"
   67298             :     "--------\n"
   67299             :     ">>> import numpy as np\n"
   67300             :     ">>> # Create a raster with four blocks\n"
   67301             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 64, 64, options = {'SPARSE_OK':True, 'TILED':True, 'BLOCKXSIZE':32, 'BLOCKYSIZE':32})\n"
   67302             :     ">>> band = ds.GetRasterBand(1)\n"
   67303             :     ">>> # Write some data to upper-left block\n"
   67304             :     ">>> band.WriteArray(np.array([[1, 2], [3, 4]]))\n"
   67305             :     "0\n"
   67306             :     ">>> # Check status of upper-left block\n"
   67307             :     ">>> flags, pct = band.GetDataCoverageStatus(0, 0, 32, 32)\n"
   67308             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA\n"
   67309             :     "True\n"
   67310             :     ">>> pct\n"
   67311             :     "100.0\n"
   67312             :     ">>> # Check status of upper-right block\n"
   67313             :     ">>> flags, pct = band.GetDataCoverageStatus(32, 0, 32, 32)\n"
   67314             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   67315             :     "True\n"
   67316             :     ">>> pct\n"
   67317             :     "0.0\n"
   67318             :     ">>> # Check status of window touching all four blocks\n"
   67319             :     ">>> flags, pct = band.GetDataCoverageStatus(16, 16, 32, 32)\n"
   67320             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   67321             :     "True\n"
   67322             :     ">>> pct\n"
   67323             :     "25.0\n"
   67324             :     "\n"
   67325             :     ""},
   67326             :    { "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"},
   67327             :    { "Band_InterpolateAtPoint", _wrap_Band_InterpolateAtPoint, METH_VARARGS, "Band_InterpolateAtPoint(Band self, double pixel, double line, GDALRIOResampleAlg interpolation) -> CPLErr"},
   67328             :    { "Band_InterpolateAtGeolocation", _wrap_Band_InterpolateAtGeolocation, METH_VARARGS, "Band_InterpolateAtGeolocation(Band self, double geolocX, double geolocY, SpatialReference srs, GDALRIOResampleAlg interpolation, char ** transformerOptions=None) -> CPLErr"},
   67329             :    { "Band_ComputeMinMaxLocation", _wrap_Band_ComputeMinMaxLocation, METH_O, "Band_ComputeMinMaxLocation(Band self) -> CPLErr"},
   67330             :    { "Band_AsMDArray", _wrap_Band_AsMDArray, METH_O, "Band_AsMDArray(Band self) -> MDArray"},
   67331             :    { "Band__EnablePixelTypeSignedByteWarning", _wrap_Band__EnablePixelTypeSignedByteWarning, METH_VARARGS, "Band__EnablePixelTypeSignedByteWarning(Band self, bool b)"},
   67332             :    { "Band_UnaryOp", _wrap_Band_UnaryOp, METH_VARARGS, "Band_UnaryOp(Band self, GDALRasterAlgebraUnaryOperation op) -> ComputedBand"},
   67333             :    { "Band_BinaryOpBand", _wrap_Band_BinaryOpBand, METH_VARARGS, "Band_BinaryOpBand(Band self, GDALRasterAlgebraBinaryOperation op, Band other) -> ComputedBand"},
   67334             :    { "Band_BinaryOpDouble", _wrap_Band_BinaryOpDouble, METH_VARARGS, "Band_BinaryOpDouble(Band self, GDALRasterAlgebraBinaryOperation op, double constant) -> ComputedBand"},
   67335             :    { "Band_BinaryOpDoubleToBand", _wrap_Band_BinaryOpDoubleToBand, METH_VARARGS, "Band_BinaryOpDoubleToBand(double constant, GDALRasterAlgebraBinaryOperation op, Band band) -> ComputedBand"},
   67336             :    { "Band_IfThenElse", _wrap_Band_IfThenElse, METH_VARARGS, "Band_IfThenElse(Band condBand, Band thenBand, Band elseBand) -> ComputedBand"},
   67337             :    { "Band_AsType", _wrap_Band_AsType, METH_VARARGS, "Band_AsType(Band self, GDALDataType dt) -> ComputedBand"},
   67338             :    { "Band_MaximumOfNBands", _wrap_Band_MaximumOfNBands, METH_O, "Band_MaximumOfNBands(int band_count) -> ComputedBand"},
   67339             :    { "Band_MaxConstant", _wrap_Band_MaxConstant, METH_VARARGS, "Band_MaxConstant(Band self, double constant) -> ComputedBand"},
   67340             :    { "Band_MinimumOfNBands", _wrap_Band_MinimumOfNBands, METH_O, "Band_MinimumOfNBands(int band_count) -> ComputedBand"},
   67341             :    { "Band_MinConstant", _wrap_Band_MinConstant, METH_VARARGS, "Band_MinConstant(Band self, double constant) -> ComputedBand"},
   67342             :    { "Band_MeanOfNBands", _wrap_Band_MeanOfNBands, METH_O, "Band_MeanOfNBands(int band_count) -> ComputedBand"},
   67343             :    { "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"},
   67344             :    { "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"},
   67345             :    { "Band_swigregister", Band_swigregister, METH_O, NULL},
   67346             :    { "delete_ComputedBand", _wrap_delete_ComputedBand, METH_O, "delete_ComputedBand(ComputedBand self)"},
   67347             :    { "ComputedBand_swigregister", ComputedBand_swigregister, METH_O, NULL},
   67348             :    { "new_ColorTable", (PyCFunction)(void(*)(void))_wrap_new_ColorTable, METH_VARARGS|METH_KEYWORDS, "new_ColorTable(GDALPaletteInterp palette=GPI_RGB) -> ColorTable"},
   67349             :    { "delete_ColorTable", _wrap_delete_ColorTable, METH_O, "delete_ColorTable(ColorTable self)"},
   67350             :    { "ColorTable_Clone", _wrap_ColorTable_Clone, METH_O, "ColorTable_Clone(ColorTable self) -> ColorTable"},
   67351             :    { "ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_O, "ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   67352             :    { "ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_O, "ColorTable_GetCount(ColorTable self) -> int"},
   67353             :    { "ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, "ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   67354             :    { "ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, "ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   67355             :    { "ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, "ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   67356             :    { "ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor)"},
   67357             :    { "ColorTable_swigregister", ColorTable_swigregister, METH_O, NULL},
   67358             :    { "ColorTable_swiginit", ColorTable_swiginit, METH_VARARGS, NULL},
   67359             :    { "delete_SubdatasetInfo", _wrap_delete_SubdatasetInfo, METH_O, "delete_SubdatasetInfo(SubdatasetInfo self)"},
   67360             :    { "SubdatasetInfo_GetPathComponent", _wrap_SubdatasetInfo_GetPathComponent, METH_O, "SubdatasetInfo_GetPathComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   67361             :    { "SubdatasetInfo_GetSubdatasetComponent", _wrap_SubdatasetInfo_GetSubdatasetComponent, METH_O, "SubdatasetInfo_GetSubdatasetComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   67362             :    { "SubdatasetInfo_ModifyPathComponent", _wrap_SubdatasetInfo_ModifyPathComponent, METH_VARARGS, "SubdatasetInfo_ModifyPathComponent(SubdatasetInfo self, char const * pszNewFileName) -> retStringAndCPLFree *"},
   67363             :    { "SubdatasetInfo_swigregister", SubdatasetInfo_swigregister, METH_O, NULL},
   67364             :    { "GetSubdatasetInfo", _wrap_GetSubdatasetInfo, METH_O, "GetSubdatasetInfo(char const * pszFileName) -> GDALSubdatasetInfoShadow *"},
   67365             :    { "new_Relationship", _wrap_new_Relationship, METH_VARARGS, "new_Relationship(char const * name, char const * leftTableName, char const * rightTableName, GDALRelationshipCardinality cardinality) -> Relationship"},
   67366             :    { "delete_Relationship", _wrap_delete_Relationship, METH_O, "delete_Relationship(Relationship self)"},
   67367             :    { "Relationship_GetName", _wrap_Relationship_GetName, METH_O, "Relationship_GetName(Relationship self) -> char const *"},
   67368             :    { "Relationship_GetCardinality", _wrap_Relationship_GetCardinality, METH_O, "Relationship_GetCardinality(Relationship self) -> GDALRelationshipCardinality"},
   67369             :    { "Relationship_GetLeftTableName", _wrap_Relationship_GetLeftTableName, METH_O, "Relationship_GetLeftTableName(Relationship self) -> char const *"},
   67370             :    { "Relationship_GetRightTableName", _wrap_Relationship_GetRightTableName, METH_O, "Relationship_GetRightTableName(Relationship self) -> char const *"},
   67371             :    { "Relationship_GetMappingTableName", _wrap_Relationship_GetMappingTableName, METH_O, "Relationship_GetMappingTableName(Relationship self) -> char const *"},
   67372             :    { "Relationship_SetMappingTableName", _wrap_Relationship_SetMappingTableName, METH_VARARGS, "Relationship_SetMappingTableName(Relationship self, char const * pszName)"},
   67373             :    { "Relationship_GetLeftTableFields", _wrap_Relationship_GetLeftTableFields, METH_O, "Relationship_GetLeftTableFields(Relationship self) -> char **"},
   67374             :    { "Relationship_GetRightTableFields", _wrap_Relationship_GetRightTableFields, METH_O, "Relationship_GetRightTableFields(Relationship self) -> char **"},
   67375             :    { "Relationship_SetLeftTableFields", _wrap_Relationship_SetLeftTableFields, METH_VARARGS, "Relationship_SetLeftTableFields(Relationship self, char ** pFields)"},
   67376             :    { "Relationship_SetRightTableFields", _wrap_Relationship_SetRightTableFields, METH_VARARGS, "Relationship_SetRightTableFields(Relationship self, char ** pFields)"},
   67377             :    { "Relationship_GetLeftMappingTableFields", _wrap_Relationship_GetLeftMappingTableFields, METH_O, "Relationship_GetLeftMappingTableFields(Relationship self) -> char **"},
   67378             :    { "Relationship_GetRightMappingTableFields", _wrap_Relationship_GetRightMappingTableFields, METH_O, "Relationship_GetRightMappingTableFields(Relationship self) -> char **"},
   67379             :    { "Relationship_SetLeftMappingTableFields", _wrap_Relationship_SetLeftMappingTableFields, METH_VARARGS, "Relationship_SetLeftMappingTableFields(Relationship self, char ** pFields)"},
   67380             :    { "Relationship_SetRightMappingTableFields", _wrap_Relationship_SetRightMappingTableFields, METH_VARARGS, "Relationship_SetRightMappingTableFields(Relationship self, char ** pFields)"},
   67381             :    { "Relationship_GetType", _wrap_Relationship_GetType, METH_O, "Relationship_GetType(Relationship self) -> GDALRelationshipType"},
   67382             :    { "Relationship_SetType", _wrap_Relationship_SetType, METH_VARARGS, "Relationship_SetType(Relationship self, GDALRelationshipType type)"},
   67383             :    { "Relationship_GetForwardPathLabel", _wrap_Relationship_GetForwardPathLabel, METH_O, "Relationship_GetForwardPathLabel(Relationship self) -> char const *"},
   67384             :    { "Relationship_SetForwardPathLabel", _wrap_Relationship_SetForwardPathLabel, METH_VARARGS, "Relationship_SetForwardPathLabel(Relationship self, char const * pszLabel)"},
   67385             :    { "Relationship_GetBackwardPathLabel", _wrap_Relationship_GetBackwardPathLabel, METH_O, "Relationship_GetBackwardPathLabel(Relationship self) -> char const *"},
   67386             :    { "Relationship_SetBackwardPathLabel", _wrap_Relationship_SetBackwardPathLabel, METH_VARARGS, "Relationship_SetBackwardPathLabel(Relationship self, char const * pszLabel)"},
   67387             :    { "Relationship_GetRelatedTableType", _wrap_Relationship_GetRelatedTableType, METH_O, "Relationship_GetRelatedTableType(Relationship self) -> char const *"},
   67388             :    { "Relationship_SetRelatedTableType", _wrap_Relationship_SetRelatedTableType, METH_VARARGS, "Relationship_SetRelatedTableType(Relationship self, char const * pszType)"},
   67389             :    { "Relationship_swigregister", Relationship_swigregister, METH_O, NULL},
   67390             :    { "Relationship_swiginit", Relationship_swiginit, METH_VARARGS, NULL},
   67391             :    { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
   67392             :    { "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"},
   67393             :    { "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"},
   67394             :    { "ReprojectImage", (PyCFunction)(void(*)(void))_wrap_ReprojectImage, METH_VARARGS|METH_KEYWORDS, "\n"
   67395             :     "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"
   67396             :     "\n"
   67397             :     "\n"
   67398             :     "Reproject image.\n"
   67399             :     "\n"
   67400             :     "See :cpp:func:`GDALReprojectImage`.\n"
   67401             :     "\n"
   67402             :     "Consider using :py:func:`osgeo.gdal.Warp` and :py:func:`osgeo.gdal.WarpOptions` instead\n"
   67403             :     "\n"
   67404             :     ""},
   67405             :    { "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"},
   67406             :    { "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"},
   67407             :    { "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"},
   67408             :    { "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"},
   67409             :    { "FillNodata", (PyCFunction)(void(*)(void))_wrap_FillNodata, METH_VARARGS|METH_KEYWORDS, "\n"
   67410             :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int\n"
   67411             :     "\n"
   67412             :     "\n"
   67413             :     "Fill selected raster regions by interpolation from the edges.\n"
   67414             :     "\n"
   67415             :     "This algorithm will interpolate values for all designated\n"
   67416             :     "nodata pixels (marked by zeros in ``maskBand``). For each pixel\n"
   67417             :     "a four direction conic search is done to find values to interpolate\n"
   67418             :     "from (using inverse distance weighting by default). Once all values are\n"
   67419             :     "interpolated, zero or more smoothing iterations (3x3 average\n"
   67420             :     "filters on interpolated pixels) are applied to smooth out\n"
   67421             :     "artifacts.\n"
   67422             :     "\n"
   67423             :     "This algorithm is generally suitable for interpolating missing\n"
   67424             :     "regions of fairly continuously varying rasters (such as elevation\n"
   67425             :     "models for instance). It is also suitable for filling small holes\n"
   67426             :     "and cracks in more irregularly varying images (like airphotos). It\n"
   67427             :     "is generally not so great for interpolating a raster from sparse\n"
   67428             :     "point data. See :py:func:`Grid` for that case.\n"
   67429             :     "\n"
   67430             :     "See :cpp:func:`GDALFillNodata`.\n"
   67431             :     "\n"
   67432             :     "Parameters\n"
   67433             :     "----------\n"
   67434             :     "targetBand : Band\n"
   67435             :     "    Band containing values to fill. Will be modified in-place.\n"
   67436             :     "maskBand : Band\n"
   67437             :     "    Mask band with a value of 0 indicating values that should be filled.\n"
   67438             :     "    If not specified, the mask band associated with ``targetBand`` will be used.\n"
   67439             :     "maxSearchDist : float\n"
   67440             :     "    the maximum number of pixels to search in all directions to find values to interpolate from.\n"
   67441             :     "smoothingIterations : int\n"
   67442             :     "    the number of 3x3 smoothing filter passes to run (0 or more)\n"
   67443             :     "options : dict/list, optional\n"
   67444             :     "    A dict or list of name=value options. Available options are\n"
   67445             :     "    described in :cpp:func:`GDALFillNodata`.\n"
   67446             :     "callback : function, optional\n"
   67447             :     "   A progress callback function\n"
   67448             :     "callback_data: optional\n"
   67449             :     "   Optional data to be passed to callback function\n"
   67450             :     "\n"
   67451             :     "Returns\n"
   67452             :     "-------\n"
   67453             :     "int\n"
   67454             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67455             :     "\n"
   67456             :     "Examples\n"
   67457             :     "--------\n"
   67458             :     ">>> import numpy as np\n"
   67459             :     ">>> data = np.array([[1, 2], [9, 9], [9, 9], [3, 4]], dtype=np.float32)\n"
   67460             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Float32)\n"
   67461             :     ">>> ds.WriteArray(data)\n"
   67462             :     "0\n"
   67463             :     ">>> mask = data != 9  # replace pixels with value = 9\n"
   67464             :     ">>> mask_ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Byte)\n"
   67465             :     ">>> mask_ds.WriteArray(mask)\n"
   67466             :     "0\n"
   67467             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0)\n"
   67468             :     "0\n"
   67469             :     ">>> ds.ReadAsArray()\n"
   67470             :     "array([[1.       , 2.       ],\n"
   67471             :     "       [2.1485982, 2.6666667],\n"
   67472             :     "       [2.721169 , 3.3333333],\n"
   67473             :     "       [3.       , 4.       ]], dtype=float32)\n"
   67474             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0, {'INTERPOLATION':'NEAREST'})\n"
   67475             :     "0\n"
   67476             :     ">>> ds.ReadAsArray()\n"
   67477             :     "array([[1., 2.],\n"
   67478             :     "       [1., 2.],\n"
   67479             :     "       [3., 4.],\n"
   67480             :     "       [3., 4.]], dtype=float32)\n"
   67481             :     "\n"
   67482             :     "\n"
   67483             :     ""},
   67484             :    { "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"},
   67485             :    { "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"},
   67486             :    { "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"},
   67487             :    { "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"},
   67488             :    { "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"},
   67489             :    { "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"},
   67490             :    { "IsLineOfSightVisible", (PyCFunction)(void(*)(void))_wrap_IsLineOfSightVisible, METH_VARARGS|METH_KEYWORDS, "\n"
   67491             :     "IsLineOfSightVisible(Band band, int xA, int yA, double zA, int xB, int yB, double zB, char ** options=None)\n"
   67492             :     "\n"
   67493             :     "\n"
   67494             :     "Check Line of Sight between two points.\n"
   67495             :     "Both input coordinates must be within the raster coordinate bounds.\n"
   67496             :     "\n"
   67497             :     " See :cpp:func:`GDALIsLineOfSightVisible`.\n"
   67498             :     "\n"
   67499             :     ".. versionadded:: 3.9\n"
   67500             :     "\n"
   67501             :     "Parameters\n"
   67502             :     "----------\n"
   67503             :     "band : gdal.RasterBand\n"
   67504             :     "    The band to read the DEM data from. This must NOT be null.\n"
   67505             :     "xA : int\n"
   67506             :     "    The X location (raster column) of the first point to check on the raster.\n"
   67507             :     "yA : int\n"
   67508             :     "    The Y location (raster row) of the first point to check on the raster.\n"
   67509             :     "zA : float\n"
   67510             :     "    The Z location (height) of the first point to check.\n"
   67511             :     "xB : int\n"
   67512             :     "    The X location (raster column) of the second point to check on the raster.\n"
   67513             :     "yB : int\n"
   67514             :     "    The Y location (raster row) of the second point to check on the raster.\n"
   67515             :     "zB : float\n"
   67516             :     "    The Z location (height) of the second point to check.\n"
   67517             :     "options : dict/list, optional\n"
   67518             :     "    A dict or list of name=value of options for the line of sight algorithm (currently ignored).\n"
   67519             :     "\n"
   67520             :     "Returns\n"
   67521             :     "-------\n"
   67522             :     "collections.namedtuple(is_visible: bool, col_intersection: int, row_intersection: int)\n"
   67523             :     "    is_visible is True if the two points are within Line of Sight.\n"
   67524             :     "    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"
   67525             :     "    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"
   67526             :     "\n"
   67527             :     ""},
   67528             :    { "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"},
   67529             :    { "CreatePansharpenedVRT", _wrap_CreatePansharpenedVRT, METH_VARARGS, "CreatePansharpenedVRT(char const * pszXML, Band panchroBand, int nInputSpectralBands) -> Dataset"},
   67530             :    { "GetTranformerOptionList", _wrap_GetTranformerOptionList, METH_NOARGS, "GetTranformerOptionList() -> char const *"},
   67531             :    { "delete_GDALTransformerInfoShadow", _wrap_delete_GDALTransformerInfoShadow, METH_O, "delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow self)"},
   67532             :    { "GDALTransformerInfoShadow_TransformPoint", _wrap_GDALTransformerInfoShadow_TransformPoint, METH_VARARGS, "\n"
   67533             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double [3] inout) -> int\n"
   67534             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double x, double y, double z=0.0) -> int\n"
   67535             :     ""},
   67536             :    { "GDALTransformerInfoShadow_TransformPoints", _wrap_GDALTransformerInfoShadow_TransformPoints, METH_VARARGS, "GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow self, int bDstToSrc, int nCount) -> int"},
   67537             :    { "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"},
   67538             :    { "GDALTransformerInfoShadow_swigregister", GDALTransformerInfoShadow_swigregister, METH_O, NULL},
   67539             :    { "Transformer", _wrap_Transformer, METH_VARARGS, "Transformer(Dataset src, Dataset dst, char ** options) -> GDALTransformerInfoShadow"},
   67540             :    { "WarpGetOptionList", _wrap_WarpGetOptionList, METH_NOARGS, "WarpGetOptionList() -> char const *"},
   67541             :    { "SuggestedWarpOutputRes_width_get", _wrap_SuggestedWarpOutputRes_width_get, METH_O, "SuggestedWarpOutputRes_width_get(SuggestedWarpOutputRes self) -> int"},
   67542             :    { "SuggestedWarpOutputRes_height_get", _wrap_SuggestedWarpOutputRes_height_get, METH_O, "SuggestedWarpOutputRes_height_get(SuggestedWarpOutputRes self) -> int"},
   67543             :    { "SuggestedWarpOutputRes_xmin_get", _wrap_SuggestedWarpOutputRes_xmin_get, METH_O, "SuggestedWarpOutputRes_xmin_get(SuggestedWarpOutputRes self) -> double"},
   67544             :    { "SuggestedWarpOutputRes_ymin_get", _wrap_SuggestedWarpOutputRes_ymin_get, METH_O, "SuggestedWarpOutputRes_ymin_get(SuggestedWarpOutputRes self) -> double"},
   67545             :    { "SuggestedWarpOutputRes_xmax_get", _wrap_SuggestedWarpOutputRes_xmax_get, METH_O, "SuggestedWarpOutputRes_xmax_get(SuggestedWarpOutputRes self) -> double"},
   67546             :    { "SuggestedWarpOutputRes_ymax_get", _wrap_SuggestedWarpOutputRes_ymax_get, METH_O, "SuggestedWarpOutputRes_ymax_get(SuggestedWarpOutputRes self) -> double"},
   67547             :    { "delete_SuggestedWarpOutputRes", _wrap_delete_SuggestedWarpOutputRes, METH_O, "delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes self)"},
   67548             :    { "SuggestedWarpOutputRes_GetGeotransform", _wrap_SuggestedWarpOutputRes_GetGeotransform, METH_O, "SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes self)"},
   67549             :    { "SuggestedWarpOutputRes_swigregister", SuggestedWarpOutputRes_swigregister, METH_O, NULL},
   67550             :    { "SuggestedWarpOutputFromTransformer", _wrap_SuggestedWarpOutputFromTransformer, METH_VARARGS, "SuggestedWarpOutputFromTransformer(Dataset src, GDALTransformerInfoShadow transformer) -> SuggestedWarpOutputRes"},
   67551             :    { "SuggestedWarpOutputFromOptions", _wrap_SuggestedWarpOutputFromOptions, METH_VARARGS, "SuggestedWarpOutputFromOptions(Dataset src, char ** options) -> SuggestedWarpOutputRes"},
   67552             :    { "_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"},
   67553             :    { "GetGlobalAlgorithmRegistry", _wrap_GetGlobalAlgorithmRegistry, METH_NOARGS, "\n"
   67554             :     "GetGlobalAlgorithmRegistry() -> AlgorithmRegistry\n"
   67555             :     "\n"
   67556             :     "\n"
   67557             :     "Return the default algorithm registry.\n"
   67558             :     "\n"
   67559             :     "Returns\n"
   67560             :     "-------\n"
   67561             :     "AlgorithmRegistry\n"
   67562             :     "\n"
   67563             :     "\n"
   67564             :     ""},
   67565             :    { "AlgorithmArgTypeIsList", _wrap_AlgorithmArgTypeIsList, METH_O, "\n"
   67566             :     "AlgorithmArgTypeIsList(GDALAlgorithmArgType type) -> bool\n"
   67567             :     "\n"
   67568             :     "\n"
   67569             :     "Test whether an argument type represents a list.\n"
   67570             :     "\n"
   67571             :     "Parameters\n"
   67572             :     "----------\n"
   67573             :     "type : int\n"
   67574             :     "\n"
   67575             :     "Returns\n"
   67576             :     "-------\n"
   67577             :     "boolean\n"
   67578             :     "\n"
   67579             :     "Examples\n"
   67580             :     "--------\n"
   67581             :     ">>> gdal.AlgorithmArgTypeIsList(gdal.GAAT_REAL)\n"
   67582             :     "False\n"
   67583             :     ">>> gdal.AlgorithmArgTypeIsList(gdal.GAAT_REAL_LIST)\n"
   67584             :     "True\n"
   67585             :     "\n"
   67586             :     "\n"
   67587             :     ""},
   67588             :    { "AlgorithmArgTypeName", _wrap_AlgorithmArgTypeName, METH_O, "\n"
   67589             :     "AlgorithmArgTypeName(GDALAlgorithmArgType type) -> char const *\n"
   67590             :     "\n"
   67591             :     "\n"
   67592             :     "Return a text representation of an argument type code.\n"
   67593             :     "\n"
   67594             :     "Parameters\n"
   67595             :     "----------\n"
   67596             :     "type : int\n"
   67597             :     "\n"
   67598             :     "Returns\n"
   67599             :     "-------\n"
   67600             :     "str\n"
   67601             :     "\n"
   67602             :     "Example\n"
   67603             :     "-------\n"
   67604             :     ">>> gdal.AlgorithmArgTypeName(gdal.GAAT_REAL)\n"
   67605             :     "'real'\n"
   67606             :     "\n"
   67607             :     "\n"
   67608             :     ""},
   67609             :    { "delete_AlgorithmArg", _wrap_delete_AlgorithmArg, METH_O, "delete_AlgorithmArg(AlgorithmArg self)"},
   67610             :    { "AlgorithmArg_GetName", _wrap_AlgorithmArg_GetName, METH_O, "AlgorithmArg_GetName(AlgorithmArg self) -> char const *"},
   67611             :    { "AlgorithmArg_GetType", _wrap_AlgorithmArg_GetType, METH_O, "AlgorithmArg_GetType(AlgorithmArg self) -> GDALAlgorithmArgType"},
   67612             :    { "AlgorithmArg_GetDescription", _wrap_AlgorithmArg_GetDescription, METH_O, "AlgorithmArg_GetDescription(AlgorithmArg self) -> char const *"},
   67613             :    { "AlgorithmArg_GetShortName", _wrap_AlgorithmArg_GetShortName, METH_O, "AlgorithmArg_GetShortName(AlgorithmArg self) -> char const *"},
   67614             :    { "AlgorithmArg_GetAliases", _wrap_AlgorithmArg_GetAliases, METH_O, "AlgorithmArg_GetAliases(AlgorithmArg self) -> char **"},
   67615             :    { "AlgorithmArg_GetMetaVar", _wrap_AlgorithmArg_GetMetaVar, METH_O, "AlgorithmArg_GetMetaVar(AlgorithmArg self) -> char const *"},
   67616             :    { "AlgorithmArg_GetCategory", _wrap_AlgorithmArg_GetCategory, METH_O, "AlgorithmArg_GetCategory(AlgorithmArg self) -> char const *"},
   67617             :    { "AlgorithmArg_IsPositional", _wrap_AlgorithmArg_IsPositional, METH_O, "AlgorithmArg_IsPositional(AlgorithmArg self) -> bool"},
   67618             :    { "AlgorithmArg_IsRequired", _wrap_AlgorithmArg_IsRequired, METH_O, "AlgorithmArg_IsRequired(AlgorithmArg self) -> bool"},
   67619             :    { "AlgorithmArg_GetMinCount", _wrap_AlgorithmArg_GetMinCount, METH_O, "AlgorithmArg_GetMinCount(AlgorithmArg self) -> int"},
   67620             :    { "AlgorithmArg_GetMaxCount", _wrap_AlgorithmArg_GetMaxCount, METH_O, "AlgorithmArg_GetMaxCount(AlgorithmArg self) -> int"},
   67621             :    { "AlgorithmArg_GetPackedValuesAllowed", _wrap_AlgorithmArg_GetPackedValuesAllowed, METH_O, "AlgorithmArg_GetPackedValuesAllowed(AlgorithmArg self) -> bool"},
   67622             :    { "AlgorithmArg_GetRepeatedArgAllowed", _wrap_AlgorithmArg_GetRepeatedArgAllowed, METH_O, "AlgorithmArg_GetRepeatedArgAllowed(AlgorithmArg self) -> bool"},
   67623             :    { "AlgorithmArg_GetChoices", _wrap_AlgorithmArg_GetChoices, METH_O, "AlgorithmArg_GetChoices(AlgorithmArg self) -> char **"},
   67624             :    { "AlgorithmArg_GetMetadataItem", _wrap_AlgorithmArg_GetMetadataItem, METH_VARARGS, "AlgorithmArg_GetMetadataItem(AlgorithmArg self, char const * item) -> char **"},
   67625             :    { "AlgorithmArg_IsExplicitlySet", _wrap_AlgorithmArg_IsExplicitlySet, METH_O, "AlgorithmArg_IsExplicitlySet(AlgorithmArg self) -> bool"},
   67626             :    { "AlgorithmArg_HasDefaultValue", _wrap_AlgorithmArg_HasDefaultValue, METH_O, "AlgorithmArg_HasDefaultValue(AlgorithmArg self) -> bool"},
   67627             :    { "AlgorithmArg_GetDefaultAsBoolean", _wrap_AlgorithmArg_GetDefaultAsBoolean, METH_O, "AlgorithmArg_GetDefaultAsBoolean(AlgorithmArg self) -> bool"},
   67628             :    { "AlgorithmArg_GetDefaultAsString", _wrap_AlgorithmArg_GetDefaultAsString, METH_O, "AlgorithmArg_GetDefaultAsString(AlgorithmArg self) -> char const *"},
   67629             :    { "AlgorithmArg_GetDefaultAsInteger", _wrap_AlgorithmArg_GetDefaultAsInteger, METH_O, "AlgorithmArg_GetDefaultAsInteger(AlgorithmArg self) -> int"},
   67630             :    { "AlgorithmArg_GetDefaultAsDouble", _wrap_AlgorithmArg_GetDefaultAsDouble, METH_O, "AlgorithmArg_GetDefaultAsDouble(AlgorithmArg self) -> double"},
   67631             :    { "AlgorithmArg_GetDefaultAsStringList", _wrap_AlgorithmArg_GetDefaultAsStringList, METH_O, "AlgorithmArg_GetDefaultAsStringList(AlgorithmArg self) -> char **"},
   67632             :    { "AlgorithmArg_GetDefaultAsIntegerList", _wrap_AlgorithmArg_GetDefaultAsIntegerList, METH_O, "AlgorithmArg_GetDefaultAsIntegerList(AlgorithmArg self)"},
   67633             :    { "AlgorithmArg_GetDefaultAsDoubleList", _wrap_AlgorithmArg_GetDefaultAsDoubleList, METH_O, "AlgorithmArg_GetDefaultAsDoubleList(AlgorithmArg self)"},
   67634             :    { "AlgorithmArg_IsHidden", _wrap_AlgorithmArg_IsHidden, METH_O, "AlgorithmArg_IsHidden(AlgorithmArg self) -> bool"},
   67635             :    { "AlgorithmArg_IsHiddenForCLI", _wrap_AlgorithmArg_IsHiddenForCLI, METH_O, "AlgorithmArg_IsHiddenForCLI(AlgorithmArg self) -> bool"},
   67636             :    { "AlgorithmArg_IsHiddenForAPI", _wrap_AlgorithmArg_IsHiddenForAPI, METH_O, "AlgorithmArg_IsHiddenForAPI(AlgorithmArg self) -> bool"},
   67637             :    { "AlgorithmArg_IsInput", _wrap_AlgorithmArg_IsInput, METH_O, "AlgorithmArg_IsInput(AlgorithmArg self) -> bool"},
   67638             :    { "AlgorithmArg_IsOutput", _wrap_AlgorithmArg_IsOutput, METH_O, "AlgorithmArg_IsOutput(AlgorithmArg self) -> bool"},
   67639             :    { "AlgorithmArg_GetDatasetType", _wrap_AlgorithmArg_GetDatasetType, METH_O, "AlgorithmArg_GetDatasetType(AlgorithmArg self) -> int"},
   67640             :    { "AlgorithmArg_GetDatasetInputFlags", _wrap_AlgorithmArg_GetDatasetInputFlags, METH_O, "AlgorithmArg_GetDatasetInputFlags(AlgorithmArg self) -> int"},
   67641             :    { "AlgorithmArg_GetDatasetOutputFlags", _wrap_AlgorithmArg_GetDatasetOutputFlags, METH_O, "AlgorithmArg_GetDatasetOutputFlags(AlgorithmArg self) -> int"},
   67642             :    { "AlgorithmArg_GetMutualExclusionGroup", _wrap_AlgorithmArg_GetMutualExclusionGroup, METH_O, "AlgorithmArg_GetMutualExclusionGroup(AlgorithmArg self) -> char const *"},
   67643             :    { "AlgorithmArg_GetAsBoolean", _wrap_AlgorithmArg_GetAsBoolean, METH_O, "AlgorithmArg_GetAsBoolean(AlgorithmArg self) -> bool"},
   67644             :    { "AlgorithmArg_GetAsString", _wrap_AlgorithmArg_GetAsString, METH_O, "AlgorithmArg_GetAsString(AlgorithmArg self) -> char const *"},
   67645             :    { "AlgorithmArg_GetAsInteger", _wrap_AlgorithmArg_GetAsInteger, METH_O, "AlgorithmArg_GetAsInteger(AlgorithmArg self) -> int"},
   67646             :    { "AlgorithmArg_GetAsDouble", _wrap_AlgorithmArg_GetAsDouble, METH_O, "AlgorithmArg_GetAsDouble(AlgorithmArg self) -> double"},
   67647             :    { "AlgorithmArg_GetAsDatasetValue", _wrap_AlgorithmArg_GetAsDatasetValue, METH_O, "AlgorithmArg_GetAsDatasetValue(AlgorithmArg self) -> ArgDatasetValue"},
   67648             :    { "AlgorithmArg_GetAsStringList", _wrap_AlgorithmArg_GetAsStringList, METH_O, "AlgorithmArg_GetAsStringList(AlgorithmArg self) -> char **"},
   67649             :    { "AlgorithmArg_GetAsIntegerList", _wrap_AlgorithmArg_GetAsIntegerList, METH_O, "AlgorithmArg_GetAsIntegerList(AlgorithmArg self)"},
   67650             :    { "AlgorithmArg_GetAsDoubleList", _wrap_AlgorithmArg_GetAsDoubleList, METH_O, "AlgorithmArg_GetAsDoubleList(AlgorithmArg self)"},
   67651             :    { "AlgorithmArg_SetAsBoolean", _wrap_AlgorithmArg_SetAsBoolean, METH_VARARGS, "AlgorithmArg_SetAsBoolean(AlgorithmArg self, bool value) -> bool"},
   67652             :    { "AlgorithmArg_SetAsString", _wrap_AlgorithmArg_SetAsString, METH_VARARGS, "AlgorithmArg_SetAsString(AlgorithmArg self, char const * value) -> bool"},
   67653             :    { "AlgorithmArg_SetAsInteger", _wrap_AlgorithmArg_SetAsInteger, METH_VARARGS, "AlgorithmArg_SetAsInteger(AlgorithmArg self, int value) -> bool"},
   67654             :    { "AlgorithmArg_SetAsDouble", _wrap_AlgorithmArg_SetAsDouble, METH_VARARGS, "AlgorithmArg_SetAsDouble(AlgorithmArg self, double value) -> bool"},
   67655             :    { "AlgorithmArg_SetAsDatasetValue", _wrap_AlgorithmArg_SetAsDatasetValue, METH_VARARGS, "AlgorithmArg_SetAsDatasetValue(AlgorithmArg self, ArgDatasetValue value) -> bool"},
   67656             :    { "AlgorithmArg_SetAsStringList", _wrap_AlgorithmArg_SetAsStringList, METH_VARARGS, "AlgorithmArg_SetAsStringList(AlgorithmArg self, char ** value) -> bool"},
   67657             :    { "AlgorithmArg_SetAsIntegerList", _wrap_AlgorithmArg_SetAsIntegerList, METH_VARARGS, "AlgorithmArg_SetAsIntegerList(AlgorithmArg self, int nList) -> bool"},
   67658             :    { "AlgorithmArg_SetAsDoubleList", _wrap_AlgorithmArg_SetAsDoubleList, METH_VARARGS, "AlgorithmArg_SetAsDoubleList(AlgorithmArg self, int nList) -> bool"},
   67659             :    { "AlgorithmArg_SetDataset", _wrap_AlgorithmArg_SetDataset, METH_VARARGS, "AlgorithmArg_SetDataset(AlgorithmArg self, Dataset ds) -> bool"},
   67660             :    { "AlgorithmArg_SetDatasets", _wrap_AlgorithmArg_SetDatasets, METH_VARARGS, "AlgorithmArg_SetDatasets(AlgorithmArg self, int object_list_count) -> bool"},
   67661             :    { "AlgorithmArg_SetDatasetNames", _wrap_AlgorithmArg_SetDatasetNames, METH_VARARGS, "AlgorithmArg_SetDatasetNames(AlgorithmArg self, char ** names) -> bool"},
   67662             :    { "AlgorithmArg_swigregister", AlgorithmArg_swigregister, METH_O, NULL},
   67663             :    { "delete_Algorithm", _wrap_delete_Algorithm, METH_O, "delete_Algorithm(Algorithm self)"},
   67664             :    { "Algorithm_GetName", _wrap_Algorithm_GetName, METH_O, "\n"
   67665             :     "Algorithm_GetName(Algorithm self) -> char const *\n"
   67666             :     "\n"
   67667             :     "\n"
   67668             :     "Get the name of the algorithm.\n"
   67669             :     "\n"
   67670             :     "Returns\n"
   67671             :     "-------\n"
   67672             :     "str\n"
   67673             :     "\n"
   67674             :     "Example\n"
   67675             :     "-------\n"
   67676             :     ">>> gdal.Algorithm(\"raster\", \"info\").GetName()\n"
   67677             :     "'info'\n"
   67678             :     "\n"
   67679             :     "\n"
   67680             :     ""},
   67681             :    { "Algorithm_GetDescription", _wrap_Algorithm_GetDescription, METH_O, "\n"
   67682             :     "Algorithm_GetDescription(Algorithm self) -> char const *\n"
   67683             :     "\n"
   67684             :     "\n"
   67685             :     "Get a human-readable description of the Algorithm.\n"
   67686             :     "\n"
   67687             :     "Returns\n"
   67688             :     "-------\n"
   67689             :     "str\n"
   67690             :     "\n"
   67691             :     "Example\n"
   67692             :     "-------\n"
   67693             :     ">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
   67694             :     ">>> alg.GetDescription()\n"
   67695             :     "'Convert a raster dataset.'\n"
   67696             :     "\n"
   67697             :     "\n"
   67698             :     ""},
   67699             :    { "Algorithm_GetLongDescription", _wrap_Algorithm_GetLongDescription, METH_O, "\n"
   67700             :     "Algorithm_GetLongDescription(Algorithm self) -> char const *\n"
   67701             :     "\n"
   67702             :     "\n"
   67703             :     ":meta private:\n"
   67704             :     "\n"
   67705             :     "\n"
   67706             :     ""},
   67707             :    { "Algorithm_GetHelpFullURL", _wrap_Algorithm_GetHelpFullURL, METH_O, "\n"
   67708             :     "Algorithm_GetHelpFullURL(Algorithm self) -> char const *\n"
   67709             :     "\n"
   67710             :     "\n"
   67711             :     "Get a URL for the algorithm's documentation.\n"
   67712             :     "\n"
   67713             :     "Returns\n"
   67714             :     "-------\n"
   67715             :     "str\n"
   67716             :     "\n"
   67717             :     "Example\n"
   67718             :     "-------\n"
   67719             :     ">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
   67720             :     ">>> alg.GetHelpFullURL()\n"
   67721             :     "'https://gdal.org/programs/gdal_raster_convert.html'\n"
   67722             :     "\n"
   67723             :     "\n"
   67724             :     ""},
   67725             :    { "Algorithm_HasSubAlgorithms", _wrap_Algorithm_HasSubAlgorithms, METH_O, "\n"
   67726             :     "Algorithm_HasSubAlgorithms(Algorithm self) -> bool\n"
   67727             :     "\n"
   67728             :     "\n"
   67729             :     "Returns whether the algorithm has sub-algorithms.\n"
   67730             :     "\n"
   67731             :     "Returns\n"
   67732             :     "-------\n"
   67733             :     "bool\n"
   67734             :     "\n"
   67735             :     "Example\n"
   67736             :     "-------\n"
   67737             :     ">>> alg = gdal.Algorithm(\"raster\")\n"
   67738             :     ">>> alg.HasSubAlgorithms()\n"
   67739             :     "True\n"
   67740             :     ">>> subalg = alg.InstantiateSubAlgorithm(\"convert\")\n"
   67741             :     ">>> subalg.HasSubAlgorithms()\n"
   67742             :     "False\n"
   67743             :     "\n"
   67744             :     "\n"
   67745             :     ""},
   67746             :    { "Algorithm_GetSubAlgorithmNames", _wrap_Algorithm_GetSubAlgorithmNames, METH_O, "\n"
   67747             :     "Algorithm_GetSubAlgorithmNames(Algorithm self) -> char **\n"
   67748             :     "\n"
   67749             :     "\n"
   67750             :     "Return a list of names of sub-algorithms.\n"
   67751             :     "\n"
   67752             :     "Returns\n"
   67753             :     "-------\n"
   67754             :     "list or None\n"
   67755             :     "\n"
   67756             :     "Example\n"
   67757             :     "-------\n"
   67758             :     ">>> alg = gdal.Algorithm(\"raster\")\n"
   67759             :     ">>> alg.GetSubAlgorithmNames()\n"
   67760             :     "['as-features', 'aspect', ..., 'update', 'viewshed']\n"
   67761             :     "\n"
   67762             :     "\n"
   67763             :     ""},
   67764             :    { "Algorithm_InstantiateSubAlgorithm", _wrap_Algorithm_InstantiateSubAlgorithm, METH_VARARGS, "\n"
   67765             :     "Algorithm_InstantiateSubAlgorithm(Algorithm self, char const * algName) -> Algorithm\n"
   67766             :     "\n"
   67767             :     "\n"
   67768             :     "Instantiate a sub-algorithm if available.\n"
   67769             :     "\n"
   67770             :     "Returns\n"
   67771             :     "-------\n"
   67772             :     "Algorithm or None\n"
   67773             :     "\n"
   67774             :     "Example\n"
   67775             :     "-------\n"
   67776             :     ">>> alg = gdal.Algorithm(\"raster\")\n"
   67777             :     ">>> alg.InstantiateSubAlgorithm(\"convert\")\n"
   67778             :     "<osgeo.gdal.Algorithm; proxy of <Swig Object of type 'GDALAlgorithmHS *' at ...> >\n"
   67779             :     ">>> subalg = alg.InstantiateSubAlgorithm(\"does_not_exist\")\n"
   67780             :     "\n"
   67781             :     "\n"
   67782             :     ""},
   67783             :    { "Algorithm_ParseCommandLineArguments", _wrap_Algorithm_ParseCommandLineArguments, METH_VARARGS, "\n"
   67784             :     "Algorithm_ParseCommandLineArguments(Algorithm self, char ** args) -> bool\n"
   67785             :     "\n"
   67786             :     "\n"
   67787             :     "Parse a list of arguments for the algorithm, setting the appropriate parameters. May only be called once per algorithm.\n"
   67788             :     "\n"
   67789             :     "Parameters\n"
   67790             :     "----------\n"
   67791             :     "args : list\n"
   67792             :     "    List of named or positional arguments\n"
   67793             :     "\n"
   67794             :     "Returns\n"
   67795             :     "-------\n"
   67796             :     "bool\n"
   67797             :     "    Whether the arguments were successfully parsed\n"
   67798             :     "\n"
   67799             :     "Example\n"
   67800             :     "-------\n"
   67801             :     ">>> alg = gdal.Algorithm(\"vector\", \"info\")\n"
   67802             :     ">>> alg.ParseCommandLineArguments(['poly.shp', '--format', 'text'])\n"
   67803             :     "True\n"
   67804             :     "\n"
   67805             :     "\n"
   67806             :     ""},
   67807             :    { "Algorithm_GetActualAlgorithm", _wrap_Algorithm_GetActualAlgorithm, METH_O, "\n"
   67808             :     "Algorithm_GetActualAlgorithm(Algorithm self) -> Algorithm\n"
   67809             :     "\n"
   67810             :     "\n"
   67811             :     "Return the actual algorithm that is going to be invoked, if the\n"
   67812             :     "current algorithm has sub-algorithms.\n"
   67813             :     "\n"
   67814             :     "Returns\n"
   67815             :     "-------\n"
   67816             :     "Algorithm\n"
   67817             :     "\n"
   67818             :     "Example\n"
   67819             :     "-------\n"
   67820             :     ">>> alg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg(\"raster\")\n"
   67821             :     ">>> alg.ParseCommandLineArguments([\"convert\" ,\"--input\", \"byte.tif\", \"--output\",  \"/tmp/byte.png\"])\n"
   67822             :     "True\n"
   67823             :     ">>> alg.GetActualAlgorithm().GetDescription()\n"
   67824             :     "'Convert a raster dataset.'\n"
   67825             :     "\n"
   67826             :     "\n"
   67827             :     ""},
   67828             :    { "Algorithm_Run", _wrap_Algorithm_Run, METH_VARARGS, "Algorithm_Run(Algorithm self, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
   67829             :    { "Algorithm_Finalize", _wrap_Algorithm_Finalize, METH_O, "\n"
   67830             :     "Algorithm_Finalize(Algorithm self) -> bool\n"
   67831             :     "\n"
   67832             :     "\n"
   67833             :     "Close any dataset arguments or outputs of the algorithm.\n"
   67834             :     "\n"
   67835             :     "Returns\n"
   67836             :     "-------\n"
   67837             :     "boolean\n"
   67838             :     "\n"
   67839             :     "\n"
   67840             :     ""},
   67841             :    { "Algorithm_ParseRunAndFinalize", _wrap_Algorithm_ParseRunAndFinalize, METH_VARARGS, "\n"
   67842             :     "Algorithm_ParseRunAndFinalize(Algorithm self, char ** args, GDALProgressFunc callback=0, void * callback_data=None) -> bool\n"
   67843             :     "\n"
   67844             :     "\n"
   67845             :     "Convenience method that calls :py:meth:`ParseCommandLineArguments`, :py:meth:`Run`, and :py:meth:`Finalize`.\n"
   67846             :     "\n"
   67847             :     "Parameters\n"
   67848             :     "----------\n"
   67849             :     "args : list\n"
   67850             :     "    List of command line arguments\n"
   67851             :     "callback : function\n"
   67852             :     "    Optional progress callback function\n"
   67853             :     "callback_data\n"
   67854             :     "    Optional value to be provided as final argument to callback function\n"
   67855             :     "\n"
   67856             :     "Returns\n"
   67857             :     "-------\n"
   67858             :     "bool\n"
   67859             :     "    ``True`` if the algorithm succeeded, ``False`` otherwise\n"
   67860             :     "\n"
   67861             :     "\n"
   67862             :     ""},
   67863             :    { "Algorithm_GetUsageAsJSON", _wrap_Algorithm_GetUsageAsJSON, METH_O, "\n"
   67864             :     "Algorithm_GetUsageAsJSON(Algorithm self) -> retStringAndCPLFree *\n"
   67865             :     "\n"
   67866             :     "\n"
   67867             :     "Returns a JSON representation of an algorithm's usage information, serialized to a string.\n"
   67868             :     "\n"
   67869             :     "Returns\n"
   67870             :     "-------\n"
   67871             :     "str\n"
   67872             :     "\n"
   67873             :     "Example\n"
   67874             :     "-------\n"
   67875             :     ">>> import json\n"
   67876             :     ">>> import pprint\n"
   67877             :     ">>> usage = json.loads(gdal.Algorithm(\"vector\", \"info\").GetUsageAsJSON())\n"
   67878             :     ">>> pprint.pprint(usage)\n"
   67879             :     "{'description': 'Return information on a vector dataset.',\n"
   67880             :     " 'full_path': ['gdal', 'vector', 'info'],\n"
   67881             :     " 'input_arguments': [{'category': 'Base',\n"
   67882             :     "                      'choices': ['json', 'text'],\n"
   67883             :     "                      'description': 'Output format',\n"
   67884             :     "                      'name': 'output-format',\n"
   67885             :     "                      'required': False,\n"
   67886             :     "                      'type': 'string'},\n"
   67887             :     "                     {'category': 'Advanced',\n"
   67888             :     "                      'description': 'Open options',\n"
   67889             :     "                      'max_count': 2147483647,\n"
   67890             :     "                      'metavar': '<KEY>=<VALUE>',\n"
   67891             :     "                      'min_count': 0,\n"
   67892             :     "                      'name': 'open-option',\n"
   67893             :     "                      'packed_values_allowed': False,\n"
   67894             :     "                      'repeated_arg_allowed': True,\n"
   67895             :     "                      'required': False,\n"
   67896             :     "                      'type': 'string_list'},\n"
   67897             :     "                     {'category': 'Advanced',\n"
   67898             :     "                      'description': 'Input formats',\n"
   67899             :     "                      'max_count': 2147483647,\n"
   67900             :     "                      'metadata': {'required_capabilities': ['DCAP_VECTOR']},\n"
   67901             :     "                      'min_count': 0,\n"
   67902             :     "                      'name': 'input-format',\n"
   67903             :     "                      'packed_values_allowed': True,\n"
   67904             :     "                      'repeated_arg_allowed': True,\n"
   67905             :     "                      'required': False,\n"
   67906             :     "                      'type': 'string_list'},\n"
   67907             :     "                     {'category': 'Base',\n"
   67908             :     "                      'dataset_type': ['vector'],\n"
   67909             :     "                      'description': 'Input vector datasets',\n"
   67910             :     "                      'input_flags': ['name', 'dataset'],\n"
   67911             :     "                      'max_count': 2147483647,\n"
   67912             :     "                      'min_count': 0,\n"
   67913             :     "                      'name': 'input',\n"
   67914             :     "                      'packed_values_allowed': True,\n"
   67915             :     "                      'repeated_arg_allowed': True,\n"
   67916             :     "                      'required': True,\n"
   67917             :     "                      'type': 'dataset_list'},\n"
   67918             :     "                     {'category': 'Base',\n"
   67919             :     "                      'description': 'Input layer name',\n"
   67920             :     "                      'max_count': 2147483647,\n"
   67921             :     "                      'min_count': 0,\n"
   67922             :     "                      'mutual_exclusion_group': 'layer-sql',\n"
   67923             :     "                      'name': 'input-layer',\n"
   67924             :     "                      'packed_values_allowed': True,\n"
   67925             :     "                      'repeated_arg_allowed': True,\n"
   67926             :     "                      'required': False,\n"
   67927             :     "                      'type': 'string_list'},\n"
   67928             :     "                     {'category': 'Base',\n"
   67929             :     "                      'description': 'List all features (beware of RAM '\n"
   67930             :     "                                     'consumption on large layers)',\n"
   67931             :     "                      'mutual_exclusion_group': 'summary-features',\n"
   67932             :     "                      'name': 'features',\n"
   67933             :     "                      'required': False,\n"
   67934             :     "                      'type': 'boolean'},\n"
   67935             :     "                     {'category': 'Base',\n"
   67936             :     "                      'description': 'List the layer names and the geometry '\n"
   67937             :     "                                     'type',\n"
   67938             :     "                      'mutual_exclusion_group': 'summary-features',\n"
   67939             :     "                      'name': 'summary',\n"
   67940             :     "                      'required': False,\n"
   67941             :     "                      'type': 'boolean'},\n"
   67942             :     "                     {'category': 'Base',\n"
   67943             :     "                      'description': 'Limit the number of features per layer '\n"
   67944             :     "                                     '(implies --features)',\n"
   67945             :     "                      'metavar': 'FEATURE-COUNT',\n"
   67946             :     "                      'min_value': 0,\n"
   67947             :     "                      'min_value_is_included': True,\n"
   67948             :     "                      'name': 'limit',\n"
   67949             :     "                      'required': False,\n"
   67950             :     "                      'type': 'integer'},\n"
   67951             :     "                     {'category': 'Base',\n"
   67952             :     "                      'description': 'Execute the indicated SQL statement and '\n"
   67953             :     "                                     'return the result',\n"
   67954             :     "                      'metavar': '<statement>|@<filename>',\n"
   67955             :     "                      'mutual_exclusion_group': 'layer-sql',\n"
   67956             :     "                      'name': 'sql',\n"
   67957             :     "                      'required': False,\n"
   67958             :     "                      'type': 'string'},\n"
   67959             :     "                     {'category': 'Base',\n"
   67960             :     "                      'description': 'Attribute query in a restricted form of '\n"
   67961             :     "                                     'the queries used in the SQL WHERE '\n"
   67962             :     "                                     'statement',\n"
   67963             :     "                      'metavar': '<WHERE>|@<filename>',\n"
   67964             :     "                      'name': 'where',\n"
   67965             :     "                      'required': False,\n"
   67966             :     "                      'type': 'string'},\n"
   67967             :     "                     {'category': 'Base',\n"
   67968             :     "                      'description': 'SQL dialect',\n"
   67969             :     "                      'name': 'dialect',\n"
   67970             :     "                      'required': False,\n"
   67971             :     "                      'type': 'string'},\n"
   67972             :     "                     {'category': 'Base',\n"
   67973             :     "                      'description': 'Open the dataset in update mode',\n"
   67974             :     "                      'name': 'update',\n"
   67975             :     "                      'required': False,\n"
   67976             :     "                      'type': 'boolean'}],\n"
   67977             :     " 'input_output_arguments': [],\n"
   67978             :     " 'name': 'info',\n"
   67979             :     " 'output_arguments': [{'category': 'Base',\n"
   67980             :     "                       'description': 'Output string, in which the result is '\n"
   67981             :     "                                      'placed',\n"
   67982             :     "                       'name': 'output-string',\n"
   67983             :     "                       'required': False,\n"
   67984             :     "                       'type': 'string'}],\n"
   67985             :     " 'short_url': '/programs/gdal_vector_info.html',\n"
   67986             :     " 'sub_algorithms': [],\n"
   67987             :     " 'supports_streamed_output': True,\n"
   67988             :     " 'url': 'https://gdal.org/programs/gdal_vector_info.html'}\n"
   67989             :     "\n"
   67990             :     "\n"
   67991             :     ""},
   67992             :    { "Algorithm_GetArgNames", _wrap_Algorithm_GetArgNames, METH_O, "\n"
   67993             :     "Algorithm_GetArgNames(Algorithm self) -> char **\n"
   67994             :     "\n"
   67995             :     "\n"
   67996             :     "Get a list of arguments understood by the Algorithm.\n"
   67997             :     "\n"
   67998             :     "Returns\n"
   67999             :     "-------\n"
   68000             :     "list\n"
   68001             :     "\n"
   68002             :     "Example\n"
   68003             :     "-------\n"
   68004             :     ">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
   68005             :     ">>> sorted(alg.GetArgNames())\n"
   68006             :     "['append', 'config', 'creation-option', ..., 'progress', 'quiet']\n"
   68007             :     "\n"
   68008             :     "\n"
   68009             :     "\n"
   68010             :     ""},
   68011             :    { "Algorithm_GetArg", _wrap_Algorithm_GetArg, METH_VARARGS, "\n"
   68012             :     "Algorithm_GetArg(Algorithm self, char const * argName) -> AlgorithmArg\n"
   68013             :     "\n"
   68014             :     "\n"
   68015             :     "Get an :py:class:`AlgorithmArg` object that can be queried for information about an argument.\n"
   68016             :     "\n"
   68017             :     "Parameters\n"
   68018             :     "----------\n"
   68019             :     "argName : str\n"
   68020             :     "\n"
   68021             :     "Returns\n"
   68022             :     "-------\n"
   68023             :     "AlgorithmArg\n"
   68024             :     "\n"
   68025             :     "Example\n"
   68026             :     "-------\n"
   68027             :     ">>> alg = gdal.Algorithm(\"raster\", \"polygonize\")\n"
   68028             :     ">>> arg = alg.GetArg(\"connect-diagonal-pixels\")\n"
   68029             :     ">>> arg.GetDescription()\n"
   68030             :     "'Consider diagonal pixels as connected'\n"
   68031             :     "\n"
   68032             :     "\n"
   68033             :     ""},
   68034             :    { "Algorithm_GetArgNonConst", _wrap_Algorithm_GetArgNonConst, METH_VARARGS, "\n"
   68035             :     "Algorithm_GetArgNonConst(Algorithm self, char const * argName) -> AlgorithmArg\n"
   68036             :     "\n"
   68037             :     "\n"
   68038             :     ":meta private:\n"
   68039             :     "\n"
   68040             :     "\n"
   68041             :     ""},
   68042             :    { "Algorithm_swigregister", Algorithm_swigregister, METH_O, NULL},
   68043             :    { "delete_AlgorithmRegistry", _wrap_delete_AlgorithmRegistry, METH_O, "delete_AlgorithmRegistry(AlgorithmRegistry self)"},
   68044             :    { "AlgorithmRegistry_GetAlgNames", _wrap_AlgorithmRegistry_GetAlgNames, METH_O, "\n"
   68045             :     "AlgorithmRegistry_GetAlgNames(AlgorithmRegistry self) -> char **\n"
   68046             :     "\n"
   68047             :     "\n"
   68048             :     "Return the names of available algorithms.\n"
   68049             :     "\n"
   68050             :     "Returns\n"
   68051             :     "-------\n"
   68052             :     "list\n"
   68053             :     "\n"
   68054             :     "Examples\n"
   68055             :     "--------\n"
   68056             :     ">>> gdal.GetGlobalAlgorithmRegistry().GetAlgNames()\n"
   68057             :     "['convert', 'dataset', 'info', 'mdim', 'pipeline', 'raster', 'vector', 'vsi']\n"
   68058             :     "\n"
   68059             :     "\n"
   68060             :     ""},
   68061             :    { "AlgorithmRegistry_InstantiateAlg", _wrap_AlgorithmRegistry_InstantiateAlg, METH_VARARGS, "\n"
   68062             :     "AlgorithmRegistry_InstantiateAlg(AlgorithmRegistry self, char const * algName) -> Algorithm\n"
   68063             :     "\n"
   68064             :     "\n"
   68065             :     "Instantiate an :py:class:`Algorithm`.\n"
   68066             :     "\n"
   68067             :     "Most useful algorithms are accessed as a sub-algorithm of another algorithm.\n"
   68068             :     "For example, ``polygonize`` is a sub-algorithm of ``raster`` and can be\n"
   68069             :     "instantiated by first instantiating the primary algorithm, then using\n"
   68070             :     ":py:meth:`Algorithm.InstantiateSubAlgorithm`.\n"
   68071             :     "\n"
   68072             :     "Returns\n"
   68073             :     "-------\n"
   68074             :     "Algorithm\n"
   68075             :     "\n"
   68076             :     "Examples\n"
   68077             :     "--------\n"
   68078             :     "\n"
   68079             :     ">>> alg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg('pipeline')    # or alg= gdal.Algorithm(\"pipeline\")\n"
   68080             :     ">>> alg.GetName()\n"
   68081             :     "'pipeline'\n"
   68082             :     ">>> alg.GetArgNames()\n"
   68083             :     "['help', 'help-doc', 'json-usage', 'config', 'quiet', 'progress', 'input', 'output', 'output-format', 'pipeline', 'output-string', 'stdout']\n"
   68084             :     "\n"
   68085             :     ">>> subalg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg('raster').InstantiateSubAlgorithm('polygonize')\n"
   68086             :     ">>> subalg.GetArgNames()\n"
   68087             :     "['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', 'output-layer', 'band', 'attribute-name', 'connect-diagonal-pixels']\n"
   68088             :     "\n"
   68089             :     "\n"
   68090             :     ""},
   68091             :    { "AlgorithmRegistry_swigregister", AlgorithmRegistry_swigregister, METH_O, NULL},
   68092             :    { "delete_ArgDatasetValue", _wrap_delete_ArgDatasetValue, METH_O, "delete_ArgDatasetValue(ArgDatasetValue self)"},
   68093             :    { "ArgDatasetValue_GetName", _wrap_ArgDatasetValue_GetName, METH_O, "ArgDatasetValue_GetName(ArgDatasetValue self) -> char const *"},
   68094             :    { "ArgDatasetValue_GetDataset", _wrap_ArgDatasetValue_GetDataset, METH_O, "ArgDatasetValue_GetDataset(ArgDatasetValue self) -> Dataset"},
   68095             :    { "ArgDatasetValue_SetName", _wrap_ArgDatasetValue_SetName, METH_VARARGS, "ArgDatasetValue_SetName(ArgDatasetValue self, char const * name)"},
   68096             :    { "ArgDatasetValue_SetDataset", _wrap_ArgDatasetValue_SetDataset, METH_VARARGS, "ArgDatasetValue_SetDataset(ArgDatasetValue self, Dataset ds)"},
   68097             :    { "ArgDatasetValue_swigregister", ArgDatasetValue_swigregister, METH_O, NULL},
   68098             :    { "ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, "\n"
   68099             :     "ApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine)\n"
   68100             :     "\n"
   68101             :     "\n"
   68102             :     "Apply a geotransform to convert a (col, row) location\n"
   68103             :     "into a georeferenced (x, y) coordinate. To perform the\n"
   68104             :     "inverse transformation, see :py:func:`InvGeoTransform`.\n"
   68105             :     "\n"
   68106             :     "See :cpp:func:`GDALApplyGeoTransform`.\n"
   68107             :     "\n"
   68108             :     "Parameters\n"
   68109             :     "----------\n"
   68110             :     "gt : tuple\n"
   68111             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   68112             :     "dfPixel : float\n"
   68113             :     "   (Fractional) column in image coordinates (0.0 at the left edge of the image)\n"
   68114             :     "dfLine : float\n"
   68115             :     "   (Fractional) row in image coordinates (0.0 at the top of the image)\n"
   68116             :     "\n"
   68117             :     "Returns\n"
   68118             :     "-------\n"
   68119             :     "List\n"
   68120             :     "   x, y values corresponding to the input location\n"
   68121             :     "\n"
   68122             :     "Examples\n"
   68123             :     "--------\n"
   68124             :     ">>> ds = gdal.Open('byte.tif')\n"
   68125             :     ">>> gt = ds.GetGeoTransform()\n"
   68126             :     ">>> gdal.ApplyGeoTransform(gt, 5, 7)\n"
   68127             :     "[441020.0, 3750900.0]\n"
   68128             :     "\n"
   68129             :     "\n"
   68130             :     ""},
   68131             :    { "InvGeoTransform", _wrap_InvGeoTransform, METH_O, "\n"
   68132             :     "InvGeoTransform(double [6] gt_in) -> RETURN_NONE\n"
   68133             :     "\n"
   68134             :     "\n"
   68135             :     "Invert a geotransform array so that it represents a conversion\n"
   68136             :     "from georeferenced (x, y) coordinates to image (col, row) coordinates.\n"
   68137             :     "\n"
   68138             :     "Parameters\n"
   68139             :     "----------\n"
   68140             :     "gt : tuple\n"
   68141             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   68142             :     "\n"
   68143             :     "Returns\n"
   68144             :     "-------\n"
   68145             :     "tuple\n"
   68146             :     "   Geotransform array representing the inverse transformation\n"
   68147             :     "\n"
   68148             :     "Examples\n"
   68149             :     "--------\n"
   68150             :     ">>> ds = gdal.Open('byte.tif')\n"
   68151             :     ">>> inv_gt = gdal.InvGeoTransform(ds.GetGeoTransform())\n"
   68152             :     ">>> inv_gt\n"
   68153             :     "(-7345.333333333333, 0.016666666666666666, 0.0, 62522.0, 0.0, -0.016666666666666666)\n"
   68154             :     ">>> gdal.ApplyGeoTransform(inv_gt, 441020, 3750900)\n"
   68155             :     "[5.0, 7.0]\n"
   68156             :     "\n"
   68157             :     "\n"
   68158             :     ""},
   68159             :    { "ApplyHomography", _wrap_ApplyHomography, METH_VARARGS, "ApplyHomography(double [9] padfHomography, double dfPixel, double dfLine) -> int"},
   68160             :    { "InvHomography", _wrap_InvHomography, METH_O, "InvHomography(double [9] h_in) -> RETURN_NONE"},
   68161             :    { "VersionInfo", _wrap_VersionInfo, METH_VARARGS, "VersionInfo(char const * request=\"VERSION_NUM\") -> char const *"},
   68162             :    { "AllRegister", _wrap_AllRegister, METH_NOARGS, "\n"
   68163             :     "AllRegister()\n"
   68164             :     "\n"
   68165             :     "\n"
   68166             :     "Register all known configured GDAL drivers.\n"
   68167             :     "Automatically called when the :py:mod:`gdal` module is loaded.\n"
   68168             :     "Does not need to be called in user code unless a driver was\n"
   68169             :     "deregistered and needs to be re-registered.\n"
   68170             :     "See :cpp:func:`GDALAllRegister`.\n"
   68171             :     "\n"
   68172             :     "See Also\n"
   68173             :     "--------\n"
   68174             :     ":py:func:`Driver.Register`\n"
   68175             :     "\n"
   68176             :     ""},
   68177             :    { "GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_NOARGS, "GDALDestroyDriverManager()"},
   68178             :    { "GetCacheMax", _wrap_GetCacheMax, METH_NOARGS, "\n"
   68179             :     "GetCacheMax() -> GIntBig\n"
   68180             :     "\n"
   68181             :     "\n"
   68182             :     "Get the maximum size of the block cache.\n"
   68183             :     "See :cpp:func:`GDALGetCacheMax`.\n"
   68184             :     "\n"
   68185             :     "Returns\n"
   68186             :     "-------\n"
   68187             :     "int\n"
   68188             :     "    maximum cache size in bytes\n"
   68189             :     "\n"
   68190             :     ""},
   68191             :    { "GetCacheUsed", _wrap_GetCacheUsed, METH_NOARGS, "\n"
   68192             :     "GetCacheUsed() -> GIntBig\n"
   68193             :     "\n"
   68194             :     "\n"
   68195             :     "Get the number of bytes in used by the block cache.\n"
   68196             :     "See :cpp:func:`GDALGetCacheUsed`.\n"
   68197             :     "\n"
   68198             :     "Returns\n"
   68199             :     "-------\n"
   68200             :     "int\n"
   68201             :     "    cache size in bytes\n"
   68202             :     "\n"
   68203             :     ""},
   68204             :    { "SetCacheMax", _wrap_SetCacheMax, METH_O, "\n"
   68205             :     "SetCacheMax(GIntBig nBytes)\n"
   68206             :     "\n"
   68207             :     "\n"
   68208             :     "Set the maximum size of the block cache.\n"
   68209             :     "See :cpp:func:`GDALSetCacheMax`.\n"
   68210             :     "\n"
   68211             :     "Parameters\n"
   68212             :     "----------\n"
   68213             :     "nBytes: int\n"
   68214             :     "    Cache size in bytes\n"
   68215             :     "\n"
   68216             :     "See Also\n"
   68217             :     "--------\n"
   68218             :     ":config:`GDAL_CACHEMAX`\n"
   68219             :     "\n"
   68220             :     ""},
   68221             :    { "GetDataTypeSize", _wrap_GetDataTypeSize, METH_O, "GetDataTypeSize(GDALDataType eDataType) -> int"},
   68222             :    { "GetDataTypeSizeBits", _wrap_GetDataTypeSizeBits, METH_O, "GetDataTypeSizeBits(GDALDataType eDataType) -> int"},
   68223             :    { "GetDataTypeSizeBytes", _wrap_GetDataTypeSizeBytes, METH_O, "GetDataTypeSizeBytes(GDALDataType eDataType) -> int"},
   68224             :    { "DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_O, "DataTypeIsComplex(GDALDataType eDataType) -> int"},
   68225             :    { "GetDataTypeName", _wrap_GetDataTypeName, METH_O, "\n"
   68226             :     "GetDataTypeName(GDALDataType eDataType) -> char const *\n"
   68227             :     "\n"
   68228             :     "\n"
   68229             :     "Return the name of the data type.\n"
   68230             :     "\n"
   68231             :     "Parameters\n"
   68232             :     "----------\n"
   68233             :     "eDataType : int\n"
   68234             :     "    data type code\n"
   68235             :     "\n"
   68236             :     "Returns\n"
   68237             :     "-------\n"
   68238             :     "str\n"
   68239             :     "\n"
   68240             :     "Examples\n"
   68241             :     "--------\n"
   68242             :     ">>> gdal.GetDataTypeName(gdal.GDT_Int16)\n"
   68243             :     "'Int16'\n"
   68244             :     ">>> gdal.GetDataTypeName(gdal.GDT_Float64)\n"
   68245             :     "'Float64'\n"
   68246             :     "\n"
   68247             :     ""},
   68248             :    { "GetDataTypeByName", _wrap_GetDataTypeByName, METH_O, "\n"
   68249             :     "GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType\n"
   68250             :     "\n"
   68251             :     "\n"
   68252             :     "Return the data type for a given name.\n"
   68253             :     "\n"
   68254             :     "Parameters\n"
   68255             :     "----------\n"
   68256             :     "pszDataTypeName : str\n"
   68257             :     "    data type name\n"
   68258             :     "\n"
   68259             :     "Returns\n"
   68260             :     "-------\n"
   68261             :     "int\n"
   68262             :     "    data type code\n"
   68263             :     "\n"
   68264             :     "Examples\n"
   68265             :     "--------\n"
   68266             :     ">>> gdal.GetDataTypeByName('Int16') == gdal.GDT_Int16\n"
   68267             :     "True\n"
   68268             :     "\n"
   68269             :     "\n"
   68270             :     ""},
   68271             :    { "DataTypeUnion", _wrap_DataTypeUnion, METH_VARARGS, "DataTypeUnion(GDALDataType a, GDALDataType b) -> GDALDataType"},
   68272             :    { "DataTypeUnionWithValue", _wrap_DataTypeUnionWithValue, METH_VARARGS, "DataTypeUnionWithValue(GDALDataType a, double val, bool isComplex) -> GDALDataType"},
   68273             :    { "GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_O, "GetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *"},
   68274             :    { "GetColorInterpretationByName", _wrap_GetColorInterpretationByName, METH_O, "GetColorInterpretationByName(char const * pszColorInterpName) -> GDALColorInterp"},
   68275             :    { "GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_O, "GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *"},
   68276             :    { "DecToDMS", _wrap_DecToDMS, METH_VARARGS, "DecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *"},
   68277             :    { "PackedDMSToDec", _wrap_PackedDMSToDec, METH_O, "PackedDMSToDec(double dfPacked) -> double"},
   68278             :    { "DecToPackedDMS", _wrap_DecToPackedDMS, METH_O, "DecToPackedDMS(double dfDec) -> double"},
   68279             :    { "ParseXMLString", _wrap_ParseXMLString, METH_O, "ParseXMLString(char * pszXMLString) -> CPLXMLNode *"},
   68280             :    { "SerializeXMLTree", _wrap_SerializeXMLTree, METH_O, "SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *"},
   68281             :    { "GetJPEG2000Structure", _wrap_GetJPEG2000Structure, METH_VARARGS, "GetJPEG2000Structure(char const * pszFilename, char ** options=None) -> CPLXMLNode *"},
   68282             :    { "GetJPEG2000StructureAsString", _wrap_GetJPEG2000StructureAsString, METH_VARARGS, "GetJPEG2000StructureAsString(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   68283             :    { "HasTriangulation", _wrap_HasTriangulation, METH_NOARGS, "HasTriangulation() -> int"},
   68284             :    { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "\n"
   68285             :     "GetDriverCount() -> int\n"
   68286             :     "\n"
   68287             :     "\n"
   68288             :     "Return the number of registered drivers.\n"
   68289             :     "See :cpp:func:`GDALGetDriverCount`.\n"
   68290             :     "\n"
   68291             :     "Examples\n"
   68292             :     "--------\n"
   68293             :     "\n"
   68294             :     ".. testsetup::\n"
   68295             :     "    >>> pytest.skip()\n"
   68296             :     "\n"
   68297             :     ">>> gdal.GetDriverCount()\n"
   68298             :     ">>> 124\n"
   68299             :     ">>> gdal.GetDriverByName('MapInfo File').Deregister()\n"
   68300             :     ">>> gdal.GetDriverCount()\n"
   68301             :     ">>> 123\n"
   68302             :     "\n"
   68303             :     ""},
   68304             :    { "GetDriverByName", _wrap_GetDriverByName, METH_O, "GetDriverByName(char const * name) -> Driver"},
   68305             :    { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int i) -> Driver"},
   68306             :    { "Open", _wrap_Open, METH_VARARGS, "\n"
   68307             :     "Open(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   68308             :     "\n"
   68309             :     "\n"
   68310             :     "Opens a raster file as a :py:class:`Dataset` using default options.\n"
   68311             :     "See :cpp:func:`GDALOpen`.\n"
   68312             :     "For more control over how the file is opened, use :py:func:`OpenEx`.\n"
   68313             :     "\n"
   68314             :     "Parameters\n"
   68315             :     "----------\n"
   68316             :     "utf8_path : str\n"
   68317             :     "    name of the file to open\n"
   68318             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   68319             :     "\n"
   68320             :     "Returns\n"
   68321             :     "-------\n"
   68322             :     "Dataset, or ``None`` on failure\n"
   68323             :     "\n"
   68324             :     "See Also\n"
   68325             :     "--------\n"
   68326             :     ":py:func:`OpenEx`\n"
   68327             :     ":py:func:`OpenShared`\n"
   68328             :     "\n"
   68329             :     "\n"
   68330             :     ""},
   68331             :    { "OpenEx", (PyCFunction)(void(*)(void))_wrap_OpenEx, METH_VARARGS|METH_KEYWORDS, "\n"
   68332             :     "OpenEx(char const * utf8_path, unsigned int nOpenFlags=0, char ** allowed_drivers=None, char ** open_options=None, char ** sibling_files=None) -> Dataset\n"
   68333             :     "\n"
   68334             :     "\n"
   68335             :     "Open a raster or vector file as a :py:class:`Dataset`.\n"
   68336             :     "See :cpp:func:`GDALOpenEx`.\n"
   68337             :     "\n"
   68338             :     "Parameters\n"
   68339             :     "----------\n"
   68340             :     "utf8_path : str\n"
   68341             :     "    name of the file to open\n"
   68342             :     "flags : int\n"
   68343             :     "        Flags controlling how the Dataset is opened. Multiple ``gdal.OF_XXX`` flags\n"
   68344             :     "        may be combined using the ``|`` operator. See :cpp:func:`GDALOpenEx`.\n"
   68345             :     "allowed_drivers : list, optional\n"
   68346             :     "        A list of the names of drivers that may attempt to open the dataset.\n"
   68347             :     "open_options : dict/list, optional\n"
   68348             :     "        A dict or list of name=value driver-specific opening options.\n"
   68349             :     "sibling_files: list, optional\n"
   68350             :     "        A list of filenames that are auxiliary to the main filename\n"
   68351             :     "\n"
   68352             :     "Returns\n"
   68353             :     "-------\n"
   68354             :     "Dataset, or ``None`` on failure.\n"
   68355             :     "\n"
   68356             :     "See Also\n"
   68357             :     "--------\n"
   68358             :     ":py:func:`Open`\n"
   68359             :     ":py:func:`OpenShared`\n"
   68360             :     "\n"
   68361             :     "\n"
   68362             :     ""},
   68363             :    { "OpenShared", _wrap_OpenShared, METH_VARARGS, "\n"
   68364             :     "OpenShared(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   68365             :     "\n"
   68366             :     "\n"
   68367             :     "Open a raster file as a :py:class:`Dataset`. If the file has already been\n"
   68368             :     "opened in the current thread, return a reference to the already-opened\n"
   68369             :     ":py:class:`Dataset`.  See :cpp:func:`GDALOpenShared`.\n"
   68370             :     "\n"
   68371             :     "Parameters\n"
   68372             :     "----------\n"
   68373             :     "utf8_path : str\n"
   68374             :     "    name of the file to open\n"
   68375             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   68376             :     "\n"
   68377             :     "Returns\n"
   68378             :     "-------\n"
   68379             :     "Dataset, or ``None`` on failure\n"
   68380             :     "\n"
   68381             :     "See Also\n"
   68382             :     "--------\n"
   68383             :     ":py:func:`Open`\n"
   68384             :     ":py:func:`OpenEx`\n"
   68385             :     "\n"
   68386             :     "\n"
   68387             :     ""},
   68388             :    { "IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, "IdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver"},
   68389             :    { "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"},
   68390             :    { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
   68391             :    { "new_GDALInfoOptions", _wrap_new_GDALInfoOptions, METH_O, "new_GDALInfoOptions(char ** options) -> GDALInfoOptions"},
   68392             :    { "delete_GDALInfoOptions", _wrap_delete_GDALInfoOptions, METH_O, "delete_GDALInfoOptions(GDALInfoOptions self)"},
   68393             :    { "GDALInfoOptions_swigregister", GDALInfoOptions_swigregister, METH_O, NULL},
   68394             :    { "GDALInfoOptions_swiginit", GDALInfoOptions_swiginit, METH_VARARGS, NULL},
   68395             :    { "InfoInternal", _wrap_InfoInternal, METH_VARARGS, "InfoInternal(Dataset hDataset, GDALInfoOptions infoOptions) -> retStringAndCPLFree *"},
   68396             :    { "new_GDALVectorInfoOptions", _wrap_new_GDALVectorInfoOptions, METH_O, "new_GDALVectorInfoOptions(char ** options) -> GDALVectorInfoOptions"},
   68397             :    { "delete_GDALVectorInfoOptions", _wrap_delete_GDALVectorInfoOptions, METH_O, "delete_GDALVectorInfoOptions(GDALVectorInfoOptions self)"},
   68398             :    { "GDALVectorInfoOptions_swigregister", GDALVectorInfoOptions_swigregister, METH_O, NULL},
   68399             :    { "GDALVectorInfoOptions_swiginit", GDALVectorInfoOptions_swiginit, METH_VARARGS, NULL},
   68400             :    { "VectorInfoInternal", _wrap_VectorInfoInternal, METH_VARARGS, "VectorInfoInternal(Dataset hDataset, GDALVectorInfoOptions infoOptions) -> retStringAndCPLFree *"},
   68401             :    { "new_GDALMultiDimInfoOptions", _wrap_new_GDALMultiDimInfoOptions, METH_O, "new_GDALMultiDimInfoOptions(char ** options) -> GDALMultiDimInfoOptions"},
   68402             :    { "delete_GDALMultiDimInfoOptions", _wrap_delete_GDALMultiDimInfoOptions, METH_O, "delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions self)"},
   68403             :    { "GDALMultiDimInfoOptions_swigregister", GDALMultiDimInfoOptions_swigregister, METH_O, NULL},
   68404             :    { "GDALMultiDimInfoOptions_swiginit", GDALMultiDimInfoOptions_swiginit, METH_VARARGS, NULL},
   68405             :    { "MultiDimInfoInternal", _wrap_MultiDimInfoInternal, METH_VARARGS, "MultiDimInfoInternal(Dataset hDataset, GDALMultiDimInfoOptions infoOptions) -> retStringAndCPLFree *"},
   68406             :    { "new_GDALTranslateOptions", _wrap_new_GDALTranslateOptions, METH_O, "new_GDALTranslateOptions(char ** options) -> GDALTranslateOptions"},
   68407             :    { "delete_GDALTranslateOptions", _wrap_delete_GDALTranslateOptions, METH_O, "delete_GDALTranslateOptions(GDALTranslateOptions self)"},
   68408             :    { "GDALTranslateOptions_swigregister", GDALTranslateOptions_swigregister, METH_O, NULL},
   68409             :    { "GDALTranslateOptions_swiginit", GDALTranslateOptions_swiginit, METH_VARARGS, NULL},
   68410             :    { "TranslateInternal", _wrap_TranslateInternal, METH_VARARGS, "TranslateInternal(char const * dest, Dataset dataset, GDALTranslateOptions translateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68411             :    { "new_GDALWarpAppOptions", _wrap_new_GDALWarpAppOptions, METH_O, "new_GDALWarpAppOptions(char ** options) -> GDALWarpAppOptions"},
   68412             :    { "delete_GDALWarpAppOptions", _wrap_delete_GDALWarpAppOptions, METH_O, "delete_GDALWarpAppOptions(GDALWarpAppOptions self)"},
   68413             :    { "GDALWarpAppOptions_swigregister", GDALWarpAppOptions_swigregister, METH_O, NULL},
   68414             :    { "GDALWarpAppOptions_swiginit", GDALWarpAppOptions_swiginit, METH_VARARGS, NULL},
   68415             :    { "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"},
   68416             :    { "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"},
   68417             :    { "new_GDALVectorTranslateOptions", _wrap_new_GDALVectorTranslateOptions, METH_O, "new_GDALVectorTranslateOptions(char ** options) -> GDALVectorTranslateOptions"},
   68418             :    { "delete_GDALVectorTranslateOptions", _wrap_delete_GDALVectorTranslateOptions, METH_O, "delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions self)"},
   68419             :    { "GDALVectorTranslateOptions_swigregister", GDALVectorTranslateOptions_swigregister, METH_O, NULL},
   68420             :    { "GDALVectorTranslateOptions_swiginit", GDALVectorTranslateOptions_swiginit, METH_VARARGS, NULL},
   68421             :    { "wrapper_GDALVectorTranslateDestDS", _wrap_wrapper_GDALVectorTranslateDestDS, METH_VARARGS, "wrapper_GDALVectorTranslateDestDS(Dataset dstDS, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68422             :    { "wrapper_GDALVectorTranslateDestName", _wrap_wrapper_GDALVectorTranslateDestName, METH_VARARGS, "wrapper_GDALVectorTranslateDestName(char const * dest, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68423             :    { "new_GDALDEMProcessingOptions", _wrap_new_GDALDEMProcessingOptions, METH_O, "new_GDALDEMProcessingOptions(char ** options) -> GDALDEMProcessingOptions"},
   68424             :    { "delete_GDALDEMProcessingOptions", _wrap_delete_GDALDEMProcessingOptions, METH_O, "delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions self)"},
   68425             :    { "GDALDEMProcessingOptions_swigregister", GDALDEMProcessingOptions_swigregister, METH_O, NULL},
   68426             :    { "GDALDEMProcessingOptions_swiginit", GDALDEMProcessingOptions_swiginit, METH_VARARGS, NULL},
   68427             :    { "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"},
   68428             :    { "new_GDALNearblackOptions", _wrap_new_GDALNearblackOptions, METH_O, "new_GDALNearblackOptions(char ** options) -> GDALNearblackOptions"},
   68429             :    { "delete_GDALNearblackOptions", _wrap_delete_GDALNearblackOptions, METH_O, "delete_GDALNearblackOptions(GDALNearblackOptions self)"},
   68430             :    { "GDALNearblackOptions_swigregister", GDALNearblackOptions_swigregister, METH_O, NULL},
   68431             :    { "GDALNearblackOptions_swiginit", GDALNearblackOptions_swiginit, METH_VARARGS, NULL},
   68432             :    { "wrapper_GDALNearblackDestDS", _wrap_wrapper_GDALNearblackDestDS, METH_VARARGS, "wrapper_GDALNearblackDestDS(Dataset dstDS, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68433             :    { "wrapper_GDALNearblackDestName", _wrap_wrapper_GDALNearblackDestName, METH_VARARGS, "wrapper_GDALNearblackDestName(char const * dest, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68434             :    { "new_GDALGridOptions", _wrap_new_GDALGridOptions, METH_O, "new_GDALGridOptions(char ** options) -> GDALGridOptions"},
   68435             :    { "delete_GDALGridOptions", _wrap_delete_GDALGridOptions, METH_O, "delete_GDALGridOptions(GDALGridOptions self)"},
   68436             :    { "GDALGridOptions_swigregister", GDALGridOptions_swigregister, METH_O, NULL},
   68437             :    { "GDALGridOptions_swiginit", GDALGridOptions_swiginit, METH_VARARGS, NULL},
   68438             :    { "GridInternal", _wrap_GridInternal, METH_VARARGS, "GridInternal(char const * dest, Dataset dataset, GDALGridOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68439             :    { "new_GDALContourOptions", _wrap_new_GDALContourOptions, METH_O, "new_GDALContourOptions(char ** options) -> GDALContourOptions"},
   68440             :    { "delete_GDALContourOptions", _wrap_delete_GDALContourOptions, METH_O, "delete_GDALContourOptions(GDALContourOptions self)"},
   68441             :    { "GDALContourOptions_swigregister", GDALContourOptions_swigregister, METH_O, NULL},
   68442             :    { "GDALContourOptions_swiginit", GDALContourOptions_swiginit, METH_VARARGS, NULL},
   68443             :    { "wrapper_GDALContourDestDS", _wrap_wrapper_GDALContourDestDS, METH_VARARGS, "wrapper_GDALContourDestDS(Dataset dstDS, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68444             :    { "wrapper_GDALContourDestName", _wrap_wrapper_GDALContourDestName, METH_VARARGS, "wrapper_GDALContourDestName(char const * dest, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68445             :    { "new_GDALRasterizeOptions", _wrap_new_GDALRasterizeOptions, METH_O, "new_GDALRasterizeOptions(char ** options) -> GDALRasterizeOptions"},
   68446             :    { "delete_GDALRasterizeOptions", _wrap_delete_GDALRasterizeOptions, METH_O, "delete_GDALRasterizeOptions(GDALRasterizeOptions self)"},
   68447             :    { "GDALRasterizeOptions_swigregister", GDALRasterizeOptions_swigregister, METH_O, NULL},
   68448             :    { "GDALRasterizeOptions_swiginit", GDALRasterizeOptions_swiginit, METH_VARARGS, NULL},
   68449             :    { "wrapper_GDALRasterizeDestDS", _wrap_wrapper_GDALRasterizeDestDS, METH_VARARGS, "wrapper_GDALRasterizeDestDS(Dataset dstDS, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68450             :    { "wrapper_GDALRasterizeDestName", _wrap_wrapper_GDALRasterizeDestName, METH_VARARGS, "wrapper_GDALRasterizeDestName(char const * dest, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68451             :    { "new_GDALFootprintOptions", _wrap_new_GDALFootprintOptions, METH_O, "new_GDALFootprintOptions(char ** options) -> GDALFootprintOptions"},
   68452             :    { "delete_GDALFootprintOptions", _wrap_delete_GDALFootprintOptions, METH_O, "delete_GDALFootprintOptions(GDALFootprintOptions self)"},
   68453             :    { "GDALFootprintOptions_swigregister", GDALFootprintOptions_swigregister, METH_O, NULL},
   68454             :    { "GDALFootprintOptions_swiginit", GDALFootprintOptions_swiginit, METH_VARARGS, NULL},
   68455             :    { "wrapper_GDALFootprintDestDS", _wrap_wrapper_GDALFootprintDestDS, METH_VARARGS, "wrapper_GDALFootprintDestDS(Dataset dstDS, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68456             :    { "wrapper_GDALFootprintDestName", _wrap_wrapper_GDALFootprintDestName, METH_VARARGS, "wrapper_GDALFootprintDestName(char const * dest, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68457             :    { "new_GDALBuildVRTOptions", _wrap_new_GDALBuildVRTOptions, METH_O, "new_GDALBuildVRTOptions(char ** options) -> GDALBuildVRTOptions"},
   68458             :    { "delete_GDALBuildVRTOptions", _wrap_delete_GDALBuildVRTOptions, METH_O, "delete_GDALBuildVRTOptions(GDALBuildVRTOptions self)"},
   68459             :    { "GDALBuildVRTOptions_swigregister", GDALBuildVRTOptions_swigregister, METH_O, NULL},
   68460             :    { "GDALBuildVRTOptions_swiginit", GDALBuildVRTOptions_swiginit, METH_VARARGS, NULL},
   68461             :    { "BuildVRTInternalObjects", _wrap_BuildVRTInternalObjects, METH_VARARGS, "BuildVRTInternalObjects(char const * dest, int object_list_count, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68462             :    { "BuildVRTInternalNames", _wrap_BuildVRTInternalNames, METH_VARARGS, "BuildVRTInternalNames(char const * dest, char ** source_filenames, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68463             :    { "new_GDALTileIndexOptions", _wrap_new_GDALTileIndexOptions, METH_O, "new_GDALTileIndexOptions(char ** options) -> GDALTileIndexOptions"},
   68464             :    { "delete_GDALTileIndexOptions", _wrap_delete_GDALTileIndexOptions, METH_O, "delete_GDALTileIndexOptions(GDALTileIndexOptions self)"},
   68465             :    { "GDALTileIndexOptions_swigregister", GDALTileIndexOptions_swigregister, METH_O, NULL},
   68466             :    { "GDALTileIndexOptions_swiginit", GDALTileIndexOptions_swiginit, METH_VARARGS, NULL},
   68467             :    { "TileIndexInternalNames", _wrap_TileIndexInternalNames, METH_VARARGS, "TileIndexInternalNames(char const * dest, char ** source_filenames, GDALTileIndexOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68468             :    { "new_GDALMultiDimTranslateOptions", _wrap_new_GDALMultiDimTranslateOptions, METH_O, "new_GDALMultiDimTranslateOptions(char ** options) -> GDALMultiDimTranslateOptions"},
   68469             :    { "delete_GDALMultiDimTranslateOptions", _wrap_delete_GDALMultiDimTranslateOptions, METH_O, "delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions self)"},
   68470             :    { "GDALMultiDimTranslateOptions_swigregister", GDALMultiDimTranslateOptions_swigregister, METH_O, NULL},
   68471             :    { "GDALMultiDimTranslateOptions_swiginit", GDALMultiDimTranslateOptions_swiginit, METH_VARARGS, NULL},
   68472             :    { "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"},
   68473             :    { NULL, NULL, 0, NULL }
   68474             : };
   68475             : 
   68476             : static PyMethodDef SwigMethods_proxydocs[] = {
   68477             :    { NULL, NULL, 0, NULL }
   68478             : };
   68479             : 
   68480             : 
   68481             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   68482             : 
   68483           0 : static void *_p_p_GDALComputedRasterBandShadowTo_p_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68484           0 :     return (void *)((GDALRasterBandShadow **)  ((GDALComputedRasterBandShadow **) x));
   68485             : }
   68486         193 : static void *_p_GDALComputedRasterBandShadowTo_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68487         193 :     return (void *)((GDALRasterBandShadow *)  ((GDALComputedRasterBandShadow *) x));
   68488             : }
   68489       54969 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68490       54969 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   68491             : }
   68492         971 : static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68493         971 :     return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
   68494             : }
   68495        6455 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68496        6455 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   68497             : }
   68498        6705 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68499        6705 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   68500             : }
   68501           0 : static void *_p_GDALComputedRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68502           0 :     return (void *)((GDALMajorObjectShadow *) (GDALRasterBandShadow *) ((GDALComputedRasterBandShadow *) x));
   68503             : }
   68504             : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   68505             : static swig_type_info _swigt__p_CPLVirtualMemShadow = {"_p_CPLVirtualMemShadow", "CPLVirtualMemShadow *", 0, 0, (void*)0, 0};
   68506             : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   68507             : static swig_type_info _swigt__p_DirEntry = {"_p_DirEntry", "DirEntry *", 0, 0, (void*)0, 0};
   68508             : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   68509             : static swig_type_info _swigt__p_GDALAlgorithmArgHS = {"_p_GDALAlgorithmArgHS", "GDALAlgorithmArgHS *", 0, 0, (void*)0, 0};
   68510             : static swig_type_info _swigt__p_GDALAlgorithmHS = {"_p_GDALAlgorithmHS", "GDALAlgorithmHS *", 0, 0, (void*)0, 0};
   68511             : static swig_type_info _swigt__p_GDALAlgorithmRegistryHS = {"_p_GDALAlgorithmRegistryHS", "GDALAlgorithmRegistryHS *", 0, 0, (void*)0, 0};
   68512             : static swig_type_info _swigt__p_GDALArgDatasetValueHS = {"_p_GDALArgDatasetValueHS", "GDALArgDatasetValueHS *", 0, 0, (void*)0, 0};
   68513             : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   68514             : static swig_type_info _swigt__p_GDALAttributeHS = {"_p_GDALAttributeHS", "GDALAttributeHS *", 0, 0, (void*)0, 0};
   68515             : static swig_type_info _swigt__p_GDALBuildVRTOptions = {"_p_GDALBuildVRTOptions", "GDALBuildVRTOptions *", 0, 0, (void*)0, 0};
   68516             : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   68517             : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   68518             : static swig_type_info _swigt__p_GDALComputedRasterBandShadow = {"_p_GDALComputedRasterBandShadow", "GDALComputedRasterBandShadow *", 0, 0, (void*)0, 0};
   68519             : static swig_type_info _swigt__p_GDALContourOptions = {"_p_GDALContourOptions", "GDALContourOptions *", 0, 0, (void*)0, 0};
   68520             : static swig_type_info _swigt__p_GDALDEMProcessingOptions = {"_p_GDALDEMProcessingOptions", "GDALDEMProcessingOptions *", 0, 0, (void*)0, 0};
   68521             : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   68522             : static swig_type_info _swigt__p_GDALDimensionHS = {"_p_GDALDimensionHS", "GDALDimensionHS *", 0, 0, (void*)0, 0};
   68523             : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   68524             : static swig_type_info _swigt__p_GDALEDTComponentHS = {"_p_GDALEDTComponentHS", "GDALEDTComponentHS *", 0, 0, (void*)0, 0};
   68525             : static swig_type_info _swigt__p_GDALExtendedDataTypeClass = {"_p_GDALExtendedDataTypeClass", "enum GDALExtendedDataTypeClass *|GDALExtendedDataTypeClass *", 0, 0, (void*)0, 0};
   68526             : static swig_type_info _swigt__p_GDALExtendedDataTypeHS = {"_p_GDALExtendedDataTypeHS", "GDALExtendedDataTypeHS *", 0, 0, (void*)0, 0};
   68527             : static swig_type_info _swigt__p_GDALExtendedDataTypeSubType = {"_p_GDALExtendedDataTypeSubType", "enum GDALExtendedDataTypeSubType *|GDALExtendedDataTypeSubType *", 0, 0, (void*)0, 0};
   68528             : static swig_type_info _swigt__p_GDALFootprintOptions = {"_p_GDALFootprintOptions", "GDALFootprintOptions *", 0, 0, (void*)0, 0};
   68529             : static swig_type_info _swigt__p_GDALGridOptions = {"_p_GDALGridOptions", "GDALGridOptions *", 0, 0, (void*)0, 0};
   68530             : static swig_type_info _swigt__p_GDALGroupHS = {"_p_GDALGroupHS", "GDALGroupHS *", 0, 0, (void*)0, 0};
   68531             : static swig_type_info _swigt__p_GDALInfoOptions = {"_p_GDALInfoOptions", "GDALInfoOptions *", 0, 0, (void*)0, 0};
   68532             : static swig_type_info _swigt__p_GDALMDArrayHS = {"_p_GDALMDArrayHS", "GDALMDArrayHS *", 0, 0, (void*)0, 0};
   68533             : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   68534             : static swig_type_info _swigt__p_GDALMultiDimInfoOptions = {"_p_GDALMultiDimInfoOptions", "GDALMultiDimInfoOptions *", 0, 0, (void*)0, 0};
   68535             : static swig_type_info _swigt__p_GDALMultiDimTranslateOptions = {"_p_GDALMultiDimTranslateOptions", "GDALMultiDimTranslateOptions *", 0, 0, (void*)0, 0};
   68536             : static swig_type_info _swigt__p_GDALNearblackOptions = {"_p_GDALNearblackOptions", "GDALNearblackOptions *", 0, 0, (void*)0, 0};
   68537             : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   68538             : static swig_type_info _swigt__p_GDALRasterAlgebraBinaryOperation = {"_p_GDALRasterAlgebraBinaryOperation", "enum GDALRasterAlgebraBinaryOperation *|GDALRasterAlgebraBinaryOperation *", 0, 0, (void*)0, 0};
   68539             : static swig_type_info _swigt__p_GDALRasterAlgebraUnaryOperation = {"_p_GDALRasterAlgebraUnaryOperation", "enum GDALRasterAlgebraUnaryOperation *|GDALRasterAlgebraUnaryOperation *", 0, 0, (void*)0, 0};
   68540             : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   68541             : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   68542             : static swig_type_info _swigt__p_GDALRasterizeOptions = {"_p_GDALRasterizeOptions", "GDALRasterizeOptions *", 0, 0, (void*)0, 0};
   68543             : static swig_type_info _swigt__p_GDALRelationshipShadow = {"_p_GDALRelationshipShadow", "GDALRelationshipShadow *", 0, 0, (void*)0, 0};
   68544             : static swig_type_info _swigt__p_GDALSubdatasetInfo = {"_p_GDALSubdatasetInfo", "GDALSubdatasetInfo *|GDALSubdatasetInfoShadow *", 0, 0, (void*)0, 0};
   68545             : static swig_type_info _swigt__p_GDALTileIndexOptions = {"_p_GDALTileIndexOptions", "GDALTileIndexOptions *", 0, 0, (void*)0, 0};
   68546             : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   68547             : static swig_type_info _swigt__p_GDALTranslateOptions = {"_p_GDALTranslateOptions", "GDALTranslateOptions *", 0, 0, (void*)0, 0};
   68548             : static swig_type_info _swigt__p_GDALVectorInfoOptions = {"_p_GDALVectorInfoOptions", "GDALVectorInfoOptions *", 0, 0, (void*)0, 0};
   68549             : static swig_type_info _swigt__p_GDALVectorTranslateOptions = {"_p_GDALVectorTranslateOptions", "GDALVectorTranslateOptions *", 0, 0, (void*)0, 0};
   68550             : static swig_type_info _swigt__p_GDALViewshedMode = {"_p_GDALViewshedMode", "enum GDALViewshedMode *|GDALViewshedMode *", 0, 0, (void*)0, 0};
   68551             : static swig_type_info _swigt__p_GDALViewshedOutputType = {"_p_GDALViewshedOutputType", "enum GDALViewshedOutputType *|GDALViewshedOutputType *", 0, 0, (void*)0, 0};
   68552             : static swig_type_info _swigt__p_GDALWarpAppOptions = {"_p_GDALWarpAppOptions", "GDALWarpAppOptions *", 0, 0, (void*)0, 0};
   68553             : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   68554             : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   68555             : static swig_type_info _swigt__p_GUIntBig = {"_p_GUIntBig", "GUIntBig *", 0, 0, (void*)0, 0};
   68556             : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
   68557             : static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
   68558             : static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
   68559             : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
   68560             : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   68561             : static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
   68562             : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
   68563             : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   68564             : static swig_type_info _swigt__p_Statistics = {"_p_Statistics", "Statistics *", 0, 0, (void*)0, 0};
   68565             : static swig_type_info _swigt__p_SuggestedWarpOutputRes = {"_p_SuggestedWarpOutputRes", "SuggestedWarpOutputRes *", 0, 0, (void*)0, 0};
   68566             : static swig_type_info _swigt__p_VSIDIR = {"_p_VSIDIR", "VSIDIR *", 0, 0, (void*)0, 0};
   68567             : static swig_type_info _swigt__p_VSILFILE = {"_p_VSILFILE", "VSILFILE *", 0, 0, (void*)0, 0};
   68568             : static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
   68569             : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   68570             : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   68571             : 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};
   68572             : 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};
   68573             : static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *", 0, 0, (void*)0, 0};
   68574             : static swig_type_info _swigt__p_p_GByte = {"_p_p_GByte", "GByte **", 0, 0, (void*)0, 0};
   68575             : static swig_type_info _swigt__p_p_GDALDatasetShadow = {"_p_p_GDALDatasetShadow", "GDALDatasetShadow **", 0, 0, (void*)0, 0};
   68576             : static swig_type_info _swigt__p_p_GDALDimensionHS = {"_p_p_GDALDimensionHS", "GDALDimensionHS **", 0, 0, (void*)0, 0};
   68577             : static swig_type_info _swigt__p_p_GDALEDTComponentHS = {"_p_p_GDALEDTComponentHS", "GDALEDTComponentHS **", 0, 0, (void*)0, 0};
   68578             : static swig_type_info _swigt__p_p_GDALMDArrayHS = {"_p_p_GDALMDArrayHS", "GDALMDArrayHS **", 0, 0, (void*)0, 0};
   68579             : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   68580             : static swig_type_info _swigt__p_p_GDALComputedRasterBandShadow = {"_p_p_GDALComputedRasterBandShadow", 0, 0, 0, 0, 0};
   68581             : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   68582             : static swig_type_info _swigt__p_p_GUIntBig = {"_p_p_GUIntBig", "GUIntBig **", 0, 0, (void*)0, 0};
   68583             : static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 0, 0, (void*)0, 0};
   68584             : static swig_type_info _swigt__p_p_OSRSpatialReferenceShadow = {"_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow **", 0, 0, (void*)0, 0};
   68585             : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   68586             : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
   68587             : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   68588             : static swig_type_info _swigt__p_p_long_long = {"_p_p_long_long", "long long **", 0, 0, (void*)0, 0};
   68589             : static swig_type_info _swigt__p_p_p_GDALAttributeHS = {"_p_p_p_GDALAttributeHS", "GDALAttributeHS ***", 0, 0, (void*)0, 0};
   68590             : static swig_type_info _swigt__p_p_p_GDALDimensionHS = {"_p_p_p_GDALDimensionHS", "GDALDimensionHS ***", 0, 0, (void*)0, 0};
   68591             : static swig_type_info _swigt__p_p_p_GDALEDTComponentHS = {"_p_p_p_GDALEDTComponentHS", "GDALEDTComponentHS ***", 0, 0, (void*)0, 0};
   68592             : static swig_type_info _swigt__p_p_p_GDALMDArrayHS = {"_p_p_p_GDALMDArrayHS", "GDALMDArrayHS ***", 0, 0, (void*)0, 0};
   68593             : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   68594             : static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
   68595             : static swig_type_info _swigt__p_vsi_l_offset = {"_p_vsi_l_offset", "vsi_l_offset *", 0, 0, (void*)0, 0};
   68596             : 
   68597             : static swig_type_info *swig_type_initial[] = {
   68598             :   &_swigt__p_CPLErrorHandler,
   68599             :   &_swigt__p_CPLVirtualMemShadow,
   68600             :   &_swigt__p_CPLXMLNode,
   68601             :   &_swigt__p_DirEntry,
   68602             :   &_swigt__p_GByte,
   68603             :   &_swigt__p_GDALAlgorithmArgHS,
   68604             :   &_swigt__p_GDALAlgorithmHS,
   68605             :   &_swigt__p_GDALAlgorithmRegistryHS,
   68606             :   &_swigt__p_GDALArgDatasetValueHS,
   68607             :   &_swigt__p_GDALAsyncReaderShadow,
   68608             :   &_swigt__p_GDALAttributeHS,
   68609             :   &_swigt__p_GDALBuildVRTOptions,
   68610             :   &_swigt__p_GDALColorEntry,
   68611             :   &_swigt__p_GDALColorTableShadow,
   68612             :   &_swigt__p_GDALComputedRasterBandShadow,
   68613             :   &_swigt__p_GDALContourOptions,
   68614             :   &_swigt__p_GDALDEMProcessingOptions,
   68615             :   &_swigt__p_GDALDatasetShadow,
   68616             :   &_swigt__p_GDALDimensionHS,
   68617             :   &_swigt__p_GDALDriverShadow,
   68618             :   &_swigt__p_GDALEDTComponentHS,
   68619             :   &_swigt__p_GDALExtendedDataTypeClass,
   68620             :   &_swigt__p_GDALExtendedDataTypeHS,
   68621             :   &_swigt__p_GDALExtendedDataTypeSubType,
   68622             :   &_swigt__p_GDALFootprintOptions,
   68623             :   &_swigt__p_GDALGridOptions,
   68624             :   &_swigt__p_GDALGroupHS,
   68625             :   &_swigt__p_GDALInfoOptions,
   68626             :   &_swigt__p_GDALMDArrayHS,
   68627             :   &_swigt__p_GDALMajorObjectShadow,
   68628             :   &_swigt__p_GDALMultiDimInfoOptions,
   68629             :   &_swigt__p_GDALMultiDimTranslateOptions,
   68630             :   &_swigt__p_GDALNearblackOptions,
   68631             :   &_swigt__p_GDALProgressFunc,
   68632             :   &_swigt__p_GDALRasterAlgebraBinaryOperation,
   68633             :   &_swigt__p_GDALRasterAlgebraUnaryOperation,
   68634             :   &_swigt__p_GDALRasterAttributeTableShadow,
   68635             :   &_swigt__p_GDALRasterBandShadow,
   68636             :   &_swigt__p_GDALRasterizeOptions,
   68637             :   &_swigt__p_GDALRelationshipShadow,
   68638             :   &_swigt__p_GDALSubdatasetInfo,
   68639             :   &_swigt__p_GDALTileIndexOptions,
   68640             :   &_swigt__p_GDALTransformerInfoShadow,
   68641             :   &_swigt__p_GDALTranslateOptions,
   68642             :   &_swigt__p_GDALVectorInfoOptions,
   68643             :   &_swigt__p_GDALVectorTranslateOptions,
   68644             :   &_swigt__p_GDALViewshedMode,
   68645             :   &_swigt__p_GDALViewshedOutputType,
   68646             :   &_swigt__p_GDALWarpAppOptions,
   68647             :   &_swigt__p_GDAL_GCP,
   68648             :   &_swigt__p_GIntBig,
   68649             :   &_swigt__p_GUIntBig,
   68650             :   &_swigt__p_OGRFeatureShadow,
   68651             :   &_swigt__p_OGRFieldDomainShadow,
   68652             :   &_swigt__p_OGRGeomFieldDefnShadow,
   68653             :   &_swigt__p_OGRGeometryShadow,
   68654             :   &_swigt__p_OGRLayerShadow,
   68655             :   &_swigt__p_OGRStyleTableShadow,
   68656             :   &_swigt__p_OSRSpatialReferenceShadow,
   68657             :   &_swigt__p_StatBuf,
   68658             :   &_swigt__p_Statistics,
   68659             :   &_swigt__p_SuggestedWarpOutputRes,
   68660             :   &_swigt__p_VSIDIR,
   68661             :   &_swigt__p_VSILFILE,
   68662             :   &_swigt__p_bool,
   68663             :   &_swigt__p_char,
   68664             :   &_swigt__p_double,
   68665             :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   68666             :   &_swigt__p_int,
   68667             :   &_swigt__p_long_long,
   68668             :   &_swigt__p_p_GByte,
   68669             :   &_swigt__p_p_GDALComputedRasterBandShadow,
   68670             :   &_swigt__p_p_GDALDatasetShadow,
   68671             :   &_swigt__p_p_GDALDimensionHS,
   68672             :   &_swigt__p_p_GDALEDTComponentHS,
   68673             :   &_swigt__p_p_GDALMDArrayHS,
   68674             :   &_swigt__p_p_GDALRasterBandShadow,
   68675             :   &_swigt__p_p_GDAL_GCP,
   68676             :   &_swigt__p_p_GUIntBig,
   68677             :   &_swigt__p_p_OGRLayerShadow,
   68678             :   &_swigt__p_p_OSRSpatialReferenceShadow,
   68679             :   &_swigt__p_p_char,
   68680             :   &_swigt__p_p_double,
   68681             :   &_swigt__p_p_int,
   68682             :   &_swigt__p_p_long_long,
   68683             :   &_swigt__p_p_p_GDALAttributeHS,
   68684             :   &_swigt__p_p_p_GDALDimensionHS,
   68685             :   &_swigt__p_p_p_GDALEDTComponentHS,
   68686             :   &_swigt__p_p_p_GDALMDArrayHS,
   68687             :   &_swigt__p_p_void,
   68688             :   &_swigt__p_size_t,
   68689             :   &_swigt__p_vsi_l_offset,
   68690             : };
   68691             : 
   68692             : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   68693             : static swig_cast_info _swigc__p_CPLVirtualMemShadow[] = {  {&_swigt__p_CPLVirtualMemShadow, 0, 0, 0},{0, 0, 0, 0}};
   68694             : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   68695             : static swig_cast_info _swigc__p_DirEntry[] = {  {&_swigt__p_DirEntry, 0, 0, 0},{0, 0, 0, 0}};
   68696             : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   68697             : static swig_cast_info _swigc__p_GDALAlgorithmArgHS[] = {  {&_swigt__p_GDALAlgorithmArgHS, 0, 0, 0},{0, 0, 0, 0}};
   68698             : static swig_cast_info _swigc__p_GDALAlgorithmHS[] = {  {&_swigt__p_GDALAlgorithmHS, 0, 0, 0},{0, 0, 0, 0}};
   68699             : static swig_cast_info _swigc__p_GDALAlgorithmRegistryHS[] = {  {&_swigt__p_GDALAlgorithmRegistryHS, 0, 0, 0},{0, 0, 0, 0}};
   68700             : static swig_cast_info _swigc__p_GDALArgDatasetValueHS[] = {  {&_swigt__p_GDALArgDatasetValueHS, 0, 0, 0},{0, 0, 0, 0}};
   68701             : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   68702             : static swig_cast_info _swigc__p_GDALAttributeHS[] = {  {&_swigt__p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   68703             : static swig_cast_info _swigc__p_GDALBuildVRTOptions[] = {  {&_swigt__p_GDALBuildVRTOptions, 0, 0, 0},{0, 0, 0, 0}};
   68704             : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   68705             : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   68706             : static swig_cast_info _swigc__p_GDALComputedRasterBandShadow[] = {  {&_swigt__p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   68707             : static swig_cast_info _swigc__p_GDALContourOptions[] = {  {&_swigt__p_GDALContourOptions, 0, 0, 0},{0, 0, 0, 0}};
   68708             : static swig_cast_info _swigc__p_GDALDEMProcessingOptions[] = {  {&_swigt__p_GDALDEMProcessingOptions, 0, 0, 0},{0, 0, 0, 0}};
   68709             : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   68710             : static swig_cast_info _swigc__p_GDALDimensionHS[] = {  {&_swigt__p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   68711             : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   68712             : static swig_cast_info _swigc__p_GDALEDTComponentHS[] = {  {&_swigt__p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   68713             : static swig_cast_info _swigc__p_GDALExtendedDataTypeClass[] = {  {&_swigt__p_GDALExtendedDataTypeClass, 0, 0, 0},{0, 0, 0, 0}};
   68714             : static swig_cast_info _swigc__p_GDALExtendedDataTypeHS[] = {  {&_swigt__p_GDALExtendedDataTypeHS, 0, 0, 0},{0, 0, 0, 0}};
   68715             : static swig_cast_info _swigc__p_GDALExtendedDataTypeSubType[] = {  {&_swigt__p_GDALExtendedDataTypeSubType, 0, 0, 0},{0, 0, 0, 0}};
   68716             : static swig_cast_info _swigc__p_GDALFootprintOptions[] = {  {&_swigt__p_GDALFootprintOptions, 0, 0, 0},{0, 0, 0, 0}};
   68717             : static swig_cast_info _swigc__p_GDALGridOptions[] = {  {&_swigt__p_GDALGridOptions, 0, 0, 0},{0, 0, 0, 0}};
   68718             : static swig_cast_info _swigc__p_GDALGroupHS[] = {  {&_swigt__p_GDALGroupHS, 0, 0, 0},{0, 0, 0, 0}};
   68719             : static swig_cast_info _swigc__p_GDALInfoOptions[] = {  {&_swigt__p_GDALInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   68720             : static swig_cast_info _swigc__p_GDALMDArrayHS[] = {  {&_swigt__p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   68721             : 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}};
   68722             : static swig_cast_info _swigc__p_GDALMultiDimInfoOptions[] = {  {&_swigt__p_GDALMultiDimInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   68723             : static swig_cast_info _swigc__p_GDALMultiDimTranslateOptions[] = {  {&_swigt__p_GDALMultiDimTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   68724             : static swig_cast_info _swigc__p_GDALNearblackOptions[] = {  {&_swigt__p_GDALNearblackOptions, 0, 0, 0},{0, 0, 0, 0}};
   68725             : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   68726             : static swig_cast_info _swigc__p_GDALRasterAlgebraBinaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraBinaryOperation, 0, 0, 0},{0, 0, 0, 0}};
   68727             : static swig_cast_info _swigc__p_GDALRasterAlgebraUnaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraUnaryOperation, 0, 0, 0},{0, 0, 0, 0}};
   68728             : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   68729             : 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}};
   68730             : static swig_cast_info _swigc__p_GDALRasterizeOptions[] = {  {&_swigt__p_GDALRasterizeOptions, 0, 0, 0},{0, 0, 0, 0}};
   68731             : static swig_cast_info _swigc__p_GDALRelationshipShadow[] = {  {&_swigt__p_GDALRelationshipShadow, 0, 0, 0},{0, 0, 0, 0}};
   68732             : static swig_cast_info _swigc__p_GDALSubdatasetInfo[] = {  {&_swigt__p_GDALSubdatasetInfo, 0, 0, 0},{0, 0, 0, 0}};
   68733             : static swig_cast_info _swigc__p_GDALTileIndexOptions[] = {  {&_swigt__p_GDALTileIndexOptions, 0, 0, 0},{0, 0, 0, 0}};
   68734             : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   68735             : static swig_cast_info _swigc__p_GDALTranslateOptions[] = {  {&_swigt__p_GDALTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   68736             : static swig_cast_info _swigc__p_GDALVectorInfoOptions[] = {  {&_swigt__p_GDALVectorInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   68737             : static swig_cast_info _swigc__p_GDALVectorTranslateOptions[] = {  {&_swigt__p_GDALVectorTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   68738             : static swig_cast_info _swigc__p_GDALViewshedMode[] = {  {&_swigt__p_GDALViewshedMode, 0, 0, 0},{0, 0, 0, 0}};
   68739             : static swig_cast_info _swigc__p_GDALViewshedOutputType[] = {  {&_swigt__p_GDALViewshedOutputType, 0, 0, 0},{0, 0, 0, 0}};
   68740             : static swig_cast_info _swigc__p_GDALWarpAppOptions[] = {  {&_swigt__p_GDALWarpAppOptions, 0, 0, 0},{0, 0, 0, 0}};
   68741             : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   68742             : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   68743             : static swig_cast_info _swigc__p_GUIntBig[] = {  {&_swigt__p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   68744             : static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
   68745             : static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
   68746             : static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   68747             : static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
   68748             : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   68749             : static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   68750             : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   68751             : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   68752             : static swig_cast_info _swigc__p_Statistics[] = {  {&_swigt__p_Statistics, 0, 0, 0},{0, 0, 0, 0}};
   68753             : static swig_cast_info _swigc__p_SuggestedWarpOutputRes[] = {  {&_swigt__p_SuggestedWarpOutputRes, 0, 0, 0},{0, 0, 0, 0}};
   68754             : static swig_cast_info _swigc__p_VSIDIR[] = {  {&_swigt__p_VSIDIR, 0, 0, 0},{0, 0, 0, 0}};
   68755             : static swig_cast_info _swigc__p_VSILFILE[] = {  {&_swigt__p_VSILFILE, 0, 0, 0},{0, 0, 0, 0}};
   68756             : static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
   68757             : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   68758             : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   68759             : 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}};
   68760             : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   68761             : static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   68762             : static swig_cast_info _swigc__p_p_GByte[] = {  {&_swigt__p_p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   68763             : static swig_cast_info _swigc__p_p_GDALDatasetShadow[] = {  {&_swigt__p_p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   68764             : static swig_cast_info _swigc__p_p_GDALDimensionHS[] = {  {&_swigt__p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   68765             : static swig_cast_info _swigc__p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   68766             : static swig_cast_info _swigc__p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   68767             : static swig_cast_info _swigc__p_p_GDALComputedRasterBandShadow[] = {{&_swigt__p_p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   68768             : 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}};
   68769             : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   68770             : static swig_cast_info _swigc__p_p_GUIntBig[] = {  {&_swigt__p_p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   68771             : static swig_cast_info _swigc__p_p_OGRLayerShadow[] = {  {&_swigt__p_p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   68772             : static swig_cast_info _swigc__p_p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   68773             : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   68774             : static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
   68775             : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   68776             : static swig_cast_info _swigc__p_p_long_long[] = {  {&_swigt__p_p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   68777             : static swig_cast_info _swigc__p_p_p_GDALAttributeHS[] = {  {&_swigt__p_p_p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   68778             : static swig_cast_info _swigc__p_p_p_GDALDimensionHS[] = {  {&_swigt__p_p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   68779             : static swig_cast_info _swigc__p_p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   68780             : static swig_cast_info _swigc__p_p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   68781             : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   68782             : static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
   68783             : static swig_cast_info _swigc__p_vsi_l_offset[] = {  {&_swigt__p_vsi_l_offset, 0, 0, 0},{0, 0, 0, 0}};
   68784             : 
   68785             : static swig_cast_info *swig_cast_initial[] = {
   68786             :   _swigc__p_CPLErrorHandler,
   68787             :   _swigc__p_CPLVirtualMemShadow,
   68788             :   _swigc__p_CPLXMLNode,
   68789             :   _swigc__p_DirEntry,
   68790             :   _swigc__p_GByte,
   68791             :   _swigc__p_GDALAlgorithmArgHS,
   68792             :   _swigc__p_GDALAlgorithmHS,
   68793             :   _swigc__p_GDALAlgorithmRegistryHS,
   68794             :   _swigc__p_GDALArgDatasetValueHS,
   68795             :   _swigc__p_GDALAsyncReaderShadow,
   68796             :   _swigc__p_GDALAttributeHS,
   68797             :   _swigc__p_GDALBuildVRTOptions,
   68798             :   _swigc__p_GDALColorEntry,
   68799             :   _swigc__p_GDALColorTableShadow,
   68800             :   _swigc__p_GDALComputedRasterBandShadow,
   68801             :   _swigc__p_GDALContourOptions,
   68802             :   _swigc__p_GDALDEMProcessingOptions,
   68803             :   _swigc__p_GDALDatasetShadow,
   68804             :   _swigc__p_GDALDimensionHS,
   68805             :   _swigc__p_GDALDriverShadow,
   68806             :   _swigc__p_GDALEDTComponentHS,
   68807             :   _swigc__p_GDALExtendedDataTypeClass,
   68808             :   _swigc__p_GDALExtendedDataTypeHS,
   68809             :   _swigc__p_GDALExtendedDataTypeSubType,
   68810             :   _swigc__p_GDALFootprintOptions,
   68811             :   _swigc__p_GDALGridOptions,
   68812             :   _swigc__p_GDALGroupHS,
   68813             :   _swigc__p_GDALInfoOptions,
   68814             :   _swigc__p_GDALMDArrayHS,
   68815             :   _swigc__p_GDALMajorObjectShadow,
   68816             :   _swigc__p_GDALMultiDimInfoOptions,
   68817             :   _swigc__p_GDALMultiDimTranslateOptions,
   68818             :   _swigc__p_GDALNearblackOptions,
   68819             :   _swigc__p_GDALProgressFunc,
   68820             :   _swigc__p_GDALRasterAlgebraBinaryOperation,
   68821             :   _swigc__p_GDALRasterAlgebraUnaryOperation,
   68822             :   _swigc__p_GDALRasterAttributeTableShadow,
   68823             :   _swigc__p_GDALRasterBandShadow,
   68824             :   _swigc__p_GDALRasterizeOptions,
   68825             :   _swigc__p_GDALRelationshipShadow,
   68826             :   _swigc__p_GDALSubdatasetInfo,
   68827             :   _swigc__p_GDALTileIndexOptions,
   68828             :   _swigc__p_GDALTransformerInfoShadow,
   68829             :   _swigc__p_GDALTranslateOptions,
   68830             :   _swigc__p_GDALVectorInfoOptions,
   68831             :   _swigc__p_GDALVectorTranslateOptions,
   68832             :   _swigc__p_GDALViewshedMode,
   68833             :   _swigc__p_GDALViewshedOutputType,
   68834             :   _swigc__p_GDALWarpAppOptions,
   68835             :   _swigc__p_GDAL_GCP,
   68836             :   _swigc__p_GIntBig,
   68837             :   _swigc__p_GUIntBig,
   68838             :   _swigc__p_OGRFeatureShadow,
   68839             :   _swigc__p_OGRFieldDomainShadow,
   68840             :   _swigc__p_OGRGeomFieldDefnShadow,
   68841             :   _swigc__p_OGRGeometryShadow,
   68842             :   _swigc__p_OGRLayerShadow,
   68843             :   _swigc__p_OGRStyleTableShadow,
   68844             :   _swigc__p_OSRSpatialReferenceShadow,
   68845             :   _swigc__p_StatBuf,
   68846             :   _swigc__p_Statistics,
   68847             :   _swigc__p_SuggestedWarpOutputRes,
   68848             :   _swigc__p_VSIDIR,
   68849             :   _swigc__p_VSILFILE,
   68850             :   _swigc__p_bool,
   68851             :   _swigc__p_char,
   68852             :   _swigc__p_double,
   68853             :   _swigc__p_f_double_p_q_const__char_p_void__int,
   68854             :   _swigc__p_int,
   68855             :   _swigc__p_long_long,
   68856             :   _swigc__p_p_GByte,
   68857             :   _swigc__p_p_GDALComputedRasterBandShadow,
   68858             :   _swigc__p_p_GDALDatasetShadow,
   68859             :   _swigc__p_p_GDALDimensionHS,
   68860             :   _swigc__p_p_GDALEDTComponentHS,
   68861             :   _swigc__p_p_GDALMDArrayHS,
   68862             :   _swigc__p_p_GDALRasterBandShadow,
   68863             :   _swigc__p_p_GDAL_GCP,
   68864             :   _swigc__p_p_GUIntBig,
   68865             :   _swigc__p_p_OGRLayerShadow,
   68866             :   _swigc__p_p_OSRSpatialReferenceShadow,
   68867             :   _swigc__p_p_char,
   68868             :   _swigc__p_p_double,
   68869             :   _swigc__p_p_int,
   68870             :   _swigc__p_p_long_long,
   68871             :   _swigc__p_p_p_GDALAttributeHS,
   68872             :   _swigc__p_p_p_GDALDimensionHS,
   68873             :   _swigc__p_p_p_GDALEDTComponentHS,
   68874             :   _swigc__p_p_p_GDALMDArrayHS,
   68875             :   _swigc__p_p_void,
   68876             :   _swigc__p_size_t,
   68877             :   _swigc__p_vsi_l_offset,
   68878             : };
   68879             : 
   68880             : 
   68881             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   68882             : 
   68883             : static swig_const_info swig_const_table[] = {
   68884             : { SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
   68885             : {0, 0, 0, 0.0, 0, 0}};
   68886             : 
   68887             : #ifdef __cplusplus
   68888             : }
   68889             : #endif
   68890             : /* -----------------------------------------------------------------------------
   68891             :  * Type initialization:
   68892             :  * This problem is tough by the requirement that no dynamic
   68893             :  * memory is used. Also, since swig_type_info structures store pointers to
   68894             :  * swig_cast_info structures and swig_cast_info structures store pointers back
   68895             :  * to swig_type_info structures, we need some lookup code at initialization.
   68896             :  * The idea is that swig generates all the structures that are needed.
   68897             :  * The runtime then collects these partially filled structures.
   68898             :  * The SWIG_InitializeModule function takes these initial arrays out of
   68899             :  * swig_module, and does all the lookup, filling in the swig_module.types
   68900             :  * array with the correct data and linking the correct swig_cast_info
   68901             :  * structures together.
   68902             :  *
   68903             :  * The generated swig_type_info structures are assigned statically to an initial
   68904             :  * array. We just loop through that array, and handle each type individually.
   68905             :  * First we lookup if this type has been already loaded, and if so, use the
   68906             :  * loaded structure instead of the generated one. Then we have to fill in the
   68907             :  * cast linked list. The cast data is initially stored in something like a
   68908             :  * two-dimensional array. Each row corresponds to a type (there are the same
   68909             :  * number of rows as there are in the swig_type_initial array). Each entry in
   68910             :  * a column is one of the swig_cast_info structures for that type.
   68911             :  * The cast_initial array is actually an array of arrays, because each row has
   68912             :  * a variable number of columns. So to actually build the cast linked list,
   68913             :  * we find the array of casts associated with the type, and loop through it
   68914             :  * adding the casts to the list. The one last trick we need to do is making
   68915             :  * sure the type pointer in the swig_cast_info struct is correct.
   68916             :  *
   68917             :  * First off, we lookup the cast->type name to see if it is already loaded.
   68918             :  * There are three cases to handle:
   68919             :  *  1) If the cast->type has already been loaded AND the type we are adding
   68920             :  *     casting info to has not been loaded (it is in this module), THEN we
   68921             :  *     replace the cast->type pointer with the type pointer that has already
   68922             :  *     been loaded.
   68923             :  *  2) If BOTH types (the one we are adding casting info to, and the
   68924             :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   68925             :  *     the previous module so we just ignore it.
   68926             :  *  3) Finally, if cast->type has not already been loaded, then we add that
   68927             :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   68928             :  *     be correct.
   68929             :  * ----------------------------------------------------------------------------- */
   68930             : 
   68931             : #ifdef __cplusplus
   68932             : extern "C" {
   68933             : #if 0
   68934             : } /* c-mode */
   68935             : #endif
   68936             : #endif
   68937             : 
   68938             : #if 0
   68939             : #define SWIGRUNTIME_DEBUG
   68940             : #endif
   68941             : 
   68942             : 
   68943             : SWIGRUNTIME void
   68944             : SWIG_InitializeModule(void *clientdata) {
   68945             :   size_t i;
   68946             :   swig_module_info *module_head, *iter;
   68947             :   int init;
   68948             :   
   68949             :   /* check to see if the circular list has been setup, if not, set it up */
   68950             :   if (swig_module.next==0) {
   68951             :     /* Initialize the swig_module */
   68952             :     swig_module.type_initial = swig_type_initial;
   68953             :     swig_module.cast_initial = swig_cast_initial;
   68954             :     swig_module.next = &swig_module;
   68955             :     init = 1;
   68956             :   } else {
   68957             :     init = 0;
   68958             :   }
   68959             :   
   68960             :   /* Try and load any already created modules */
   68961             :   module_head = SWIG_GetModule(clientdata);
   68962             :   if (!module_head) {
   68963             :     /* This is the first module loaded for this interpreter */
   68964             :     /* so set the swig module into the interpreter */
   68965             :     SWIG_SetModule(clientdata, &swig_module);
   68966             :   } else {
   68967             :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   68968             :     iter=module_head;
   68969             :     do {
   68970             :       if (iter==&swig_module) {
   68971             :         /* Our module is already in the list, so there's nothing more to do. */
   68972             :         return;
   68973             :       }
   68974             :       iter=iter->next;
   68975             :     } while (iter!= module_head);
   68976             :     
   68977             :     /* otherwise we must add our module into the list */
   68978             :     swig_module.next = module_head->next;
   68979             :     module_head->next = &swig_module;
   68980             :   }
   68981             :   
   68982             :   /* When multiple interpreters are used, a module could have already been initialized in
   68983             :        a different interpreter, but not yet have a pointer in this interpreter.
   68984             :        In this case, we do not want to continue adding types... everything should be
   68985             :        set up already */
   68986             :   if (init == 0) return;
   68987             :   
   68988             :   /* Now work on filling in swig_module.types */
   68989             : #ifdef SWIGRUNTIME_DEBUG
   68990             :   printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
   68991             : #endif
   68992             :   for (i = 0; i < swig_module.size; ++i) {
   68993             :     swig_type_info *type = 0;
   68994             :     swig_type_info *ret;
   68995             :     swig_cast_info *cast;
   68996             :     
   68997             : #ifdef SWIGRUNTIME_DEBUG
   68998             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   68999             : #endif
   69000             :     
   69001             :     /* if there is another module already loaded */
   69002             :     if (swig_module.next != &swig_module) {
   69003             :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   69004             :     }
   69005             :     if (type) {
   69006             :       /* Overwrite clientdata field */
   69007             : #ifdef SWIGRUNTIME_DEBUG
   69008             :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   69009             : #endif
   69010             :       if (swig_module.type_initial[i]->clientdata) {
   69011             :         type->clientdata = swig_module.type_initial[i]->clientdata;
   69012             : #ifdef SWIGRUNTIME_DEBUG
   69013             :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   69014             : #endif
   69015             :       }
   69016             :     } else {
   69017             :       type = swig_module.type_initial[i];
   69018             :     }
   69019             :     
   69020             :     /* Insert casting types */
   69021             :     cast = swig_module.cast_initial[i];
   69022             :     while (cast->type) {
   69023             :       /* Don't need to add information already in the list */
   69024             :       ret = 0;
   69025             : #ifdef SWIGRUNTIME_DEBUG
   69026             :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   69027             : #endif
   69028             :       if (swig_module.next != &swig_module) {
   69029             :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   69030             : #ifdef SWIGRUNTIME_DEBUG
   69031             :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   69032             : #endif
   69033             :       }
   69034             :       if (ret) {
   69035             :         if (type == swig_module.type_initial[i]) {
   69036             : #ifdef SWIGRUNTIME_DEBUG
   69037             :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   69038             : #endif
   69039             :           cast->type = ret;
   69040             :           ret = 0;
   69041             :         } else {
   69042             :           /* Check for casting already in the list */
   69043             :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   69044             : #ifdef SWIGRUNTIME_DEBUG
   69045             :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   69046             : #endif
   69047             :           if (!ocast) ret = 0;
   69048             :         }
   69049             :       }
   69050             :       
   69051             :       if (!ret) {
   69052             : #ifdef SWIGRUNTIME_DEBUG
   69053             :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   69054             : #endif
   69055             :         if (type->cast) {
   69056             :           type->cast->prev = cast;
   69057             :           cast->next = type->cast;
   69058             :         }
   69059             :         type->cast = cast;
   69060             :       }
   69061             :       cast++;
   69062             :     }
   69063             :     /* Set entry in modules->types array equal to the type */
   69064             :     swig_module.types[i] = type;
   69065             :   }
   69066             :   swig_module.types[i] = 0;
   69067             :   
   69068             : #ifdef SWIGRUNTIME_DEBUG
   69069             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   69070             :   for (i = 0; i < swig_module.size; ++i) {
   69071             :     int j = 0;
   69072             :     swig_cast_info *cast = swig_module.cast_initial[i];
   69073             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   69074             :     while (cast->type) {
   69075             :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   69076             :       cast++;
   69077             :       ++j;
   69078             :     }
   69079             :     printf("---- Total casts: %d\n",j);
   69080             :   }
   69081             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   69082             : #endif
   69083             : }
   69084             : 
   69085             : /* This function will propagate the clientdata field of type to
   69086             : * any new swig_type_info structures that have been added into the list
   69087             : * of equivalent types.  It is like calling
   69088             : * SWIG_TypeClientData(type, clientdata) a second time.
   69089             : */
   69090             : SWIGRUNTIME void
   69091             : SWIG_PropagateClientData(void) {
   69092             :   size_t i;
   69093             :   swig_cast_info *equiv;
   69094             :   static int init_run = 0;
   69095             :   
   69096             :   if (init_run) return;
   69097             :   init_run = 1;
   69098             :   
   69099             :   for (i = 0; i < swig_module.size; i++) {
   69100             :     if (swig_module.types[i]->clientdata) {
   69101             :       equiv = swig_module.types[i]->cast;
   69102             :       while (equiv) {
   69103             :         if (!equiv->converter) {
   69104             :           if (equiv->type && !equiv->type->clientdata)
   69105             :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   69106             :         }
   69107             :         equiv = equiv->next;
   69108             :       }
   69109             :     }
   69110             :   }
   69111             : }
   69112             : 
   69113             : #ifdef __cplusplus
   69114             : #if 0
   69115             : {
   69116             :   /* c-mode */
   69117             : #endif
   69118             : }
   69119             : #endif
   69120             : 
   69121             : 
   69122             : 
   69123             : #ifdef __cplusplus
   69124             : extern "C" {
   69125             : #endif
   69126             :   
   69127             :   /* Python-specific SWIG API */
   69128             : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   69129             : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   69130             : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   69131             :   
   69132             :   /* -----------------------------------------------------------------------------
   69133             :    * global variable support code.
   69134             :    * ----------------------------------------------------------------------------- */
   69135             :   
   69136             :   typedef struct swig_globalvar {
   69137             :     char       *name;                  /* Name of global variable */
   69138             :     PyObject *(*get_attr)(void);       /* Return the current value */
   69139             :     int       (*set_attr)(PyObject *); /* Set the value */
   69140             :     struct swig_globalvar *next;
   69141             :   } swig_globalvar;
   69142             :   
   69143             :   typedef struct swig_varlinkobject {
   69144             :     PyObject_HEAD
   69145             :     swig_globalvar *vars;
   69146             :   } swig_varlinkobject;
   69147             :   
   69148             :   SWIGINTERN PyObject *
   69149             :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   69150             : #if PY_VERSION_HEX >= 0x03000000
   69151             :     return PyUnicode_InternFromString("<Swig global variables>");
   69152             : #else
   69153             :     return PyString_FromString("<Swig global variables>");
   69154             : #endif
   69155             :   }
   69156             :   
   69157             :   SWIGINTERN PyObject *
   69158             :   swig_varlink_str(swig_varlinkobject *v) {
   69159             : #if PY_VERSION_HEX >= 0x03000000
   69160             :     PyObject *str = PyUnicode_InternFromString("(");
   69161             :     PyObject *tail;
   69162             :     PyObject *joined;
   69163             :     swig_globalvar *var;
   69164             :     for (var = v->vars; var; var=var->next) {
   69165             :       tail = PyUnicode_FromString(var->name);
   69166             :       joined = PyUnicode_Concat(str, tail);
   69167             :       Py_DecRef(str);
   69168             :       Py_DecRef(tail);
   69169             :       str = joined;
   69170             :       if (var->next) {
   69171             :         tail = PyUnicode_InternFromString(", ");
   69172             :         joined = PyUnicode_Concat(str, tail);
   69173             :         Py_DecRef(str);
   69174             :         Py_DecRef(tail);
   69175             :         str = joined;
   69176             :       }
   69177             :     }
   69178             :     tail = PyUnicode_InternFromString(")");
   69179             :     joined = PyUnicode_Concat(str, tail);
   69180             :     Py_DecRef(str);
   69181             :     Py_DecRef(tail);
   69182             :     str = joined;
   69183             : #else
   69184             :     PyObject *str = PyString_FromString("(");
   69185             :     swig_globalvar *var;
   69186             :     for (var = v->vars; var; var=var->next) {
   69187             :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   69188             :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   69189             :     }
   69190             :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   69191             : #endif
   69192             :     return str;
   69193             :   }
   69194             :   
   69195             :   SWIGINTERN void
   69196             :   swig_varlink_dealloc(swig_varlinkobject *v) {
   69197             :     swig_globalvar *var = v->vars;
   69198             :     while (var) {
   69199             :       swig_globalvar *n = var->next;
   69200             :       free(var->name);
   69201             :       free(var);
   69202             :       var = n;
   69203             :     }
   69204             :   }
   69205             :   
   69206             :   SWIGINTERN PyObject *
   69207             :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   69208             :     PyObject *res = NULL;
   69209             :     swig_globalvar *var = v->vars;
   69210             :     while (var) {
   69211             :       if (strcmp(var->name,n) == 0) {
   69212             :         res = (*var->get_attr)();
   69213             :         break;
   69214             :       }
   69215             :       var = var->next;
   69216             :     }
   69217             :     if (res == NULL && !PyErr_Occurred()) {
   69218             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   69219             :     }
   69220             :     return res;
   69221             :   }
   69222             :   
   69223             :   SWIGINTERN int
   69224             :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   69225             :     int res = 1;
   69226             :     swig_globalvar *var = v->vars;
   69227             :     while (var) {
   69228             :       if (strcmp(var->name,n) == 0) {
   69229             :         res = (*var->set_attr)(p);
   69230             :         break;
   69231             :       }
   69232             :       var = var->next;
   69233             :     }
   69234             :     if (res == 1 && !PyErr_Occurred()) {
   69235             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   69236             :     }
   69237             :     return res;
   69238             :   }
   69239             :   
   69240             :   SWIGINTERN PyTypeObject*
   69241             :   swig_varlink_type(void) {
   69242             :     static char varlink__doc__[] = "Swig var link object";
   69243             :     static PyTypeObject varlink_type;
   69244             :     static int type_init = 0;
   69245             :     if (!type_init) {
   69246             :       const PyTypeObject tmp = {
   69247             : #if PY_VERSION_HEX >= 0x03000000
   69248             :         PyVarObject_HEAD_INIT(NULL, 0)
   69249             : #else
   69250             :         PyObject_HEAD_INIT(NULL)
   69251             :         0,                                  /* ob_size */
   69252             : #endif
   69253             :         "swigvarlink",                      /* tp_name */
   69254             :         sizeof(swig_varlinkobject),         /* tp_basicsize */
   69255             :         0,                                  /* tp_itemsize */
   69256             :         (destructor) swig_varlink_dealloc,  /* tp_dealloc */
   69257             :         0,                                  /* tp_print */
   69258             :         (getattrfunc) swig_varlink_getattr, /* tp_getattr */
   69259             :         (setattrfunc) swig_varlink_setattr, /* tp_setattr */
   69260             :         0,                                  /* tp_compare */
   69261             :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   69262             :         0,                                  /* tp_as_number */
   69263             :         0,                                  /* tp_as_sequence */
   69264             :         0,                                  /* tp_as_mapping */
   69265             :         0,                                  /* tp_hash */
   69266             :         0,                                  /* tp_call */
   69267             :         (reprfunc) swig_varlink_str,        /* tp_str */
   69268             :         0,                                  /* tp_getattro */
   69269             :         0,                                  /* tp_setattro */
   69270             :         0,                                  /* tp_as_buffer */
   69271             :         0,                                  /* tp_flags */
   69272             :         varlink__doc__,                     /* tp_doc */
   69273             :         0,                                  /* tp_traverse */
   69274             :         0,                                  /* tp_clear */
   69275             :         0,                                  /* tp_richcompare */
   69276             :         0,                                  /* tp_weaklistoffset */
   69277             :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   69278             :         0,                                  /* tp_del */
   69279             :         0,                                  /* tp_version_tag */
   69280             : #if PY_VERSION_HEX >= 0x03040000
   69281             :         0,                                  /* tp_finalize */
   69282             : #endif
   69283             : #ifdef COUNT_ALLOCS
   69284             :         0,                                  /* tp_allocs */
   69285             :         0,                                  /* tp_frees */
   69286             :         0,                                  /* tp_maxalloc */
   69287             :         0,                                  /* tp_prev */
   69288             :         0                                   /* tp_next */
   69289             : #endif
   69290             :       };
   69291             :       varlink_type = tmp;
   69292             :       type_init = 1;
   69293             :       if (PyType_Ready(&varlink_type) < 0)
   69294             :       return NULL;
   69295             :     }
   69296             :     return &varlink_type;
   69297             :   }
   69298             :   
   69299             :   /* Create a variable linking object for use later */
   69300             :   SWIGINTERN PyObject *
   69301             :   SWIG_Python_newvarlink(void) {
   69302             :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   69303             :     if (result) {
   69304             :       result->vars = 0;
   69305             :     }
   69306             :     return ((PyObject*) result);
   69307             :   }
   69308             :   
   69309             :   SWIGINTERN void 
   69310             :   SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   69311             :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   69312             :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   69313             :     if (gv) {
   69314             :       size_t size = strlen(name)+1;
   69315             :       gv->name = (char *)malloc(size);
   69316             :       if (gv->name) {
   69317             :         memcpy(gv->name, name, size);
   69318             :         gv->get_attr = get_attr;
   69319             :         gv->set_attr = set_attr;
   69320             :         gv->next = v->vars;
   69321             :       }
   69322             :     }
   69323             :     v->vars = gv;
   69324             :   }
   69325             :   
   69326             :   SWIGINTERN PyObject *
   69327             :   SWIG_globals(void) {
   69328             :     static PyObject *globals = 0;
   69329             :     if (!globals) {
   69330             :       globals = SWIG_newvarlink();
   69331             :     }
   69332             :     return globals;
   69333             :   }
   69334             :   
   69335             :   /* -----------------------------------------------------------------------------
   69336             :    * constants/methods manipulation
   69337             :    * ----------------------------------------------------------------------------- */
   69338             :   
   69339             :   /* Install Constants */
   69340             :   SWIGINTERN void
   69341         277 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   69342         277 :     PyObject *obj = 0;
   69343         277 :     size_t i;
   69344         554 :     for (i = 0; constants[i].type; ++i) {
   69345         277 :       switch(constants[i].type) {
   69346         277 :       case SWIG_PY_POINTER:
   69347         277 :         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   69348         277 :         break;
   69349           0 :       case SWIG_PY_BINARY:
   69350           0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   69351             :         break;
   69352             :       default:
   69353             :         obj = 0;
   69354             :         break;
   69355             :       }
   69356         277 :       if (obj) {
   69357         277 :         PyDict_SetItemString(d, constants[i].name, obj);
   69358         277 :         Py_DECREF(obj);
   69359             :       }
   69360             :     }
   69361         277 :   }
   69362             :   
   69363             :   /* -----------------------------------------------------------------------------*/
   69364             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   69365             :   /* -----------------------------------------------------------------------------*/
   69366             :   
   69367             :   SWIGINTERN void
   69368         277 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   69369             :     swig_const_info *const_table,
   69370             :     swig_type_info **types,
   69371             :     swig_type_info **types_initial) {
   69372         277 :     size_t i;
   69373      227694 :     for (i = 0; methods[i].ml_name; ++i) {
   69374      227417 :       const char *c = methods[i].ml_doc;
   69375      227417 :       if (!c) continue;
   69376      208858 :       c = strstr(c, "swig_ptr: ");
   69377      208858 :       if (c) {
   69378           0 :         int j;
   69379           0 :         swig_const_info *ci = 0;
   69380           0 :         const char *name = c + 10;
   69381           0 :         for (j = 0; const_table[j].type; ++j) {
   69382           0 :           if (strncmp(const_table[j].name, name, 
   69383             :               strlen(const_table[j].name)) == 0) {
   69384             :             ci = &(const_table[j]);
   69385             :             break;
   69386             :           }
   69387             :         }
   69388           0 :         if (ci) {
   69389      227417 :           void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   69390           0 :           if (ptr) {
   69391           0 :             size_t shift = (ci->ptype) - types;
   69392           0 :             swig_type_info *ty = types_initial[shift];
   69393           0 :             size_t ldoc = (c - methods[i].ml_doc);
   69394           0 :             size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   69395           0 :             char *ndoc = (char*)malloc(ldoc + lptr + 10);
   69396           0 :             if (ndoc) {
   69397           0 :               char *buff = ndoc;
   69398           0 :               memcpy(buff, methods[i].ml_doc, ldoc);
   69399           0 :               buff += ldoc;
   69400           0 :               memcpy(buff, "swig_ptr: ", 10);
   69401           0 :               buff += 10;
   69402           0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   69403           0 :               methods[i].ml_doc = ndoc;
   69404             :             }
   69405             :           }
   69406             :         }
   69407             :       }
   69408             :     }
   69409         277 :   } 
   69410             :   
   69411             :   /* -----------------------------------------------------------------------------
   69412             :    * Method creation and docstring support functions
   69413             :    * ----------------------------------------------------------------------------- */
   69414             :   
   69415             :   /* -----------------------------------------------------------------------------
   69416             :    * Function to find the method definition with the correct docstring for the
   69417             :    * proxy module as opposed to the low-level API
   69418             :    * ----------------------------------------------------------------------------- */
   69419             :   
   69420           0 :   SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
   69421             :     /* Find the function in the modified method table */
   69422           0 :     size_t offset = 0;
   69423           0 :     int found = 0;
   69424           0 :     while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
   69425           0 :       if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
   69426             :         found = 1;
   69427             :         break;
   69428             :       }
   69429           0 :       offset++;
   69430             :     }
   69431             :     /* Use the copy with the modified docstring if available */
   69432           0 :     return found ? &SwigMethods_proxydocs[offset] : NULL;
   69433             :   }
   69434             :   
   69435             :   /* -----------------------------------------------------------------------------
   69436             :    * Wrapper of PyInstanceMethod_New() used in Python 3
   69437             :    * It is exported to the generated module, used for -fastproxy
   69438             :    * ----------------------------------------------------------------------------- */
   69439             :   
   69440           0 :   SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   69441           0 :     if (PyCFunction_Check(func)) {
   69442           0 :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   69443           0 :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   69444           0 :       if (ml)
   69445           0 :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   69446             :     }
   69447             : #if PY_VERSION_HEX >= 0x03000000
   69448           0 :     return PyInstanceMethod_New(func);
   69449             : #else
   69450             :     return PyMethod_New(func, NULL, NULL);
   69451             : #endif
   69452             :   }
   69453             :   
   69454             :   /* -----------------------------------------------------------------------------
   69455             :    * Wrapper of PyStaticMethod_New()
   69456             :    * It is exported to the generated module, used for -fastproxy
   69457             :    * ----------------------------------------------------------------------------- */
   69458             :   
   69459             :   SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   69460             :     if (PyCFunction_Check(func)) {
   69461             :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   69462             :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   69463             :       if (ml)
   69464             :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   69465             :     }
   69466             :     return PyStaticMethod_New(func);
   69467             :   }
   69468             :   
   69469             : #ifdef __cplusplus
   69470             : }
   69471             : #endif
   69472             : 
   69473             : /* -----------------------------------------------------------------------------*
   69474             :  *  Partial Init method
   69475             :  * -----------------------------------------------------------------------------*/
   69476             : 
   69477             : #ifdef __cplusplus
   69478             : extern "C"
   69479             : #endif
   69480             : 
   69481             : SWIGEXPORT 
   69482             : #if PY_VERSION_HEX >= 0x03000000
   69483             : PyObject*
   69484             : #else
   69485             : void
   69486             : #endif
   69487         277 : SWIG_init(void) {
   69488         277 :   PyObject *m, *d, *md, *globals;
   69489             :   
   69490             : #if PY_VERSION_HEX >= 0x03000000
   69491         277 :   static struct PyModuleDef SWIG_module = {
   69492             :     PyModuleDef_HEAD_INIT,
   69493             :     SWIG_name,
   69494             :     NULL,
   69495             :     -1,
   69496             :     SwigMethods,
   69497             :     NULL,
   69498             :     NULL,
   69499             :     NULL,
   69500             :     NULL
   69501             :   };
   69502             : #endif
   69503             :   
   69504             : #if defined(SWIGPYTHON_BUILTIN)
   69505             :   static SwigPyClientData SwigPyObject_clientdata = {
   69506             :     0, 0, 0, 0, 0, 0, 0
   69507             :   };
   69508             :   static PyGetSetDef this_getset_def = {
   69509             :     (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
   69510             :   };
   69511             :   static SwigPyGetSet thisown_getset_closure = {
   69512             :     SwigPyObject_own,
   69513             :     SwigPyObject_own
   69514             :   };
   69515             :   static PyGetSetDef thisown_getset_def = {
   69516             :     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
   69517             :   };
   69518             :   PyTypeObject *builtin_pytype;
   69519             :   int builtin_base_count;
   69520             :   swig_type_info *builtin_basetype;
   69521             :   PyObject *tuple;
   69522             :   PyGetSetDescrObject *static_getset;
   69523             :   PyTypeObject *metatype;
   69524             :   PyTypeObject *swigpyobject;
   69525             :   SwigPyClientData *cd;
   69526             :   PyObject *public_interface, *public_symbol;
   69527             :   PyObject *this_descr;
   69528             :   PyObject *thisown_descr;
   69529             :   PyObject *self = 0;
   69530             :   int i;
   69531             :   
   69532             :   (void)builtin_pytype;
   69533             :   (void)builtin_base_count;
   69534             :   (void)builtin_basetype;
   69535             :   (void)tuple;
   69536             :   (void)static_getset;
   69537             :   (void)self;
   69538             :   
   69539             :   /* Metaclass is used to implement static member variables */
   69540             :   metatype = SwigPyObjectType();
   69541             :   assert(metatype);
   69542             : #endif
   69543             :   
   69544         277 :   (void)globals;
   69545             :   
   69546             :   /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
   69547         277 :   SWIG_This();
   69548         277 :   SWIG_Python_TypeCache();
   69549         277 :   SwigPyPacked_type();
   69550             : #ifndef SWIGPYTHON_BUILTIN
   69551         277 :   SwigPyObject_type();
   69552             : #endif
   69553             :   
   69554             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   69555         277 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   69556             :   
   69557             : #if PY_VERSION_HEX >= 0x03000000
   69558         277 :   m = PyModule_Create(&SWIG_module);
   69559             : #else
   69560             :   m = Py_InitModule(SWIG_name, SwigMethods);
   69561             : #endif
   69562             :   
   69563         277 :   md = d = PyModule_GetDict(m);
   69564         277 :   (void)md;
   69565             :   
   69566         277 :   SWIG_InitializeModule(0);
   69567             :   
   69568             : #ifdef SWIGPYTHON_BUILTIN
   69569             :   swigpyobject = SwigPyObject_TypeOnce();
   69570             :   
   69571             :   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
   69572             :   assert(SwigPyObject_stype);
   69573             :   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
   69574             :   if (!cd) {
   69575             :     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
   69576             :     SwigPyObject_clientdata.pytype = swigpyobject;
   69577             :   } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
   69578             :     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
   69579             : # if PY_VERSION_HEX >= 0x03000000
   69580             :     return NULL;
   69581             : # else
   69582             :     return;
   69583             : # endif
   69584             :   }
   69585             :   
   69586             :   /* All objects have a 'this' attribute */
   69587             :   this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
   69588             :   (void)this_descr;
   69589             :   
   69590             :   /* All objects have a 'thisown' attribute */
   69591             :   thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
   69592             :   (void)thisown_descr;
   69593             :   
   69594             :   public_interface = PyList_New(0);
   69595             :   public_symbol = 0;
   69596             :   (void)public_symbol;
   69597             :   
   69598             :   PyDict_SetItemString(md, "__all__", public_interface);
   69599             :   Py_DECREF(public_interface);
   69600             :   for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
   69601             :   SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
   69602             :   for (i = 0; swig_const_table[i].name != 0; ++i)
   69603             :   SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
   69604             : #endif
   69605             :   
   69606         277 :   SWIG_InstallConstants(d,swig_const_table);
   69607             :   
   69608         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOGICAL_NOT",SWIG_From_int(static_cast< int >(GRAUO_LOGICAL_NOT)));
   69609         277 :   SWIG_Python_SetConstant(d, "GRAUO_ABS",SWIG_From_int(static_cast< int >(GRAUO_ABS)));
   69610         277 :   SWIG_Python_SetConstant(d, "GRAUO_SQRT",SWIG_From_int(static_cast< int >(GRAUO_SQRT)));
   69611         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOG",SWIG_From_int(static_cast< int >(GRAUO_LOG)));
   69612         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOG10",SWIG_From_int(static_cast< int >(GRAUO_LOG10)));
   69613         277 :   SWIG_Python_SetConstant(d, "GRABO_ADD",SWIG_From_int(static_cast< int >(GRABO_ADD)));
   69614         277 :   SWIG_Python_SetConstant(d, "GRABO_SUB",SWIG_From_int(static_cast< int >(GRABO_SUB)));
   69615         277 :   SWIG_Python_SetConstant(d, "GRABO_MUL",SWIG_From_int(static_cast< int >(GRABO_MUL)));
   69616         277 :   SWIG_Python_SetConstant(d, "GRABO_DIV",SWIG_From_int(static_cast< int >(GRABO_DIV)));
   69617         277 :   SWIG_Python_SetConstant(d, "GRABO_POW",SWIG_From_int(static_cast< int >(GRABO_POW)));
   69618         277 :   SWIG_Python_SetConstant(d, "GRABO_GT",SWIG_From_int(static_cast< int >(GRABO_GT)));
   69619         277 :   SWIG_Python_SetConstant(d, "GRABO_GE",SWIG_From_int(static_cast< int >(GRABO_GE)));
   69620         277 :   SWIG_Python_SetConstant(d, "GRABO_LT",SWIG_From_int(static_cast< int >(GRABO_LT)));
   69621         277 :   SWIG_Python_SetConstant(d, "GRABO_LE",SWIG_From_int(static_cast< int >(GRABO_LE)));
   69622         277 :   SWIG_Python_SetConstant(d, "GRABO_EQ",SWIG_From_int(static_cast< int >(GRABO_EQ)));
   69623         277 :   SWIG_Python_SetConstant(d, "GRABO_NE",SWIG_From_int(static_cast< int >(GRABO_NE)));
   69624         277 :   SWIG_Python_SetConstant(d, "GRABO_LOGICAL_AND",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_AND)));
   69625         277 :   SWIG_Python_SetConstant(d, "GRABO_LOGICAL_OR",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_OR)));
   69626             :   
   69627             :   /* gdal_python.i %init code */
   69628         277 :   if ( GDALGetDriverCount() == 0 ) {
   69629         277 :     GDALAllRegister();
   69630             :   }
   69631             :   // Will be turned on for GDAL 4.0
   69632             :   // UseExceptions();
   69633             :   
   69634             :   
   69635         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   69636         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   69637         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   69638         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_SET_ERROR_FLAG",SWIG_From_int(static_cast< int >(0x8)));
   69639         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_CACHE_ONLY",SWIG_From_int(static_cast< int >(0x10)));
   69640         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
   69641         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_DATA",SWIG_From_int(static_cast< int >(1)));
   69642         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_HOLE",SWIG_From_int(static_cast< int >(2)));
   69643         277 :   SWIG_Python_SetConstant(d, "GEDTST_NONE",SWIG_From_int(static_cast< int >(GEDTST_NONE)));
   69644         277 :   SWIG_Python_SetConstant(d, "GEDTST_JSON",SWIG_From_int(static_cast< int >(GEDTST_JSON)));
   69645         277 :   SWIG_Python_SetConstant(d, "GEDTC_NUMERIC",SWIG_From_int(static_cast< int >(GEDTC_NUMERIC)));
   69646         277 :   SWIG_Python_SetConstant(d, "GEDTC_STRING",SWIG_From_int(static_cast< int >(GEDTC_STRING)));
   69647         277 :   SWIG_Python_SetConstant(d, "GEDTC_COMPOUND",SWIG_From_int(static_cast< int >(GEDTC_COMPOUND)));
   69648             :   
   69649         277 :   SWIG_Python_SetConstant(d, "GVM_Diagonal",SWIG_From_int(static_cast< int >(GVM_Diagonal)));
   69650         277 :   SWIG_Python_SetConstant(d, "GVM_Edge",SWIG_From_int(static_cast< int >(GVM_Edge)));
   69651         277 :   SWIG_Python_SetConstant(d, "GVM_Max",SWIG_From_int(static_cast< int >(GVM_Max)));
   69652         277 :   SWIG_Python_SetConstant(d, "GVM_Min",SWIG_From_int(static_cast< int >(GVM_Min)));
   69653         277 :   SWIG_Python_SetConstant(d, "GVOT_NORMAL",SWIG_From_int(static_cast< int >(GVOT_NORMAL)));
   69654         277 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_DEM",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_DEM)));
   69655         277 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_GROUND",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_GROUND)));
   69656             :   
   69657             :   /* Initialize threading */
   69658         277 :   SWIG_PYTHON_INITIALIZE_THREADS;
   69659             : #if PY_VERSION_HEX >= 0x03000000
   69660         277 :   return m;
   69661             : #else
   69662             :   return;
   69663             : #endif
   69664             : }
   69665             : 

Generated by: LCOV version 1.14